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,685 +1,685 @@
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/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
+ ]
685
685
  }