nodejs-poolcontroller 7.6.1 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.eslintrc.json +44 -44
  2. package/.github/ISSUE_TEMPLATE/1-bug-report.yml +84 -0
  3. package/.github/ISSUE_TEMPLATE/2-docs.md +12 -0
  4. package/.github/ISSUE_TEMPLATE/3-proposal.md +28 -0
  5. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  6. package/CONTRIBUTING.md +74 -74
  7. package/Changelog +220 -215
  8. package/Dockerfile +17 -17
  9. package/Gruntfile.js +40 -40
  10. package/LICENSE +661 -661
  11. package/README.md +191 -191
  12. package/app.ts +1 -1
  13. package/config/Config.ts +14 -0
  14. package/config/VersionCheck.ts +2 -2
  15. package/controller/Constants.ts +2 -1
  16. package/controller/Equipment.ts +2484 -2459
  17. package/controller/Errors.ts +180 -180
  18. package/controller/Lockouts.ts +502 -436
  19. package/controller/State.ts +106 -30
  20. package/controller/boards/AquaLinkBoard.ts +1000 -0
  21. package/controller/boards/BoardFactory.ts +49 -45
  22. package/controller/boards/EasyTouchBoard.ts +2859 -2653
  23. package/controller/boards/IntelliCenterBoard.ts +4198 -4230
  24. package/controller/boards/IntelliComBoard.ts +63 -63
  25. package/controller/boards/IntelliTouchBoard.ts +273 -241
  26. package/controller/boards/NixieBoard.ts +1728 -1675
  27. package/controller/boards/SystemBoard.ts +4925 -4697
  28. package/controller/comms/Comms.ts +442 -479
  29. package/controller/comms/messages/Messages.ts +171 -25
  30. package/controller/comms/messages/config/ChlorinatorMessage.ts +5 -2
  31. package/controller/comms/messages/config/CircuitGroupMessage.ts +0 -0
  32. package/controller/comms/messages/config/CircuitMessage.ts +1 -0
  33. package/controller/comms/messages/config/ConfigMessage.ts +0 -0
  34. package/controller/comms/messages/config/CoverMessage.ts +0 -0
  35. package/controller/comms/messages/config/CustomNameMessage.ts +30 -30
  36. package/controller/comms/messages/config/EquipmentMessage.ts +0 -0
  37. package/controller/comms/messages/config/ExternalMessage.ts +0 -0
  38. package/controller/comms/messages/config/FeatureMessage.ts +0 -0
  39. package/controller/comms/messages/config/GeneralMessage.ts +0 -0
  40. package/controller/comms/messages/config/HeaterMessage.ts +142 -10
  41. package/controller/comms/messages/config/IntellichemMessage.ts +0 -0
  42. package/controller/comms/messages/config/OptionsMessage.ts +4 -21
  43. package/controller/comms/messages/config/PumpMessage.ts +53 -35
  44. package/controller/comms/messages/config/RemoteMessage.ts +0 -0
  45. package/controller/comms/messages/config/ScheduleMessage.ts +350 -347
  46. package/controller/comms/messages/config/SecurityMessage.ts +0 -0
  47. package/controller/comms/messages/config/ValveMessage.ts +1 -1
  48. package/controller/comms/messages/status/ChlorinatorStateMessage.ts +38 -86
  49. package/controller/comms/messages/status/EquipmentStateMessage.ts +58 -22
  50. package/controller/comms/messages/status/HeaterStateMessage.ts +116 -86
  51. package/controller/comms/messages/status/IntelliChemStateMessage.ts +445 -445
  52. package/controller/comms/messages/status/IntelliValveStateMessage.ts +35 -35
  53. package/controller/comms/messages/status/PumpStateMessage.ts +23 -1
  54. package/controller/comms/messages/status/VersionMessage.ts +0 -0
  55. package/controller/nixie/Nixie.ts +162 -162
  56. package/controller/nixie/NixieEquipment.ts +103 -103
  57. package/controller/nixie/bodies/Body.ts +120 -120
  58. package/controller/nixie/bodies/Filter.ts +135 -135
  59. package/controller/nixie/chemistry/ChemController.ts +2511 -2498
  60. package/controller/nixie/chemistry/Chlorinator.ts +363 -314
  61. package/controller/nixie/circuits/Circuit.ts +261 -248
  62. package/controller/nixie/heaters/Heater.ts +650 -648
  63. package/controller/nixie/pumps/Pump.ts +906 -661
  64. package/controller/nixie/schedules/Schedule.ts +313 -257
  65. package/controller/nixie/valves/Valve.ts +170 -170
  66. package/defaultConfig.json +306 -286
  67. package/logger/DataLogger.ts +448 -448
  68. package/logger/Logger.ts +0 -0
  69. package/package.json +56 -56
  70. package/tsconfig.json +25 -25
  71. package/web/Server.ts +92 -47
  72. package/web/bindings/aqualinkD.json +505 -0
  73. package/web/bindings/influxDB.json +1051 -1021
  74. package/web/bindings/mqtt.json +702 -654
  75. package/web/bindings/mqttAlt.json +731 -684
  76. package/web/bindings/rulesManager.json +54 -54
  77. package/web/bindings/smartThings-Hubitat.json +31 -31
  78. package/web/bindings/valveRelays.json +20 -20
  79. package/web/bindings/vera.json +25 -25
  80. package/web/interfaces/baseInterface.ts +137 -136
  81. package/web/interfaces/httpInterface.ts +145 -124
  82. package/web/interfaces/influxInterface.ts +276 -245
  83. package/web/interfaces/mqttInterface.ts +535 -475
  84. package/web/services/config/Config.ts +39 -18
  85. package/web/services/config/ConfigSocket.ts +0 -0
  86. package/web/services/state/State.ts +10 -0
  87. package/web/services/state/StateSocket.ts +4 -4
  88. package/web/services/utilities/Utilities.ts +44 -42
  89. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
  90. package/config copy.json +0 -300
  91. package/issue_template.md +0 -52
@@ -1,685 +1,732 @@
1
- {
2
- "context": {
3
- "name": "MQTT",
4
- "options": {
5
- "formatter": [
6
- {
7
- "transform": ".toLowerCase()"
8
- },
9
- {
10
- "regexkey": "\\s",
11
- "replace": "",
12
- "description": "Remove whitespace"
13
- },
14
- {
15
- "regexkey": "\\/",
16
- "replace": "",
17
- "description": "Remove /"
18
- },
19
- {
20
- "regexkey": "\\+",
21
- "replace": "",
22
- "description": "Remove +"
23
- },
24
- {
25
- "regexkey": "\\$",
26
- "replace": "",
27
- "description": "Remove $"
28
- },
29
- {
30
- "regexkey": "\\#",
31
- "replace": "",
32
- "description": "Remove #"
33
- }
34
- ],
35
- "rootTopic-DIRECTIONS": "You can override the root topic by renaming _rootTopic to rootTopic",
36
- "_rootTopic": "@bind=(state.equipment.alias).replace(' ','-').replace('/','').toLowerCase();",
37
- "clientId": "@bind='mqttjs_njsPC_'+Math.random().toString(16).substr(2, 8);"
38
- }
39
- },
40
- "events": [
41
- {
42
- "name": "config",
43
- "description": "Don't flood the MQTT bus.",
44
- "enabled": false
45
- },
46
- {
47
- "name": "controller",
48
- "description": "Emit time every minute",
49
- "enabled": true,
50
- "topics": [
51
- {
52
- "topic": "state/time",
53
- "message": "@bind=data.time;"
54
- },
55
- {
56
- "topic": "alias",
57
- "message": "@bind=data.alias;"
58
- },
59
- {
60
- "topic": "state/status",
61
- "message": "@bind=data.status;"
62
- },
63
- {
64
- "topic": "state/mode",
65
- "message": "@bind=data.mode;"
66
- },
67
- {
68
- "topic": "state/startTime",
69
- "message": "@bind=data.startTime;"
70
- }
71
- ]
72
- },
73
- {
74
- "name": "circuit",
75
- "description": "Populate the circuits topics",
76
- "topics": [
77
- {
78
- "topic": "state/circuits/@bind=data.id;/name",
79
- "message": "@bind=data.name;",
80
- "description": "Bind the name."
81
- },
82
- {
83
- "topic": "state/circuits/@bind=data.id;/isOn",
84
- "message": "@bind=data.isOn;",
85
- "description": "Bind the on/off status to the topic."
86
- },
87
- {
88
- "topic": "state/circuits/@bind=data.id;/type",
89
- "message": "@bind=data.type;",
90
- "description": "The type of circuit we are dealing with."
91
- },
92
- {
93
- "topic": "state/circuits/@bind=data.id;/endTime",
94
- "message": "@bind=data.endTime;",
95
- "description": "The end time for the circuit."
96
- },
97
- {
98
- "topic": "state/circuits/@bind=data.id;/lightingTheme",
99
- "message": "@bind=data.lightingTheme;",
100
- "description": "Bind the lighting theme to the topic.",
101
- "filter": "@bind=data.type.isLight === true;"
102
- },
103
- {
104
- "topic": "state/circuits/@bind=data.id;/showInFeatures",
105
- "message": "@bind=data.showInFeatures;",
106
- "description": "Indicates whether the item should show in features."
107
- },
108
- {
109
- "topic": "state/circuits/@bind=data.id;/endTime",
110
- "message": "@bind=data.endTime;",
111
- "description": "Indicates end time for a circuit (when it will turn off)."
112
- }
113
- ]
114
- },
115
- {
116
- "name": "feature",
117
- "description": "Populate the features topics",
118
- "topics": [
119
- {
120
- "topic": "state/features/@bind=data.id;/name",
121
- "message": "@bind=data.name;",
122
- "description": "Bind the name."
123
- },
124
- {
125
- "topic": "state/features/@bind=data.id;/isOn",
126
- "message": "@bind=data.isOn;",
127
- "description": "Bind the on/off status to the topic."
128
- },
129
- {
130
- "topic": "state/features/@bind=data.id;/endTime",
131
- "message": "@bind=data.endTime;",
132
- "description": "The end time for the feature."
133
- },
134
- {
135
- "topic": "state/features/@bind=data.id;/type",
136
- "message": "@bind=data.type;",
137
- "description": "The type of feature we are dealing with."
138
- },
139
- {
140
- "topic": "state/features/@bind=data.id;/showInFeatures",
141
- "message": "@bind=data.showInFeatures;",
142
- "description": "Indicates whether the item should show in features."
143
- },
144
- {
145
- "topic": "state/features/@bind=data.id;/endTime",
146
- "message": "@bind=data.endTime;",
147
- "description": "Indicates end time for a features (when it will turn off)."
148
- }
149
- ]
150
- },
151
- {
152
- "name": "lightGroup",
153
- "description": "Populate the lightGroup topic",
154
- "topics": [
155
- {
156
- "topic": "state/lightGroups/@bind=data.id;/name",
157
- "message": "@bind=data.name;",
158
- "description": "Bind name to the state topic."
159
- },
160
- {
161
- "topic": "state/lightGroups/@bind=data.id;/isOn",
162
- "message": "@bind=data.isOn;",
163
- "description": "Bind the on/off status to the topic."
164
- },
165
- {
166
- "topic": "state/lightGroups/@bind=data.id;/action",
167
- "message": "@bind=data.action;"
168
- },
169
- {
170
- "topic": "state/lightGroups/@bind=data.id;/lightingTheme",
171
- "message": "@bind=data.lightingTheme;"
172
- },
173
- {
174
- "topic": "state/lightGroups/@bind=data.id;/type",
175
- "message": "@bind=data.type;"
176
- },
177
- {
178
- "topic": "state/lightGroups/@bind=data.id;/endTime",
179
- "message": "@bind=data.endTime;"
180
- }
181
- ]
182
- },
183
- {
184
- "name": "circuitGroup",
185
- "description": "Populate the circuitGroup topic",
186
- "topics": [
187
- {
188
- "topic": "state/circuitGroups/@bind=data.id;/name",
189
- "message": "@bind=data.name;",
190
- "description": "Bind name to the state topic."
191
- },
192
- {
193
- "topic": "state/circuitGroups/@bind=data.id;/isOn",
194
- "message": "@bind=data.isOn;",
195
- "description": "Bind the on/off status to the topic."
196
- },
197
- {
198
- "topic": "state/circuitGroups/@bind=data.id;/type",
199
- "message": "@bind=data.type;"
200
- },
201
- {
202
- "topic": "state/circuitGroups/@bind=data.id;/showInFeatures",
203
- "message": "@bind=data.showInFeatures;",
204
- "description": "Indicates whether the item should show in features."
205
- },
206
- {
207
- "topic": "state/circuitGroups/@bind=data.id;/endTime",
208
- "message": "@bind=data.showInFeatures;",
209
- "description": "Indicates end time for the circuitGroup (when it will turn off)."
210
- }
211
-
212
- ]
213
- },
214
- {
215
- "name": "virtualCircuit",
216
- "description": "Populate the virtual circuits topics",
217
- "topics": [
218
- {
219
- "topic": "state/virtualCircuits/@bind=data.id;/name",
220
- "message": "@bind=data.name;",
221
- "description": "Bind the name."
222
- },
223
- {
224
- "topic": "state/virtualCircuits/@bind=data.id;/isOn",
225
- "message": "@bind=data.isOn;",
226
- "description": "Bind the on/off status to the topic."
227
- },
228
- {
229
- "topic": "state/virtualCircuits/@bind=data.id;/type",
230
- "message": "@bind=data.type;",
231
- "description": "The type of circuit we are dealing with."
232
- }
233
- ]
234
- },
235
- {
236
- "name": "valve",
237
- "description": "Populate the valve topics",
238
- "topics": [
239
- {
240
- "topic": "state/valves/@bind=data.id;",
241
- "message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isDiverted?'\"on\"':'\"off\"';,\"isVirtual\":@bind=data.isVirtual? true: false;,\"pinId\": @bind=data.pinId;}",
242
- "description": "Bind 'on'/'off' as a message to the valve state topic.",
243
- "enabled": false
244
- },
245
- {
246
- "topic": "state/valves/@bind=data.id;/name",
247
- "message": "@bind=data.name;",
248
- "description": "The name of the valve"
249
- },
250
- {
251
- "topic": "state/valves/@bind=data.id;/type",
252
- "message": "@bind=data.type;",
253
- "description": "The type of valve we are dealing with."
254
- },
255
- {
256
- "topic": "state/valves/@bind=data.id;/isDiverted",
257
- "message": "@bind=data.isDiverted;",
258
- "description": "Indicates whether the valve is diverted"
259
- },
260
- {
261
- "topic": "state/valves/@bind=data.id;/isVirtual",
262
- "message": "@bind=data.isVirtual;",
263
- "description": "Indicates whether the valve is virtual"
264
- },
265
- {
266
- "topic": "state/valves/@bind=data.id;/isIntake",
267
- "message": "@bind=data.isIntake ? true : false;",
268
- "description": "Indicates whether the valve is for the intake in a shared system"
269
- },
270
- {
271
- "topic": "state/valves/@bind=data.id;/isReturn",
272
- "message": "@bind=data.isReturn ? true : false;",
273
- "description": "Indicates whether the valve is for the return in a shared system"
274
- },
275
- {
276
- "topic": "state/valves/@bind=data.id;/pinId",
277
- "message": "@bind=data.pinId;",
278
- "description": "The pin id that is set on the valve",
279
- "filter": "@bind=data.isVirtual === true;"
280
- }
281
- ]
282
- },
283
- {
284
- "name": "temps",
285
- "description": "Populate the temps topics",
286
- "topics": [
287
- {
288
- "topic": "state/temps/air",
289
- "message": "@bind=data.air;",
290
- "description": "Air temp."
291
- },
292
- {
293
- "topic": "state/temps/solar",
294
- "message": "@bind=data.solar;",
295
- "description": "Solar temp",
296
- "filter": "@bind=typeof data.solar !== 'undefined';"
297
- },
298
- {
299
- "topic": "state/temps/units",
300
- "message": "@bind=data.units;"
301
- }
302
- ]
303
- },
304
- {
305
- "name": "body",
306
- "description": "Populate the body topic",
307
- "filter": "@bind=data.isActive;",
308
- "topics": [
309
- {
310
- "topic": "state/temps/bodies/@bind=data.id;/name",
311
- "message": "@bind=data.name;",
312
- "description": "Bind 'on'/'off' as a message to the state topic."
313
- },
314
- {
315
- "topic": "state/temps/bodies/@bind=data.id;/type",
316
- "message": "@bind=data.type;",
317
- "description": "Bind 'on'/'off' as a message to the state topic."
318
- },
319
- {
320
- "topic": "state/temps/bodies/@bind=data.id;/isOn",
321
- "message": "@bind=data.isOn;",
322
- "description": "Bind 'on'/'off' as a message to the state topic."
323
- },
324
- {
325
- "topic": "state/temps/bodies/@bind=data.id;/circuit",
326
- "message": "@bind=data.circuit;",
327
- "description": "Bind the associated circuit."
328
- },
329
- {
330
- "topic": "state/temps/bodies/@bind=data.id;/heatMode",
331
- "message": "@bind=data.heatMode;",
332
- "description": "Heat mode."
333
- },
334
- {
335
- "topic": "state/temps/bodies/@bind=data.id;/heatStatus",
336
- "message": "@bind=data.heatStatus;",
337
- "description": "Heat status."
338
- },
339
- {
340
- "topic": "state/temps/bodies/@bind=data.id;/setPoint",
341
- "message": "@bind=data.setPoint;",
342
- "description": "Setpoint."
343
- },
344
- {
345
- "topic": "state/temps/bodies/@bind=data.id;/coolSetpoint",
346
- "message": "@bind=data.coolSetpoint;",
347
- "description": "Cool setpoint."
348
- },
349
- {
350
- "topic": "state/temps/bodies/@bind=data.id;/temp",
351
- "message": "@bind=data.temp;",
352
- "description": "Body Temp."
353
- }
354
- ]
355
- },
356
- {
357
- "name": "chlorinator",
358
- "description": "Populate the chlorinator topic",
359
- "topics": [
360
- {
361
- "topic": "state/chlorinators/@bind=data.id;/name",
362
- "message": "@bind=data.name;",
363
- "description": "Bind the name topic."
364
- },
365
- {
366
- "topic": "state/chlorinators/@bind=data.id;/isOn",
367
- "message": "@bind=data.currentOutput > 0;",
368
- "description": "Bind 'on'/'off' as a message to the state topic."
369
- },
370
- {
371
- "topic": "state/chlorinators/@bind=data.id;/currentOutput",
372
- "message": "@bind=data.currentOutput;",
373
- "description": "Send current output."
374
- },
375
- {
376
- "topic": "state/chlorinators/@bind=data.id;/poolSetpoint",
377
- "message": "@bind=data.poolSetpoint;",
378
- "description": "Send pool setpoint."
379
- },
380
- {
381
- "topic": "state/chlorinators/@bind=data.id;/spaSetpoint",
382
- "message": "@bind=data.spaSetpoint;",
383
- "description": "Send set point."
384
- },
385
- {
386
- "topic": "state/chlorinators/@bind=data.id;/status",
387
- "message": "@bind=data.status;",
388
- "description": "Send status."
389
- },
390
- {
391
- "topic": "state/chlorinators/@bind=data.id;/superChlor",
392
- "message": "@bind=data.superChlor;",
393
- "description": "Send superChlor."
394
- },
395
- {
396
- "topic": "state/chlorinators/@bind=data.id;/superChlorHours",
397
- "message": "@bind=data.superChlorHours;",
398
- "description": "Send superChlorHours."
399
- },
400
- {
401
- "topic": "state/chlorinators/@bind=data.id;/saltLevel",
402
- "message": "@bind=data.saltLevel;",
403
- "description": "Send salt level."
404
- },
405
- {
406
- "topic": "state/chlorinators/@bind=data.id;/type",
407
- "message": "@bind=data.type;",
408
- "description": "Send type."
409
- },
410
- {
411
- "topic": "state/chlorinators/@bind=data.id;/targetOutput",
412
- "message": "@bind=data.targetOutput;",
413
- "description": "Send targetOutput."
414
- }
415
- ]
416
- },
417
- {
418
- "name": "pump",
419
- "description": "Populate the pumps topic",
420
- "topics": [
421
- {
422
- "topic": "state/pumps/@bind=data.id;/name",
423
- "message": "@bind=data.name;",
424
- "description": "Bind name to the state topic."
425
- },
426
- {
427
- "topic": "state/pumps/@bind=data.id;/isOn",
428
- "message": "@bind=(data.rpm + data.flow > 0)?true:false;"
429
- },
430
- {
431
- "topic": "state/pumps/@bind=data.id;/rpm",
432
- "message": "@bind=data.rpm;"
433
- },
434
- {
435
- "topic": "state/pumps/@bind=data.id;/flow",
436
- "message": "@bind=data.flow;"
437
- },
438
- {
439
- "topic": "state/pumps/@bind=data.id;/watts",
440
- "message": "@bind=data.watts;"
441
- },
442
- {
443
- "topic": "state/pumps/@bind=data.id;/status",
444
- "message": "@bind=data.status;"
445
- }
446
- ]
447
- },
448
- {
449
- "name": "chemController",
450
- "description": "Populate the chemControllers topic",
451
- "vars": {
452
- "cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
453
- },
454
- "topics": [
455
- {
456
- "topic": "state/chemControllers/@bind=data.id;/name",
457
- "message": "@bind=data.name;",
458
- "enabled": true
459
- },
460
- {
461
- "topic": "state/chemControllers/@bind=data.id;/ph/tankLevel",
462
- "message": "@bind=data.ph.tank.level;",
463
- "enabled": true
464
- },
465
- {
466
- "topic": "state/chemControllers/@bind=data.id;/ph/setpoint",
467
- "message": "@bind=data.ph.setpoint;",
468
- "enabled": true
469
- },
470
- {
471
- "topic": "state/chemControllers/@bind=data.id;/ph/level",
472
- "message": "@bind=data.ph.level;",
473
- "enabled": true
474
- },
475
- {
476
- "topic": "state/chemControllers/@bind=data.id;/ph/doseTime",
477
- "message": "@bind=data.ph.doseTime;",
478
- "enabled": true
479
- },
480
- {
481
- "topic": "state/chemControllers/@bind=data.id;/ph/doseVolume",
482
- "message": "@bind=data.ph.doseVolume;",
483
- "enabled": true
484
- },
485
- {
486
- "topic": "state/chemControllers/@bind=data.id;/orp/tankLevel",
487
- "message": "@bind=data.orp.tank.level;",
488
- "enabled": true
489
- },
490
- {
491
- "topic": "state/chemControllers/@bind=data.id;/orp/setpoint",
492
- "message": "@bind=data.orp.setpoint;",
493
- "enabled": true
494
- },
495
- {
496
- "topic": "state/chemControllers/@bind=data.id;/orp/level",
497
- "message": "@bind=data.orp.level;",
498
- "enabled": true
499
- },
500
- {
501
- "topic": "state/chemControllers/@bind=data.id;/orp/doseTime",
502
- "message": "@bind=data.orp.doseTime;",
503
- "enabled": true
504
- },
505
- {
506
- "topic": "state/chemControllers/@bind=data.id;/orp/doseVolume",
507
- "message": "@bind=data.orp.doseVolume;",
508
- "enabled": true
509
- },
510
- {
511
- "topic": "state/chemControllers/@bind=data.id;/orp/saltLevel",
512
- "message": "@bind=data.orp.saltLevel;",
513
- "enabled": true
514
- },
515
- {
516
- "topic": "state/chemControllers/@bind=data.id;/saturationIndex",
517
- "message": "@bind=data.saturationIndex;"
518
- },
519
- {
520
- "topic": "state/chemControllers/@bind=data.id;/status",
521
- "message": "@bind=data.status;"
522
- },
523
- {
524
- "topic": "state/chemControllers/@bind=data.id;/type",
525
- "message": "@bind=data.type;"
526
- },
527
- {
528
- "topic": "config/chemControllers/@bind=data.id;/alkalinity",
529
- "message": "@bind=vars.cfg.alkalinity;"
530
- },
531
- {
532
- "topic": "config/chemControllers/@bind=data.id;/calciumHardness",
533
- "message": "@bind=vars.cfg.calciumHardness;"
534
- },
535
- {
536
- "topic": "config/chemControllers/@bind=data.id;/cyanuricAcid",
537
- "message": "@bind=vars.cfg.cyanuricAcid;"
538
- },
539
- {
540
- "topic": "config/chemControllers/@bind=data.id;/borates",
541
- "message": "@bind=vars.cfg.borates;"
542
- },
543
- {
544
- "topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/acidDemand",
545
- "message": "@bind=data.ph.demand;"
546
- },
547
- {
548
- "topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/orpDemand",
549
- "message": "@bind=data.orp.demand;"
550
- },
551
- {
552
- "topic": "state/chemControllers/@bind=data.id;/alarms/flow",
553
- "message": "@bind=data.alarms.flow;"
554
- },
555
- {
556
- "topic": "state/chemControllers/@bind=data.id;/alarms/ph",
557
- "message": "@bind=data.alarms.pH;"
558
- },
559
- {
560
- "topic": "state/chemControllers/@bind=data.id;/alarms/orp",
561
- "message": "@bind=data.alarms.orp;"
562
- },
563
- {
564
- "topic": "state/chemControllers/@bind=data.id;/alarms/phTank",
565
- "message": "@bind=data.alarms.pHTank;"
566
- },
567
- {
568
- "topic": "state/chemControllers/@bind=data.id;/alarms/orpTank",
569
- "message": "@bind=data.alarms.orpTank;"
570
- },
571
- {
572
- "topic": "state/chemControllers/@bind=data.id;/alarms/orpProbeFault",
573
- "message": "@bind=data.alarms.orpProbeFault;"
574
- },
575
- {
576
- "topic": "state/chemControllers/@bind=data.id;/alarms/pHProbeFault",
577
- "message": "@bind=data.alarms.pHProbeFault;"
578
- },
579
- {
580
- "topic": "state/chemControllers/@bind=data.id;/warnings/waterChemistry",
581
- "message": "@bind=data.warnings.waterChemistry;"
582
- },
583
- {
584
- "topic": "state/chemControllers/@bind=data.id;/warnings/pHLockout",
585
- "message": "@bind=data.warnings.pHLockout;"
586
- },
587
- {
588
- "topic": "state/chemControllers/@bind=data.id;/warnings/pHDailyLimitReached",
589
- "message": "@bind=data.warnings.pHDailyLimitReached;"
590
- },
591
- {
592
- "topic": "state/chemControllers/@bind=data.id;/warnings/orpDailyLimitReached",
593
- "message": "@bind=data.warnings.orpDailyLimitReached;"
594
- },
595
- {
596
- "topic": "state/chemControllers/@bind=data.id;/warnings/invalidSetup",
597
- "message": "@bind=data.warnings.invalidSetup;"
598
- },
599
- {
600
- "topic": "state/chemControllers/@bind=data.id;/warnings/chlorinatorCommError",
601
- "message": "@bind=data.warnings.chlorinatorCommError;"
602
- }
603
- ]
604
- },
605
- {
606
- "name": "chemicalDose",
607
- "description": "Event when a chemical is being dosed",
608
- "topics": [
609
- {
610
- "topic": "state/chemControllers/@bind=data.id;/@bind=data.chem;",
611
- "message": "@bind=data;",
612
- "enabled": true
613
- }
614
- ]
615
- },
616
- {
617
- "name": "filter",
618
- "description": "Populate the filter topic",
619
- "topics": [
620
- {
621
- "topic": "state/filters/@bind=data.id;/name",
622
- "message": "@bind=data.name;",
623
- "description": "Bind the name topic."
624
- },
625
- {
626
- "topic": "state/filters/@bind=data.id;/isOn",
627
- "message": "@bind=data.currentOutput > 0;",
628
- "description": "Bind 'on'/'off' as a message to the state topic."
629
- },
630
- {
631
- "topic": "state/filters/@bind=data.id;/body",
632
- "message": "@bind=data.body.desc;",
633
- "description": "Send body description."
634
- },
635
- {
636
- "topic": "state/filters/@bind=data.id;/cleanPercentage",
637
- "message": "@bind=data.cleanPercentage;",
638
- "description": "Send clean percentage."
639
- },
640
- {
641
- "topic": "state/filters/@bind=data.id;/filterType",
642
- "message": "@bind=data.filterType.desc;",
643
- "description": "Send filter type."
644
- },
645
- {
646
- "topic": "state/filters/@bind=data.id;/pressure",
647
- "message": "@bind=data.pressure;",
648
- "description": "Send pressure."
649
- },
650
- {
651
- "topic": "state/filters/@bind=data.id;/pressureUnits",
652
- "message": "@bind=data.pressureUnits.desc;",
653
- "description": "Send pressure units."
654
- },
655
- {
656
- "topic": "state/filters/@bind=data.id;/refPressure",
657
- "message": "@bind=data.refPressure;",
658
- "description": "Send reference pressure."
659
- }
660
- ]
661
- },
662
- {
663
- "name": "cover",
664
- "description": "Populate the cover topic",
665
- "topics": [
666
- {
667
- "topic": "state/covers/@bind=data.id;/name",
668
- "message": "@bind=data.name;",
669
- "description": "Bind the name topic."
670
- },
671
- {
672
- "topic": "state/covers/@bind=data.id;/isClosed",
673
- "message": "@bind=data.isClosed;",
674
- "description": "Bind isClosed as a message to the state topic."
675
- }
676
- ]
677
- },
678
- {
679
- "name": "*",
680
- "description": "DEFAULT: Sends the entire emitted response.",
681
- "body": "@bind=data;",
682
- "enabled": false
683
- }
684
- ]
1
+ {
2
+ "context": {
3
+ "name": "MQTT",
4
+ "options": {
5
+ "formatter": [
6
+ {
7
+ "transform": ".toLowerCase()"
8
+ },
9
+ {
10
+ "regexkey": "\\s",
11
+ "replace": "",
12
+ "description": "Remove whitespace"
13
+ },
14
+ {
15
+ "regexkey": "\\/",
16
+ "replace": "",
17
+ "description": "Remove /"
18
+ },
19
+ {
20
+ "regexkey": "\\+",
21
+ "replace": "",
22
+ "description": "Remove +"
23
+ },
24
+ {
25
+ "regexkey": "\\$",
26
+ "replace": "",
27
+ "description": "Remove $"
28
+ },
29
+ {
30
+ "regexkey": "\\#",
31
+ "replace": "",
32
+ "description": "Remove #"
33
+ }
34
+ ],
35
+ "rootTopic-DIRECTIONS": "You can override the root topic by renaming _rootTopic to rootTopic",
36
+ "_rootTopic": "@bind=(state.equipment.alias).replace(' ','-').replace('/','').toLowerCase();",
37
+ "clientId": "@bind='mqttjs_njsPC_'+Math.random().toString(16).substr(2, 8);"
38
+ }
39
+ },
40
+ "events": [
41
+ {
42
+ "name": "config",
43
+ "description": "Don't flood the MQTT bus.",
44
+ "enabled": false
45
+ },
46
+ {
47
+ "name": "controller",
48
+ "description": "Emit time every minute",
49
+ "enabled": true,
50
+ "topics": [
51
+ {
52
+ "topic": "state/time",
53
+ "message": "@bind=data.time;"
54
+ },
55
+ {
56
+ "topic": "alias",
57
+ "message": "@bind=data.alias;"
58
+ },
59
+ {
60
+ "topic": "state/status",
61
+ "message": "@bind=data.status;"
62
+ },
63
+ {
64
+ "topic": "state/mode",
65
+ "message": "@bind=data.mode;"
66
+ },
67
+ {
68
+ "topic": "state/startTime",
69
+ "message": "@bind=data.startTime;"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "name": "circuit",
75
+ "description": "Populate the circuits topics",
76
+ "topics": [
77
+ {
78
+ "topic": "state/circuits/@bind=data.id;/name",
79
+ "message": "@bind=data.name;",
80
+ "description": "Bind the name."
81
+ },
82
+ {
83
+ "topic": "state/circuits/@bind=data.id;/isOn",
84
+ "message": "@bind=data.isOn;",
85
+ "description": "Bind the on/off status to the topic."
86
+ },
87
+ {
88
+ "topic": "state/circuits/@bind=data.id;/type",
89
+ "message": "@bind=data.type;",
90
+ "description": "The type of circuit we are dealing with."
91
+ },
92
+ {
93
+ "topic": "state/circuits/@bind=data.id;/endTime",
94
+ "message": "@bind=data.endTime;",
95
+ "description": "The end time for the circuit."
96
+ },
97
+ {
98
+ "topic": "state/circuits/@bind=data.id;/lightingTheme",
99
+ "message": "@bind=data.lightingTheme;",
100
+ "description": "Bind the lighting theme to the topic.",
101
+ "filter": "@bind=data.type.isLight === true;"
102
+ },
103
+ {
104
+ "topic": "state/circuits/@bind=data.id;/showInFeatures",
105
+ "message": "@bind=data.showInFeatures;",
106
+ "description": "Indicates whether the item should show in features."
107
+ },
108
+ {
109
+ "topic": "state/circuits/@bind=data.id;/endTime",
110
+ "message": "@bind=data.endTime;",
111
+ "description": "Indicates end time for a circuit (when it will turn off)."
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "name": "feature",
117
+ "description": "Populate the features topics",
118
+ "topics": [
119
+ {
120
+ "topic": "state/features/@bind=data.id;/name",
121
+ "message": "@bind=data.name;",
122
+ "description": "Bind the name."
123
+ },
124
+ {
125
+ "topic": "state/features/@bind=data.id;/isOn",
126
+ "message": "@bind=data.isOn;",
127
+ "description": "Bind the on/off status to the topic."
128
+ },
129
+ {
130
+ "topic": "state/features/@bind=data.id;/endTime",
131
+ "message": "@bind=data.endTime;",
132
+ "description": "The end time for the feature."
133
+ },
134
+ {
135
+ "topic": "state/features/@bind=data.id;/type",
136
+ "message": "@bind=data.type;",
137
+ "description": "The type of feature we are dealing with."
138
+ },
139
+ {
140
+ "topic": "state/features/@bind=data.id;/showInFeatures",
141
+ "message": "@bind=data.showInFeatures;",
142
+ "description": "Indicates whether the item should show in features."
143
+ },
144
+ {
145
+ "topic": "state/features/@bind=data.id;/endTime",
146
+ "message": "@bind=data.endTime;",
147
+ "description": "Indicates end time for a features (when it will turn off)."
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ "name": "lightGroup",
153
+ "description": "Populate the lightGroup topic",
154
+ "topics": [
155
+ {
156
+ "topic": "state/lightGroups/@bind=data.id;/name",
157
+ "message": "@bind=data.name;",
158
+ "description": "Bind name to the state topic."
159
+ },
160
+ {
161
+ "topic": "state/lightGroups/@bind=data.id;/isOn",
162
+ "message": "@bind=data.isOn;",
163
+ "description": "Bind the on/off status to the topic."
164
+ },
165
+ {
166
+ "topic": "state/lightGroups/@bind=data.id;/action",
167
+ "message": "@bind=data.action;"
168
+ },
169
+ {
170
+ "topic": "state/lightGroups/@bind=data.id;/lightingTheme",
171
+ "message": "@bind=data.lightingTheme;"
172
+ },
173
+ {
174
+ "topic": "state/lightGroups/@bind=data.id;/type",
175
+ "message": "@bind=data.type;"
176
+ },
177
+ {
178
+ "topic": "state/lightGroups/@bind=data.id;/endTime",
179
+ "message": "@bind=data.endTime;"
180
+ }
181
+ ]
182
+ },
183
+ {
184
+ "name": "circuitGroup",
185
+ "description": "Populate the circuitGroup topic",
186
+ "topics": [
187
+ {
188
+ "topic": "state/circuitGroups/@bind=data.id;/name",
189
+ "message": "@bind=data.name;",
190
+ "description": "Bind name to the state topic."
191
+ },
192
+ {
193
+ "topic": "state/circuitGroups/@bind=data.id;/isOn",
194
+ "message": "@bind=data.isOn;",
195
+ "description": "Bind the on/off status to the topic."
196
+ },
197
+ {
198
+ "topic": "state/circuitGroups/@bind=data.id;/type",
199
+ "message": "@bind=data.type;"
200
+ },
201
+ {
202
+ "topic": "state/circuitGroups/@bind=data.id;/showInFeatures",
203
+ "message": "@bind=data.showInFeatures;",
204
+ "description": "Indicates whether the item should show in features."
205
+ },
206
+ {
207
+ "topic": "state/circuitGroups/@bind=data.id;/endTime",
208
+ "message": "@bind=data.showInFeatures;",
209
+ "description": "Indicates end time for the circuitGroup (when it will turn off)."
210
+ }
211
+
212
+ ]
213
+ },
214
+ {
215
+ "name": "virtualCircuit",
216
+ "description": "Populate the virtual circuits topics",
217
+ "topics": [
218
+ {
219
+ "topic": "state/virtualCircuits/@bind=data.id;/name",
220
+ "message": "@bind=data.name;",
221
+ "description": "Bind the name."
222
+ },
223
+ {
224
+ "topic": "state/virtualCircuits/@bind=data.id;/isOn",
225
+ "message": "@bind=data.isOn;",
226
+ "description": "Bind the on/off status to the topic."
227
+ },
228
+ {
229
+ "topic": "state/virtualCircuits/@bind=data.id;/type",
230
+ "message": "@bind=data.type;",
231
+ "description": "The type of circuit we are dealing with."
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "name": "valve",
237
+ "description": "Populate the valve topics",
238
+ "topics": [
239
+ {
240
+ "topic": "state/valves/@bind=data.id;",
241
+ "message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isDiverted?'\"on\"':'\"off\"';,\"isVirtual\":@bind=data.isVirtual? true: false;,\"pinId\": @bind=data.pinId;}",
242
+ "description": "Bind 'on'/'off' as a message to the valve state topic.",
243
+ "enabled": false
244
+ },
245
+ {
246
+ "topic": "state/valves/@bind=data.id;/name",
247
+ "message": "@bind=data.name;",
248
+ "description": "The name of the valve"
249
+ },
250
+ {
251
+ "topic": "state/valves/@bind=data.id;/type",
252
+ "message": "@bind=data.type;",
253
+ "description": "The type of valve we are dealing with."
254
+ },
255
+ {
256
+ "topic": "state/valves/@bind=data.id;/isDiverted",
257
+ "message": "@bind=data.isDiverted;",
258
+ "description": "Indicates whether the valve is diverted"
259
+ },
260
+ {
261
+ "topic": "state/valves/@bind=data.id;/isVirtual",
262
+ "message": "@bind=data.isVirtual;",
263
+ "description": "Indicates whether the valve is virtual"
264
+ },
265
+ {
266
+ "topic": "state/valves/@bind=data.id;/isIntake",
267
+ "message": "@bind=data.isIntake ? true : false;",
268
+ "description": "Indicates whether the valve is for the intake in a shared system"
269
+ },
270
+ {
271
+ "topic": "state/valves/@bind=data.id;/isReturn",
272
+ "message": "@bind=data.isReturn ? true : false;",
273
+ "description": "Indicates whether the valve is for the return in a shared system"
274
+ },
275
+ {
276
+ "topic": "state/valves/@bind=data.id;/pinId",
277
+ "message": "@bind=data.pinId;",
278
+ "description": "The pin id that is set on the valve",
279
+ "filter": "@bind=data.isVirtual === true;"
280
+ }
281
+ ]
282
+ },
283
+ {
284
+ "name": "temps",
285
+ "description": "Populate the temps topics",
286
+ "topics": [
287
+ {
288
+ "topic": "state/temps/air",
289
+ "message": "@bind=data.air;",
290
+ "description": "Air temp."
291
+ },
292
+ {
293
+ "topic": "state/temps/solar",
294
+ "message": "@bind=data.solar;",
295
+ "description": "Solar temp",
296
+ "filter": "@bind=typeof data.solar !== 'undefined';"
297
+ },
298
+ {
299
+ "topic": "state/temps/solarSensor2",
300
+ "message": "@bind=data.solarSensor2;",
301
+ "description": "Solar temp",
302
+ "filter": "@bind=typeof data.solarSensor2 !== 'undefined';"
303
+ },
304
+ {
305
+ "topic": "state/temps/solarSensor3",
306
+ "message": "@bind=data.solarSensor3;",
307
+ "description": "Solar temp",
308
+ "filter": "@bind=typeof data.solarSensor3 !== 'undefined';"
309
+ },
310
+ {
311
+ "topic": "state/temps/solarSensor4",
312
+ "message": "@bind=data.solarSensor4;",
313
+ "description": "Solar temp",
314
+ "filter": "@bind=typeof data.solarSensor4 !== 'undefined';"
315
+ },
316
+ {
317
+ "topic": "state/temps/waterSensor1",
318
+ "message": "@bind=data.waterSensor1;",
319
+ "description": "Water temp sensor 1",
320
+ "filter": "@bind=typeof data.waterSensor1 !== 'undefined';"
321
+ },
322
+ {
323
+ "topic": "state/temps/waterSensor2",
324
+ "message": "@bind=data.waterSensor2;",
325
+ "description": "Water temp sensor 2",
326
+ "filter": "@bind=typeof data.waterSensor2 !== 'undefined';"
327
+ },
328
+ {
329
+ "topic": "state/temps/waterSensor3",
330
+ "message": "@bind=data.waterSensor3;",
331
+ "description": "Water temp sensor 3",
332
+ "filter": "@bind=typeof data.waterSensor3 !== 'undefined';"
333
+ },
334
+ {
335
+ "topic": "state/temps/waterSensor4",
336
+ "message": "@bind=data.waterSensor4;",
337
+ "description": "Water temp sensor 4",
338
+ "filter": "@bind=typeof data.waterSensor4 !== 'undefined';"
339
+ },
340
+ {
341
+ "topic": "state/temps/units",
342
+ "message": "@bind=data.units;"
343
+ }
344
+ ]
345
+ },
346
+ {
347
+ "name": "body",
348
+ "description": "Populate the body topic",
349
+ "filter": "@bind=data.isActive;",
350
+ "topics": [
351
+ {
352
+ "topic": "state/temps/bodies/@bind=data.id;/name",
353
+ "message": "@bind=data.name;",
354
+ "description": "Bind 'on'/'off' as a message to the state topic."
355
+ },
356
+ {
357
+ "topic": "state/temps/bodies/@bind=data.id;/type",
358
+ "message": "@bind=data.type;",
359
+ "description": "Bind 'on'/'off' as a message to the state topic."
360
+ },
361
+ {
362
+ "topic": "state/temps/bodies/@bind=data.id;/isOn",
363
+ "message": "@bind=data.isOn;",
364
+ "description": "Bind 'on'/'off' as a message to the state topic."
365
+ },
366
+ {
367
+ "topic": "state/temps/bodies/@bind=data.id;/circuit",
368
+ "message": "@bind=data.circuit;",
369
+ "description": "Bind the associated circuit."
370
+ },
371
+ {
372
+ "topic": "state/temps/bodies/@bind=data.id;/heatMode",
373
+ "message": "@bind=data.heatMode;",
374
+ "description": "Heat mode."
375
+ },
376
+ {
377
+ "topic": "state/temps/bodies/@bind=data.id;/heatStatus",
378
+ "message": "@bind=data.heatStatus;",
379
+ "description": "Heat status."
380
+ },
381
+ {
382
+ "topic": "state/temps/bodies/@bind=data.id;/setPoint",
383
+ "message": "@bind=data.setPoint;",
384
+ "description": "Setpoint."
385
+ },
386
+ {
387
+ "topic": "state/temps/bodies/@bind=data.id;/coolSetpoint",
388
+ "message": "@bind=data.coolSetpoint;",
389
+ "description": "Cool setpoint."
390
+ },
391
+ {
392
+ "topic": "state/temps/bodies/@bind=data.id;/temp",
393
+ "message": "@bind=data.temp;",
394
+ "description": "Body Temp."
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "name": "chlorinator",
400
+ "description": "Populate the chlorinator topic",
401
+ "topics": [
402
+ {
403
+ "topic": "state/chlorinators/@bind=data.id;/name",
404
+ "message": "@bind=data.name;",
405
+ "description": "Bind the name topic."
406
+ },
407
+ {
408
+ "topic": "state/chlorinators/@bind=data.id;/isOn",
409
+ "message": "@bind=data.currentOutput > 0;",
410
+ "description": "Bind 'on'/'off' as a message to the state topic."
411
+ },
412
+ {
413
+ "topic": "state/chlorinators/@bind=data.id;/currentOutput",
414
+ "message": "@bind=data.currentOutput;",
415
+ "description": "Send current output."
416
+ },
417
+ {
418
+ "topic": "state/chlorinators/@bind=data.id;/poolSetpoint",
419
+ "message": "@bind=data.poolSetpoint;",
420
+ "description": "Send pool setpoint."
421
+ },
422
+ {
423
+ "topic": "state/chlorinators/@bind=data.id;/spaSetpoint",
424
+ "message": "@bind=data.spaSetpoint;",
425
+ "description": "Send set point."
426
+ },
427
+ {
428
+ "topic": "state/chlorinators/@bind=data.id;/status",
429
+ "message": "@bind=data.status;",
430
+ "description": "Send status."
431
+ },
432
+ {
433
+ "topic": "state/chlorinators/@bind=data.id;/superChlor",
434
+ "message": "@bind=data.superChlor;",
435
+ "description": "Send superChlor."
436
+ },
437
+ {
438
+ "topic": "state/chlorinators/@bind=data.id;/superChlorHours",
439
+ "message": "@bind=data.superChlorHours;",
440
+ "description": "Send superChlorHours."
441
+ },
442
+ {
443
+ "topic": "state/chlorinators/@bind=data.id;/saltLevel",
444
+ "message": "@bind=data.saltLevel;",
445
+ "description": "Send salt level."
446
+ },
447
+ {
448
+ "topic": "state/chlorinators/@bind=data.id;/type",
449
+ "message": "@bind=data.type;",
450
+ "description": "Send type."
451
+ },
452
+ {
453
+ "topic": "state/chlorinators/@bind=data.id;/model",
454
+ "message": "@bind=data.model;",
455
+ "description": "Send Model"
456
+ },
457
+ {
458
+ "topic": "state/chlorinators/@bind=data.id;/targetOutput",
459
+ "message": "@bind=data.targetOutput;",
460
+ "description": "Send targetOutput."
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "name": "pump",
466
+ "description": "Populate the pumps topic",
467
+ "topics": [
468
+ {
469
+ "topic": "state/pumps/@bind=data.id;/name",
470
+ "message": "@bind=data.name;",
471
+ "description": "Bind name to the state topic."
472
+ },
473
+ {
474
+ "topic": "state/pumps/@bind=data.id;/isOn",
475
+ "message": "@bind=(data.rpm + data.flow > 0)?true:false;"
476
+ },
477
+ {
478
+ "topic": "state/pumps/@bind=data.id;/rpm",
479
+ "message": "@bind=data.rpm;"
480
+ },
481
+ {
482
+ "topic": "state/pumps/@bind=data.id;/flow",
483
+ "message": "@bind=data.flow;"
484
+ },
485
+ {
486
+ "topic": "state/pumps/@bind=data.id;/watts",
487
+ "message": "@bind=data.watts;"
488
+ },
489
+ {
490
+ "topic": "state/pumps/@bind=data.id;/status",
491
+ "message": "@bind=data.status;"
492
+ }
493
+ ]
494
+ },
495
+ {
496
+ "name": "chemController",
497
+ "description": "Populate the chemControllers topic",
498
+ "vars": {
499
+ "cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
500
+ },
501
+ "topics": [
502
+ {
503
+ "topic": "state/chemControllers/@bind=data.id;/name",
504
+ "message": "@bind=data.name;",
505
+ "enabled": true
506
+ },
507
+ {
508
+ "topic": "state/chemControllers/@bind=data.id;/ph/tankLevel",
509
+ "message": "@bind=data.ph.tank.level;",
510
+ "enabled": true
511
+ },
512
+ {
513
+ "topic": "state/chemControllers/@bind=data.id;/ph/setpoint",
514
+ "message": "@bind=data.ph.setpoint;",
515
+ "enabled": true
516
+ },
517
+ {
518
+ "topic": "state/chemControllers/@bind=data.id;/ph/level",
519
+ "message": "@bind=data.ph.level;",
520
+ "enabled": true
521
+ },
522
+ {
523
+ "topic": "state/chemControllers/@bind=data.id;/ph/doseTime",
524
+ "message": "@bind=data.ph.doseTime;",
525
+ "enabled": true
526
+ },
527
+ {
528
+ "topic": "state/chemControllers/@bind=data.id;/ph/doseVolume",
529
+ "message": "@bind=data.ph.doseVolume;",
530
+ "enabled": true
531
+ },
532
+ {
533
+ "topic": "state/chemControllers/@bind=data.id;/orp/tankLevel",
534
+ "message": "@bind=data.orp.tank.level;",
535
+ "enabled": true
536
+ },
537
+ {
538
+ "topic": "state/chemControllers/@bind=data.id;/orp/setpoint",
539
+ "message": "@bind=data.orp.setpoint;",
540
+ "enabled": true
541
+ },
542
+ {
543
+ "topic": "state/chemControllers/@bind=data.id;/orp/level",
544
+ "message": "@bind=data.orp.level;",
545
+ "enabled": true
546
+ },
547
+ {
548
+ "topic": "state/chemControllers/@bind=data.id;/orp/doseTime",
549
+ "message": "@bind=data.orp.doseTime;",
550
+ "enabled": true
551
+ },
552
+ {
553
+ "topic": "state/chemControllers/@bind=data.id;/orp/doseVolume",
554
+ "message": "@bind=data.orp.doseVolume;",
555
+ "enabled": true
556
+ },
557
+ {
558
+ "topic": "state/chemControllers/@bind=data.id;/orp/saltLevel",
559
+ "message": "@bind=data.orp.saltLevel;",
560
+ "enabled": true
561
+ },
562
+ {
563
+ "topic": "state/chemControllers/@bind=data.id;/saturationIndex",
564
+ "message": "@bind=data.saturationIndex;"
565
+ },
566
+ {
567
+ "topic": "state/chemControllers/@bind=data.id;/status",
568
+ "message": "@bind=data.status;"
569
+ },
570
+ {
571
+ "topic": "state/chemControllers/@bind=data.id;/type",
572
+ "message": "@bind=data.type;"
573
+ },
574
+ {
575
+ "topic": "config/chemControllers/@bind=data.id;/alkalinity",
576
+ "message": "@bind=vars.cfg.alkalinity;"
577
+ },
578
+ {
579
+ "topic": "config/chemControllers/@bind=data.id;/calciumHardness",
580
+ "message": "@bind=vars.cfg.calciumHardness;"
581
+ },
582
+ {
583
+ "topic": "config/chemControllers/@bind=data.id;/cyanuricAcid",
584
+ "message": "@bind=vars.cfg.cyanuricAcid;"
585
+ },
586
+ {
587
+ "topic": "config/chemControllers/@bind=data.id;/borates",
588
+ "message": "@bind=vars.cfg.borates;"
589
+ },
590
+ {
591
+ "topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/acidDemand",
592
+ "message": "@bind=data.ph.demand;"
593
+ },
594
+ {
595
+ "topic": "state/chemControllers/@bind=data.id;/@bind=data.name;/orpDemand",
596
+ "message": "@bind=data.orp.demand;"
597
+ },
598
+ {
599
+ "topic": "state/chemControllers/@bind=data.id;/alarms/flow",
600
+ "message": "@bind=data.alarms.flow;"
601
+ },
602
+ {
603
+ "topic": "state/chemControllers/@bind=data.id;/alarms/ph",
604
+ "message": "@bind=data.alarms.pH;"
605
+ },
606
+ {
607
+ "topic": "state/chemControllers/@bind=data.id;/alarms/orp",
608
+ "message": "@bind=data.alarms.orp;"
609
+ },
610
+ {
611
+ "topic": "state/chemControllers/@bind=data.id;/alarms/phTank",
612
+ "message": "@bind=data.alarms.pHTank;"
613
+ },
614
+ {
615
+ "topic": "state/chemControllers/@bind=data.id;/alarms/orpTank",
616
+ "message": "@bind=data.alarms.orpTank;"
617
+ },
618
+ {
619
+ "topic": "state/chemControllers/@bind=data.id;/alarms/orpProbeFault",
620
+ "message": "@bind=data.alarms.orpProbeFault;"
621
+ },
622
+ {
623
+ "topic": "state/chemControllers/@bind=data.id;/alarms/pHProbeFault",
624
+ "message": "@bind=data.alarms.pHProbeFault;"
625
+ },
626
+ {
627
+ "topic": "state/chemControllers/@bind=data.id;/warnings/waterChemistry",
628
+ "message": "@bind=data.warnings.waterChemistry;"
629
+ },
630
+ {
631
+ "topic": "state/chemControllers/@bind=data.id;/warnings/pHLockout",
632
+ "message": "@bind=data.warnings.pHLockout;"
633
+ },
634
+ {
635
+ "topic": "state/chemControllers/@bind=data.id;/warnings/pHDailyLimitReached",
636
+ "message": "@bind=data.warnings.pHDailyLimitReached;"
637
+ },
638
+ {
639
+ "topic": "state/chemControllers/@bind=data.id;/warnings/orpDailyLimitReached",
640
+ "message": "@bind=data.warnings.orpDailyLimitReached;"
641
+ },
642
+ {
643
+ "topic": "state/chemControllers/@bind=data.id;/warnings/invalidSetup",
644
+ "message": "@bind=data.warnings.invalidSetup;"
645
+ },
646
+ {
647
+ "topic": "state/chemControllers/@bind=data.id;/warnings/chlorinatorCommError",
648
+ "message": "@bind=data.warnings.chlorinatorCommError;"
649
+ }
650
+ ]
651
+ },
652
+ {
653
+ "name": "chemicalDose",
654
+ "description": "Event when a chemical is being dosed",
655
+ "topics": [
656
+ {
657
+ "topic": "state/chemControllers/@bind=data.id;/@bind=data.chem;",
658
+ "message": "@bind=data;",
659
+ "enabled": true
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ "name": "filter",
665
+ "description": "Populate the filter topic",
666
+ "topics": [
667
+ {
668
+ "topic": "state/filters/@bind=data.id;/name",
669
+ "message": "@bind=data.name;",
670
+ "description": "Bind the name topic."
671
+ },
672
+ {
673
+ "topic": "state/filters/@bind=data.id;/isOn",
674
+ "message": "@bind=data.currentOutput > 0;",
675
+ "description": "Bind 'on'/'off' as a message to the state topic."
676
+ },
677
+ {
678
+ "topic": "state/filters/@bind=data.id;/body",
679
+ "message": "@bind=data.body.desc;",
680
+ "description": "Send body description."
681
+ },
682
+ {
683
+ "topic": "state/filters/@bind=data.id;/cleanPercentage",
684
+ "message": "@bind=data.cleanPercentage;",
685
+ "description": "Send clean percentage."
686
+ },
687
+ {
688
+ "topic": "state/filters/@bind=data.id;/filterType",
689
+ "message": "@bind=data.filterType.desc;",
690
+ "description": "Send filter type."
691
+ },
692
+ {
693
+ "topic": "state/filters/@bind=data.id;/pressure",
694
+ "message": "@bind=data.pressure;",
695
+ "description": "Send pressure."
696
+ },
697
+ {
698
+ "topic": "state/filters/@bind=data.id;/pressureUnits",
699
+ "message": "@bind=data.pressureUnits.desc;",
700
+ "description": "Send pressure units."
701
+ },
702
+ {
703
+ "topic": "state/filters/@bind=data.id;/refPressure",
704
+ "message": "@bind=data.refPressure;",
705
+ "description": "Send reference pressure."
706
+ }
707
+ ]
708
+ },
709
+ {
710
+ "name": "cover",
711
+ "description": "Populate the cover topic",
712
+ "topics": [
713
+ {
714
+ "topic": "state/covers/@bind=data.id;/name",
715
+ "message": "@bind=data.name;",
716
+ "description": "Bind the name topic."
717
+ },
718
+ {
719
+ "topic": "state/covers/@bind=data.id;/isClosed",
720
+ "message": "@bind=data.isClosed;",
721
+ "description": "Bind isClosed as a message to the state topic."
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "name": "*",
727
+ "description": "DEFAULT: Sends the entire emitted response.",
728
+ "body": "@bind=data;",
729
+ "enabled": false
730
+ }
731
+ ]
685
732
  }