nodejs-poolcontroller 7.6.0 → 7.6.1

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