nodejs-poolcontroller 7.6.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.eslintrc.json +36 -45
  2. package/.github/ISSUE_TEMPLATE/1-bug-report.yml +84 -0
  3. package/.github/ISSUE_TEMPLATE/2-docs.md +12 -0
  4. package/.github/ISSUE_TEMPLATE/3-proposal.md +28 -0
  5. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  6. package/CONTRIBUTING.md +74 -74
  7. package/Changelog +242 -215
  8. package/Dockerfile +17 -17
  9. package/Gruntfile.js +40 -40
  10. package/LICENSE +661 -661
  11. package/README.md +195 -191
  12. package/anslq25/MessagesMock.ts +218 -0
  13. package/anslq25/boards/MockBoardFactory.ts +50 -0
  14. package/anslq25/boards/MockEasyTouchBoard.ts +696 -0
  15. package/anslq25/boards/MockSystemBoard.ts +217 -0
  16. package/anslq25/chemistry/MockChlorinator.ts +75 -0
  17. package/anslq25/pumps/MockPump.ts +84 -0
  18. package/app.ts +10 -14
  19. package/config/Config.ts +26 -8
  20. package/config/VersionCheck.ts +8 -4
  21. package/controller/Constants.ts +59 -25
  22. package/controller/Equipment.ts +2667 -2459
  23. package/controller/Errors.ts +181 -180
  24. package/controller/Lockouts.ts +534 -436
  25. package/controller/State.ts +596 -77
  26. package/controller/boards/AquaLinkBoard.ts +1003 -0
  27. package/controller/boards/BoardFactory.ts +53 -45
  28. package/controller/boards/EasyTouchBoard.ts +3079 -2653
  29. package/controller/boards/IntelliCenterBoard.ts +3821 -4230
  30. package/controller/boards/IntelliComBoard.ts +69 -63
  31. package/controller/boards/IntelliTouchBoard.ts +384 -241
  32. package/controller/boards/NixieBoard.ts +1871 -1675
  33. package/controller/boards/SunTouchBoard.ts +393 -0
  34. package/controller/boards/SystemBoard.ts +5244 -4697
  35. package/controller/comms/Comms.ts +905 -541
  36. package/controller/comms/ScreenLogic.ts +1663 -0
  37. package/controller/comms/messages/Messages.ts +382 -54
  38. package/controller/comms/messages/config/ChlorinatorMessage.ts +8 -4
  39. package/controller/comms/messages/config/CircuitGroupMessage.ts +5 -2
  40. package/controller/comms/messages/config/CircuitMessage.ts +82 -13
  41. package/controller/comms/messages/config/ConfigMessage.ts +3 -1
  42. package/controller/comms/messages/config/CoverMessage.ts +2 -1
  43. package/controller/comms/messages/config/CustomNameMessage.ts +31 -30
  44. package/controller/comms/messages/config/EquipmentMessage.ts +5 -1
  45. package/controller/comms/messages/config/ExternalMessage.ts +33 -3
  46. package/controller/comms/messages/config/FeatureMessage.ts +2 -1
  47. package/controller/comms/messages/config/GeneralMessage.ts +2 -1
  48. package/controller/comms/messages/config/HeaterMessage.ts +145 -11
  49. package/controller/comms/messages/config/IntellichemMessage.ts +2 -1
  50. package/controller/comms/messages/config/OptionsMessage.ts +16 -27
  51. package/controller/comms/messages/config/PumpMessage.ts +62 -47
  52. package/controller/comms/messages/config/RemoteMessage.ts +80 -13
  53. package/controller/comms/messages/config/ScheduleMessage.ts +390 -347
  54. package/controller/comms/messages/config/SecurityMessage.ts +2 -1
  55. package/controller/comms/messages/config/ValveMessage.ts +44 -27
  56. package/controller/comms/messages/status/ChlorinatorStateMessage.ts +44 -91
  57. package/controller/comms/messages/status/EquipmentStateMessage.ts +139 -30
  58. package/controller/comms/messages/status/HeaterStateMessage.ts +135 -86
  59. package/controller/comms/messages/status/IntelliChemStateMessage.ts +448 -445
  60. package/controller/comms/messages/status/IntelliValveStateMessage.ts +36 -35
  61. package/controller/comms/messages/status/PumpStateMessage.ts +92 -2
  62. package/controller/comms/messages/status/VersionMessage.ts +2 -1
  63. package/controller/nixie/Nixie.ts +173 -162
  64. package/controller/nixie/NixieEquipment.ts +104 -103
  65. package/controller/nixie/bodies/Body.ts +120 -120
  66. package/controller/nixie/bodies/Filter.ts +135 -135
  67. package/controller/nixie/chemistry/ChemController.ts +2682 -2498
  68. package/controller/nixie/chemistry/ChemDoser.ts +806 -0
  69. package/controller/nixie/chemistry/Chlorinator.ts +367 -314
  70. package/controller/nixie/circuits/Circuit.ts +402 -248
  71. package/controller/nixie/heaters/Heater.ts +815 -649
  72. package/controller/nixie/pumps/Pump.ts +934 -661
  73. package/controller/nixie/schedules/Schedule.ts +319 -257
  74. package/controller/nixie/valves/Valve.ts +170 -170
  75. package/defaultConfig.json +346 -286
  76. package/logger/DataLogger.ts +448 -448
  77. package/logger/Logger.ts +38 -9
  78. package/package.json +60 -56
  79. package/tsconfig.json +25 -25
  80. package/web/Server.ts +275 -117
  81. package/web/bindings/aqualinkD.json +560 -0
  82. package/web/bindings/homeassistant.json +437 -0
  83. package/web/bindings/influxDB.json +1066 -1021
  84. package/web/bindings/mqtt.json +721 -654
  85. package/web/bindings/mqttAlt.json +746 -684
  86. package/web/bindings/rulesManager.json +54 -54
  87. package/web/bindings/smartThings-Hubitat.json +31 -31
  88. package/web/bindings/valveRelays.json +20 -20
  89. package/web/bindings/vera.json +25 -25
  90. package/web/interfaces/baseInterface.ts +188 -136
  91. package/web/interfaces/httpInterface.ts +148 -124
  92. package/web/interfaces/influxInterface.ts +283 -245
  93. package/web/interfaces/mqttInterface.ts +695 -475
  94. package/web/interfaces/ruleInterface.ts +87 -0
  95. package/web/services/config/Config.ts +177 -49
  96. package/web/services/config/ConfigSocket.ts +2 -1
  97. package/web/services/state/State.ts +154 -3
  98. package/web/services/state/StateSocket.ts +69 -18
  99. package/web/services/utilities/Utilities.ts +232 -42
  100. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
  101. package/config copy.json +0 -300
  102. package/issue_template.md +0 -52
@@ -1,1022 +1,1067 @@
1
- {
2
- "context": {
3
- "name": "InfluxDB",
4
- "options": {
5
- "tags": [
6
- {
7
- "name": "sourceIP",
8
- "value": "@bind=webApp.ip();"
9
- },
10
- {
11
- "name": "sourceApp",
12
- "value": "njspc"
13
- }
14
- ]
15
- }
16
- },
17
- "events": [
18
- {
19
- "name": "temps",
20
- "description": "Bind temperatures to measurements",
21
- "points": [
22
- {
23
- "measurement": "ambientTemps",
24
- "tags": [
25
- {
26
- "name": "units",
27
- "value": "@bind=data.units.desc;"
28
- }
29
- ],
30
- "fields": [
31
- {
32
- "name": "airTemp",
33
- "value": "@bind=data.air;",
34
- "type": "int"
35
- },
36
- {
37
- "name": "solarTemp",
38
- "value": "@bind=data.solar;",
39
- "type": "int"
40
- },
41
- {
42
- "name": "waterSensor1",
43
- "value": "@bind=data.waterSensor1;",
44
- "type": "float"
45
- },
46
- {
47
- "name": "waterSensor2",
48
- "value": "@bind=data.waterSensor2;",
49
- "type": "float"
50
- },
51
- {
52
- "name": "waterSensor3",
53
- "value": "@bind=data.waterSensor3;",
54
- "type": "float"
55
- },
56
- {
57
- "name": "waterSensor4",
58
- "value": "@bind=data.waterSensor4;",
59
- "type": "float"
60
- }
61
- ]
62
- }
63
- ]
64
- },
65
- {
66
- "name": "body",
67
- "description": "Bind bodies to measurements",
68
- "points": [
69
- {
70
- "measurement": "bodyTemps",
71
- "tags": [
72
- {
73
- "name": "heatMode",
74
- "value": "@bind=data.heatMode.desc;"
75
- },
76
- {
77
- "name": "heatStatus",
78
- "value": "@bind=data.heatStatus.desc;"
79
- },
80
- {
81
- "name": "body",
82
- "value": "@bind=data.name;"
83
- }
84
- ],
85
- "fields": [
86
- {
87
- "name": "@bind=data.name;",
88
- "value": "@bind=data.temp;",
89
- "type": "int"
90
- },
91
- {
92
- "name": "@bind=data.name+'.setPoint';",
93
- "value": "@bind=data.setPoint;",
94
- "type": "int"
95
- }
96
- ]
97
- }
98
- ]
99
- },
100
- {
101
- "name": "chemicalDose",
102
- "points": [
103
- {
104
- "measurement": "chemicalDose",
105
- "description": "Active doses recorded by chemical dosed",
106
- "series": {
107
- "value": "@bind=data.start;"
108
- },
109
- "tags": [
110
- {
111
- "name": "chemical",
112
- "value": "@bind=data.chem;"
113
- }
114
- ],
115
- "fields": [
116
- {
117
- "name": "volumeDosed",
118
- "value": "@bind=data.volumeDosed;",
119
- "type": "float"
120
- },
121
- {
122
- "name": "timeDosed",
123
- "value": "@bind=data.timeDosed;",
124
- "type": "float"
125
- },
126
- {
127
- "name": "id",
128
- "value": "@bind=data.id;",
129
- "type": "int"
130
- },
131
- {
132
- "name": "demand",
133
- "value": "@bind=data.demand;",
134
- "type": "float"
135
- },
136
- {
137
- "name": "setpoint",
138
- "value": "@bind=data.setpoint;",
139
- "type": "float"
140
- },
141
- {
142
- "name": "method",
143
- "value": "@bind=data.method;",
144
- "type": "string"
145
- },
146
- {
147
- "name": "status",
148
- "value": "@bind=data.status;",
149
- "type": "string"
150
- },
151
- {
152
- "name": "end",
153
- "value": "@bind=data.end;",
154
- "type": "date"
155
- }
156
- ]
157
- }
158
- ]
159
- },
160
- {
161
- "name": "chemController",
162
- "vars": {
163
- "cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
164
- },
165
- "points": [
166
- {
167
- "measurement": "chemControllersPh",
168
- "description": "Bind chemController emit and save pH",
169
- "tags": [
170
- {
171
- "name": "name",
172
- "value": "@bind=data.name;"
173
- },
174
- {
175
- "name": "id",
176
- "value": "@bind=data.id;"
177
- },
178
- {
179
- "name": "dosing status desc",
180
- "value": "@bind=data.ph.dosingStatus.desc;"
181
- },
182
- {
183
- "name": "dosing method desc",
184
- "value": "@bind=vars.cfg.ph.dosingMethod.desc;"
185
- }
186
- ],
187
- "fields": [
188
- {
189
- "name": "level",
190
- "value": "@bind=data.ph.level;",
191
- "type": "float"
192
- },
193
- {
194
- "name": "temperature",
195
- "value": "@bind=data.ph.probe.temperature;",
196
- "type": "float"
197
- },
198
- {
199
- "name": "setpoint",
200
- "value": "@bind=data.ph.setpoint;",
201
- "type": "float"
202
- },
203
- {
204
- "name": "dosing time",
205
- "value": "@bind=data.ph.doseTime;",
206
- "type": "float"
207
- },
208
- {
209
- "name": "pump is dosing",
210
- "value": "@bind=typeof data.ph.pump.isDosing !== 'undefined'?data.ph.pump.isDosing?1:0:0;",
211
- "type": "int"
212
- },
213
- {
214
- "name": "lockout",
215
- "value": "@bind=data.ph.lockout;",
216
- "type": "boolean"
217
- },
218
- {
219
- "name": "dose time remaining",
220
- "value": "@bind=data.ph.dosingTimeRemaining;",
221
- "type": "float"
222
- },
223
- {
224
- "name": "mix time remaining",
225
- "value": "@bind=data.ph.mixTimeRemaining;",
226
- "type": "float"
227
- },
228
- {
229
- "name": "delay time remaining",
230
- "value": "@bind=data.ph.delayTimeRemaining;",
231
- "type": "float"
232
- },
233
- {
234
- "name": "dose volume",
235
- "value": "@bind=data.ph.doseVolume;",
236
- "type": "int"
237
- },
238
- {
239
- "name": "dose volume remaining",
240
- "value": "@bind=data.ph.dosingVolumeRemaining;",
241
- "type": "int"
242
- },
243
- {
244
- "name": "tank level",
245
- "value": "@bind=data.ph.tank.level;",
246
- "type": "float"
247
- },
248
- {
249
- "name": "tank capacity",
250
- "value": "@bind=data.ph.tank.capacity;",
251
- "type": "float"
252
- },
253
- {
254
- "name": "dosing status",
255
- "value": "@bind=data.ph.dosingStatus.val;",
256
- "type": "int"
257
- },
258
- {
259
- "name": "dosing method",
260
- "value": "@bind=vars.cfg.dosingMethod;",
261
- "type": "int"
262
- },
263
- {
264
- "name": "start delay",
265
- "value": "@bind=vars.cfg.ph.startDelay;",
266
- "type": "int"
267
- },
268
- {
269
- "name": "max dosing time",
270
- "value": "@bind=data.ph.maxDosingTime;",
271
- "type": "int"
272
- },
273
- {
274
- "name": "max dosing volume",
275
- "value": "@bind=data.ph.maxDosingVolume;",
276
- "type": "int"
277
- },
278
- {
279
- "name": "mixing time",
280
- "value": "@bind=data.ph.mixingTime;",
281
- "type": "int"
282
- },
283
- {
284
- "name": "flow readings only int",
285
- "value": "@bind=vars.cfg.ph.flowReadingsOnly?1:0;",
286
- "type": "int"
287
- },
288
- {
289
- "name": "low tolerance",
290
- "value": "@bind=vars.cfg.ph.tolerance.low;",
291
- "type": "int"
292
- },
293
- {
294
- "name": "high tolerance",
295
- "value": "@bind=vars.cfg.ph.tolerance.high;",
296
- "type": "int"
297
- },
298
- {
299
- "name": "high threshold",
300
- "value": "@bind=vars.cfg.ph.tolerance.high;",
301
- "type": "float"
302
- },
303
- {
304
- "name": "low threshold",
305
- "value": "@bind=vars.cfg.ph.tolerance.low;",
306
- "type": "float"
307
- },
308
- {
309
- "name": "tolerance enabled int",
310
- "value": "@bind=vars.cfg.ph.tolerance.enabled?1:0;",
311
- "type": "int"
312
- },
313
- {
314
- "name": "dose priority int",
315
- "value": "@bind=vars.cfg.ph.dosePriority?1:0;",
316
- "type": "int"
317
- },
318
- {
319
- "name": "flow only mixing int",
320
- "value": "@bind=vars.cfg.ph.flowOnlyMixing?1:0;",
321
- "type": "int"
322
- },
323
- {
324
- "name": "max daily volume",
325
- "value": "@bind=vars.cfg.ph.maxDailyVolume;",
326
- "type": "int"
327
- },
328
- {
329
- "name": "daily volume dosed",
330
- "value": "@bind=data.ph.dailyVolumeDosed;",
331
- "type": "int"
332
- },
333
- {
334
- "name": "volume dosed",
335
- "value": "@bind=data.ph.volumeDosed;",
336
- "type": "int"
337
- },
338
- {
339
- "name": "acid demand",
340
- "value": "@bind=data.ph.demand;",
341
- "type": "int"
342
- }
343
- ]
344
- },
345
- {
346
- "measurement": "chemControllersOrp",
347
- "description": "Bind chemController emit and save orp",
348
- "tags": [
349
- {
350
- "name": "name",
351
- "value": "@bind=data.name;"
352
- },
353
- {
354
- "name": "id",
355
- "value": "@bind=data.id;"
356
- },
357
- {
358
- "name": "dosing status desc",
359
- "value": "@bind=data.orp.dosingStatus.desc;"
360
- },
361
- {
362
- "name": "dosing method desc",
363
- "value": "@bind=vars.cfg.orp.dosingMethod.desc;"
364
- }
365
- ],
366
- "fields": [
367
- {
368
- "name": "level",
369
- "value": "@bind=data.orp.level;",
370
- "type": "float"
371
- },
372
- {
373
- "name": "setpoint",
374
- "value": "@bind=data.orp.setpoint;",
375
- "type": "float"
376
- },
377
- {
378
- "name": "dosing time",
379
- "value": "@bind=data.orp.doseTime;",
380
- "type": "float"
381
- },
382
- {
383
- "name": "pump is dosing",
384
- "value": "@bind=typeof data.orp.pump.isDosing !== 'undefined'?data.orp.pump.isDosing?1:0:0;",
385
- "type": "int"
386
- },
387
- {
388
- "name": "lockout",
389
- "value": "@bind=data.orp.lockout;",
390
- "type": "boolean"
391
- },
392
- {
393
- "name": "pump dose time remaining",
394
- "value": "@bind=data.orp.dosingTimeRemaining;",
395
- "type": "float"
396
- },
397
- {
398
- "name": "mix time remaining",
399
- "value": "@bind=data.orp.mixTimeRemaining;",
400
- "type": "float"
401
- },
402
- {
403
- "name": "delay time remaining",
404
- "value": "@bind=data.orp.delayTimeRemaining;",
405
- "type": "float"
406
- },
407
- {
408
- "name": "dose volume",
409
- "value": "@bind=data.orp.doseVolume;",
410
- "type": "int"
411
- },
412
- {
413
- "name": "dose volume remaining",
414
- "value": "@bind=data.orp.dosingVolumeRemaining;",
415
- "type": "int"
416
- },
417
- {
418
- "name": "tank level",
419
- "value": "@bind=data.orp.tank.level;",
420
- "type": "float"
421
- },
422
- {
423
- "name": "tank capacity",
424
- "value": "@bind=data.orp.tank.capacity;",
425
- "type": "float"
426
- },
427
- {
428
- "name": "dosing status",
429
- "value": "@bind=data.orp.dosingStatus.val;",
430
- "type": "int"
431
- },
432
- {
433
- "name": "dosing method",
434
- "value": "@bind=vars.cfg.orp.dosingMethod.val;",
435
- "type": "int"
436
- },
437
- {
438
- "name": "start delay",
439
- "value": "@bind=vars.cfg.orp.startDelay;",
440
- "type": "int"
441
- },
442
- {
443
- "name": "max dosing time",
444
- "value": "@bind=vars.cfg.orp.maxDosingTime;",
445
- "type": "int"
446
- },
447
- {
448
- "name": "max dosing volume",
449
- "value": "@bind=vars.cfg.orp.maxDosingVolume;",
450
- "type": "int"
451
- },
452
- {
453
- "name": "mixing time",
454
- "value": "@bind=vars.cfg.orp.mixingTime;",
455
- "type": "int"
456
- },
457
- {
458
- "name": "flow readings only int",
459
- "value": "@bind=vars.cfg.orp.flowReadingsOnly?1:0;",
460
- "type": "int"
461
- },
462
- {
463
- "name": "low tolerance",
464
- "value": "@bind=vars.cfg.orp.tolerance.low;",
465
- "type": "int"
466
- },
467
- {
468
- "name": "high tolerance",
469
- "value": "@bind=vars.cfg.orp.tolerance.high;",
470
- "type": "int"
471
- },
472
- {
473
- "name": "tolerance enabled int",
474
- "value": "@bind=vars.cfg.orp.tolerance.enabled?1:0;",
475
- "type": "int"
476
- },
477
- {
478
- "name": "dose priority int",
479
- "value": "@bind=data.orp.dosePriority?1:0;",
480
- "type": "int"
481
- },
482
- {
483
- "name": "flow only mixing int",
484
- "value": "@bind=data.orp.flowOnlyMixing?1:0;",
485
- "type": "int"
486
- },
487
- {
488
- "name": "max daily volume",
489
- "value": "@bind=data.orp.maxDailyVolume;",
490
- "type": "int"
491
- },
492
- {
493
- "name": "daily volume dosed",
494
- "value": "@bind=data.ph.dailyVolumeDosed;",
495
- "type": "int"
496
- },
497
- {
498
- "name": "volume dosed",
499
- "value": "@bind=data.ph.volumeDosed;",
500
- "type": "int"
501
- },
502
- {
503
- "name": "orp demand",
504
- "value": "@bind=data.orp.demand;",
505
- "type": "int"
506
- }
507
- ]
508
- },
509
- {
510
- "description": "Bind chemController emit",
511
- "measurement": "chemControllersGen",
512
- "storePrevState": true,
513
- "tags": [
514
- {
515
- "name": "name",
516
- "value": "@bind=data.name;"
517
- },
518
- {
519
- "name": "id",
520
- "value": "@bind=data.id;"
521
- },
522
- {
523
- "name": "type",
524
- "value": "@bind=data.type.desc;"
525
- },
526
- {
527
- "name": "status",
528
- "value": "@bind=data.status.desc;"
529
- },
530
- {
531
- "name": "alarm: comms desc",
532
- "value": "@bind=data.alarms.comms.desc;"
533
- },
534
- {
535
- "name": "alarm: flow desc",
536
- "value": "@bind=data.alarms.flow.desc;"
537
- },
538
- {
539
- "name": "alarm: body fault desc",
540
- "value": "@bind=data.alarms.bodyFault.desc;"
541
- },
542
- {
543
- "name": "alarm: flow sensor fault desc",
544
- "value": "@bind=data.alarms.flowSensorFault.desc;"
545
- },
546
- {
547
- "name": "warning: orp daily limit reached desc",
548
- "value": "@bind=data.warnings.orpDailyLimitReached.desc;"
549
- },
550
- {
551
- "name": "warning: water chemistry desc",
552
- "value": "@bind=data.warnings.waterChemistry.desc;"
553
- }
554
- ],
555
- "fields": [
556
- {
557
- "name": "saturation index",
558
- "value": "@bind=data.saturationIndex;",
559
- "type": "float"
560
- },
561
- {
562
- "name": "cyanuric acid",
563
- "value": "@bind=vars.cfg.cyanuricAcid;",
564
- "type": "int"
565
- },
566
- {
567
- "name": "calcium hardness",
568
- "value": "@bind=vars.cfg.calciumHardness;",
569
- "type": "int"
570
- },
571
- {
572
- "name": "alkalinity",
573
- "value": "@bind=vars.cfg.alkalinity;",
574
- "type": "int"
575
- },
576
- {
577
- "name": "borates",
578
- "value": "@bind=vars.cfg.borates;",
579
- "type": "int"
580
- },
581
- {
582
- "name": "flow detected",
583
- "value": "@bind=data.flowDetected;",
584
- "type": "float"
585
- },
586
- {
587
- "name": "flow sensor state",
588
- "value": "@bind=data.flowSensor.state;",
589
- "type": "float"
590
- },
591
- {
592
- "name": "alarm: comms",
593
- "value": "@bind=data.alarms.comms.val;",
594
- "type": "int"
595
- },
596
- {
597
- "name": "alarm: flow",
598
- "value": "@bind=data.alarms.flow.val;",
599
- "type": "int"
600
- },
601
- {
602
- "name": "alarm: body fault",
603
- "value": "@bind=data.alarms.bodyFault.val;",
604
- "type": "int"
605
- },
606
- {
607
- "name": "alarm: flow sensor fault",
608
- "value": "@bind=data.alarms.flowSensorFault.val;",
609
- "type": "int"
610
- },
611
- {
612
- "name": "warning: orp daily limit reached",
613
- "value": "@bind=data.warnings.orpDailyLimitReached.val;",
614
- "type": "int"
615
- },
616
- {
617
- "name": "warning: pH daily limit reached",
618
- "value": "@bind=data.warnings.pHDailyLimitReached.val;",
619
- "type": "int"
620
- },
621
- {
622
- "name": "warning: water chemistry",
623
- "value": "@bind=data.warnings.waterChemistry.val;",
624
- "type": "int"
625
- },
626
- {
627
- "name": "lsi range low",
628
- "value": "@bind=vars.cfg.lsiRange.low.val;",
629
- "type": "int"
630
- },
631
- {
632
- "name": "lsi range enabled",
633
- "value": "@bind=vars.cfg.lsiRange.enabled?1:0;",
634
- "type": "int"
635
- },
636
- {
637
- "name": "lsi range high",
638
- "value": "@bind=vars.cfg.lsiRange.high.val;",
639
- "type": "int"
640
- }
641
- ]
642
- }
643
- ]
644
- },
645
- {
646
- "name": "circuit",
647
- "description": "Bind circuit emit",
648
- "points": [
649
- {
650
- "measurement": "circuits",
651
- "storePrevState": true,
652
- "tags": [
653
- {
654
- "name": "name",
655
- "value": "@bind=data.name;"
656
- },
657
- {
658
- "name": "id",
659
- "value": "@bind=data.id;"
660
- },
661
- {
662
- "name": "type",
663
- "value": "@bind=data.type.desc;"
664
- }
665
- ],
666
- "fields": [
667
- {
668
- "name": "isOn",
669
- "value": "@bind=data.isOn;",
670
- "type": "boolean"
671
- },
672
- {
673
- "name": "isOnVal",
674
- "value": "@bind=data.isOn?1:0;",
675
- "type": "integer"
676
- }
677
- ]
678
- }
679
- ]
680
- },
681
- {
682
- "name": "feature",
683
- "description": "Bind feature emit",
684
- "points": [
685
- {
686
- "measurement": "circuits",
687
- "storePrevState": true,
688
- "tags": [
689
- {
690
- "name": "name",
691
- "value": "@bind=data.name;"
692
- },
693
- {
694
- "name": "id",
695
- "value": "@bind=data.id;"
696
- },
697
- {
698
- "name": "type",
699
- "value": "@bind=data.type.desc;"
700
- }
701
- ],
702
- "fields": [
703
- {
704
- "name": "isOn",
705
- "value": "@bind=data.isOn;",
706
- "type": "boolean"
707
- },
708
- {
709
- "name": "isOnVal",
710
- "value": "@bind=data.isOn?1:0;",
711
- "type": "int"
712
- }
713
- ]
714
- }
715
- ]
716
- },
717
- {
718
- "name": "virtualCircuit",
719
- "description": "Bind virtualCircuit emit",
720
- "points": [
721
- {
722
- "measurement": "circuits",
723
- "storePrevState": true,
724
- "tags": [
725
- {
726
- "name": "name",
727
- "value": "@bind=data.name;"
728
- },
729
- {
730
- "name": "id",
731
- "value": "@bind=data.id;"
732
- },
733
- {
734
- "name": "type",
735
- "value": "@bind=data.type.desc;"
736
- }
737
- ],
738
- "fields": [
739
- {
740
- "name": "isOn",
741
- "value": "@bind=data.isOn;",
742
- "type": "boolean"
743
- },
744
- {
745
- "name": "isOnVal",
746
- "value": "@bind=data.isOn?1:0;",
747
- "type": "int"
748
- }
749
- ]
750
- }
751
- ]
752
- },
753
- {
754
- "name": "lightGroup",
755
- "description": "Bind lightGroup emit",
756
- "points": [
757
- {
758
- "measurement": "circuits",
759
- "storePrevState": true,
760
- "tags": [
761
- {
762
- "name": "name",
763
- "value": "@bind=data.name;"
764
- },
765
- {
766
- "name": "id",
767
- "value": "@bind=data.id;"
768
- },
769
- {
770
- "name": "type",
771
- "value": "@bind=data.type.desc;"
772
- }
773
- ],
774
- "fields": [
775
- {
776
- "name": "isOn",
777
- "value": "@bind=data.isOn;",
778
- "type": "boolean"
779
- },
780
- {
781
- "name": "isOnVal",
782
- "value": "@bind=data.isOn?1:0;",
783
- "type": "int"
784
- }
785
- ]
786
- }
787
- ]
788
- },
789
- {
790
- "name": "circuitGroup",
791
- "description": "Bind circuitGroup emit",
792
- "points": [
793
- {
794
- "measurement": "circuits",
795
- "storePrevState": true,
796
- "tags": [
797
- {
798
- "name": "name",
799
- "value": "@bind=data.name;"
800
- },
801
- {
802
- "name": "id",
803
- "value": "@bind=data.id;"
804
- },
805
- {
806
- "name": "type",
807
- "value": "@bind=data.type.desc;"
808
- }
809
- ],
810
- "fields": [
811
- {
812
- "name": "isOn",
813
- "value": "@bind=data.isOn;",
814
- "type": "boolean"
815
- },
816
- {
817
- "name": "isOnVal",
818
- "value": "@bind=data.isOn?1:0;",
819
- "type": "int"
820
- }
821
- ]
822
- }
823
- ]
824
- },
825
- {
826
- "name": "pump",
827
- "description": "Pump state emit",
828
- "points": [
829
- {
830
- "measurement": "pumps",
831
- "tags": [
832
- {
833
- "name": "name",
834
- "value": "@bind=data.name;"
835
- },
836
- {
837
- "name": "id",
838
- "value": "@bind=data.id;"
839
- },
840
- {
841
- "name": "type",
842
- "value": "@bind=data.type.desc;"
843
- },
844
- {
845
- "name": "status",
846
- "value": "@bind=data.status.desc;"
847
- }
848
- ],
849
- "fields": [
850
- {
851
- "name": "rpm",
852
- "value": "@bind=data.rpm;",
853
- "type": "int"
854
- },
855
- {
856
- "name": "gpm",
857
- "value": "@bind=data.gpm;",
858
- "type": "int"
859
- },
860
- {
861
- "name": "flow",
862
- "value": "@bind=data.flow;",
863
- "type": "int"
864
- },
865
- {
866
- "name": "watts",
867
- "value": "@bind=data.watts;",
868
- "type": "int"
869
- }
870
- ]
871
- }
872
- ]
873
- },
874
- {
875
- "name": "chlorinator",
876
- "description": "Bind circuit emit",
877
- "points": [
878
- {
879
- "measurement": "chlorinators",
880
- "tags": [
881
- {
882
- "name": "name",
883
- "value": "@bind=data.name;"
884
- },
885
- {
886
- "name": "id",
887
- "value": "@bind=data.id;"
888
- },
889
- {
890
- "name": "status",
891
- "value": "@bind=data.status.desc;"
892
- },
893
- {
894
- "name": "superChlor",
895
- "value": "@bind=data.superChlor;"
896
- },
897
- {
898
- "name": "superChlorHours",
899
- "value": "@bind=data.superChlorHours;"
900
- }
901
- ],
902
- "fields": [
903
- {
904
- "name": "currentOutput",
905
- "value": "@bind=data.currentOutput;",
906
- "type": "int"
907
- },
908
- {
909
- "name": "poolSetpoint",
910
- "value": "@bind=data.poolSetpoint;",
911
- "type": "int"
912
- },
913
- {
914
- "name": "saltLevel",
915
- "value": "@bind=data.saltLevel;",
916
- "type": "int"
917
- },
918
- {
919
- "name": "spaSetpoint",
920
- "value": "@bind=data.spaSetpoint;",
921
- "type": "int"
922
- },
923
- {
924
- "name": "target output",
925
- "value": "@bind=data.targetOutput;",
926
- "type": "int"
927
- }
928
- ]
929
- }
930
- ]
931
- },
932
- {
933
- "name": "config",
934
- "description": "Not used for updates",
935
- "enabled": false
936
- },
937
- {
938
- "name": "filter",
939
- "description": "Bind filter to measurements",
940
- "points": [
941
- {
942
- "measurement": "filter",
943
- "tags": [
944
- {
945
- "name": "units",
946
- "value": "@bind=data.pressureUnits.desc;"
947
- },
948
- {
949
- "name": "filterType",
950
- "value": "@bind=data.filterType.desc;"
951
- },
952
- {
953
- "name": "body",
954
- "value": "@bind=data.body.desc;"
955
- },
956
- {
957
- "name": "name",
958
- "value": "@bind=data.name;"
959
- },
960
- {
961
- "name": "id",
962
- "value": "@bind=data.id;"
963
- }
964
- ],
965
- "fields": [
966
- {
967
- "name": "isOn",
968
- "value": "@bind=data.isOn;",
969
- "type": "boolean"
970
- },
971
- {
972
- "name": "isOnVal",
973
- "value": "@bind=data.isOn?1:0;",
974
- "type": "integer"
975
- },
976
- {
977
- "name": "pressure",
978
- "value": "@bind=data.pressure;",
979
- "type": "float"
980
- },
981
- {
982
- "name": "referencePressure",
983
- "value": "@bind=data.refPressure;",
984
- "type": "float"
985
- },
986
- {
987
- "name": "cleanPercentage",
988
- "value": "@bind=data.cleanPercentage;",
989
- "type": "float"
990
- }
991
- ]
992
- }
993
- ]
994
- },
995
- {
996
- "name": "cover",
997
- "description": "Bind cover to measurements",
998
- "points": [
999
- {
1000
- "measurement": "cover",
1001
- "tags": [
1002
- {
1003
- "name": "name",
1004
- "value": "@bind=data.name;"
1005
- },
1006
- {
1007
- "name": "id",
1008
- "value": "@bind=data.id;"
1009
- }
1010
- ],
1011
- "fields": [
1012
- {
1013
- "name": "isClosed",
1014
- "value": "@bind=data.isClosed;",
1015
- "type": "boolean"
1016
- }
1017
- ]
1018
- }
1019
- ]
1020
- }
1021
- ]
1
+ {
2
+ "context": {
3
+ "name": "InfluxDB",
4
+ "options": {
5
+ "tags": [
6
+ {
7
+ "name": "sourceIP",
8
+ "value": "@bind=webApp.ip();"
9
+ },
10
+ {
11
+ "name": "sourceApp",
12
+ "value": "njspc"
13
+ }
14
+ ]
15
+ }
16
+ },
17
+ "events": [
18
+ {
19
+ "name": "temps",
20
+ "description": "Bind temperatures to measurements",
21
+ "points": [
22
+ {
23
+ "measurement": "ambientTemps",
24
+ "tags": [
25
+ {
26
+ "name": "units",
27
+ "value": "@bind=data.units.desc;"
28
+ }
29
+ ],
30
+ "fields": [
31
+ {
32
+ "name": "airTemp",
33
+ "value": "@bind=data.air;",
34
+ "type": "int"
35
+ },
36
+ {
37
+ "name": "solarTemp",
38
+ "value": "@bind=data.solar;",
39
+ "type": "int"
40
+ },
41
+ {
42
+ "name": "airTempF",
43
+ "value": "@bind=data.air;",
44
+ "type": "float"
45
+ },
46
+ {
47
+ "name": "solarTempF",
48
+ "value": "@bind=data.solar;",
49
+ "type": "float"
50
+ },
51
+ {
52
+ "name": "waterSensor1",
53
+ "value": "@bind=data.waterSensor1;",
54
+ "type": "float"
55
+ },
56
+ {
57
+ "name": "waterSensor2",
58
+ "value": "@bind=data.waterSensor2;",
59
+ "type": "float"
60
+ },
61
+ {
62
+ "name": "waterSensor3",
63
+ "value": "@bind=data.waterSensor3;",
64
+ "type": "float"
65
+ },
66
+ {
67
+ "name": "waterSensor4",
68
+ "value": "@bind=data.waterSensor4;",
69
+ "type": "float"
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ "name": "body",
77
+ "description": "Bind bodies to measurements",
78
+ "points": [
79
+ {
80
+ "measurement": "bodyTemps",
81
+ "tags": [
82
+ {
83
+ "name": "heatMode",
84
+ "value": "@bind=data.heatMode.desc;"
85
+ },
86
+ {
87
+ "name": "heatStatus",
88
+ "value": "@bind=data.heatStatus.desc;"
89
+ },
90
+ {
91
+ "name": "body",
92
+ "value": "@bind=data.name;"
93
+ }
94
+ ],
95
+ "fields": [
96
+ {
97
+ "name": "@bind=data.name;",
98
+ "value": "@bind=data.temp;",
99
+ "type": "int"
100
+ },
101
+ {
102
+ "name": "@bind=data.name+'F';",
103
+ "value": "@bind=data.temp;",
104
+ "type": "float"
105
+ },
106
+ {
107
+ "name": "@bind=data.name+'.setPoint';",
108
+ "value": "@bind=data.setPoint;",
109
+ "type": "int"
110
+ }
111
+ ]
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "name": "chemicalDose",
117
+ "points": [
118
+ {
119
+ "measurement": "chemicalDose",
120
+ "description": "Active doses recorded by chemical dosed",
121
+ "series": {
122
+ "value": "@bind=data.start;"
123
+ },
124
+ "tags": [
125
+ {
126
+ "name": "chemical",
127
+ "value": "@bind=data.chem;"
128
+ }
129
+ ],
130
+ "fields": [
131
+ {
132
+ "name": "volumeDosed",
133
+ "value": "@bind=data.volumeDosed;",
134
+ "type": "float"
135
+ },
136
+ {
137
+ "name": "timeDosed",
138
+ "value": "@bind=data.timeDosed;",
139
+ "type": "float"
140
+ },
141
+ {
142
+ "name": "id",
143
+ "value": "@bind=data.id;",
144
+ "type": "int"
145
+ },
146
+ {
147
+ "name": "demand",
148
+ "value": "@bind=data.demand;",
149
+ "type": "float"
150
+ },
151
+ {
152
+ "name": "setpoint",
153
+ "value": "@bind=data.setpoint;",
154
+ "type": "float"
155
+ },
156
+ {
157
+ "name": "method",
158
+ "value": "@bind=data.method;",
159
+ "type": "string"
160
+ },
161
+ {
162
+ "name": "status",
163
+ "value": "@bind=data.status;",
164
+ "type": "string"
165
+ },
166
+ {
167
+ "name": "end",
168
+ "value": "@bind=data.end;",
169
+ "type": "date"
170
+ }
171
+ ]
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "name": "chemController",
177
+ "vars": {
178
+ "cfg": "@bind=sys.chemControllers.getItemById(data.id).get();"
179
+ },
180
+ "points": [
181
+ {
182
+ "measurement": "chemControllersPh",
183
+ "description": "Bind chemController emit and save pH",
184
+ "tags": [
185
+ {
186
+ "name": "name",
187
+ "value": "@bind=data.name;"
188
+ },
189
+ {
190
+ "name": "id",
191
+ "value": "@bind=data.id;"
192
+ },
193
+ {
194
+ "name": "dosing status desc",
195
+ "value": "@bind=data.ph.dosingStatus.desc;"
196
+ },
197
+ {
198
+ "name": "dosing method desc",
199
+ "value": "@bind=vars.cfg.ph.dosingMethod.desc;"
200
+ }
201
+ ],
202
+ "fields": [
203
+ {
204
+ "name": "level",
205
+ "value": "@bind=data.ph.level;",
206
+ "type": "float"
207
+ },
208
+ {
209
+ "name": "temperature",
210
+ "value": "@bind=data.ph.probe.temperature;",
211
+ "type": "float"
212
+ },
213
+ {
214
+ "name": "setpoint",
215
+ "value": "@bind=data.ph.setpoint;",
216
+ "type": "float"
217
+ },
218
+ {
219
+ "name": "dosing time",
220
+ "value": "@bind=data.ph.doseTime;",
221
+ "type": "float"
222
+ },
223
+ {
224
+ "name": "pump is dosing",
225
+ "value": "@bind=typeof data.ph.pump.isDosing !== 'undefined'?data.ph.pump.isDosing?1:0:0;",
226
+ "type": "int"
227
+ },
228
+ {
229
+ "name": "lockout",
230
+ "value": "@bind=data.ph.lockout;",
231
+ "type": "boolean"
232
+ },
233
+ {
234
+ "name": "dose time remaining",
235
+ "value": "@bind=data.ph.dosingTimeRemaining;",
236
+ "type": "float"
237
+ },
238
+ {
239
+ "name": "mix time remaining",
240
+ "value": "@bind=data.ph.mixTimeRemaining;",
241
+ "type": "float"
242
+ },
243
+ {
244
+ "name": "delay time remaining",
245
+ "value": "@bind=data.ph.delayTimeRemaining;",
246
+ "type": "float"
247
+ },
248
+ {
249
+ "name": "dose volume",
250
+ "value": "@bind=data.ph.doseVolume;",
251
+ "type": "int"
252
+ },
253
+ {
254
+ "name": "dose volume remaining",
255
+ "value": "@bind=data.ph.dosingVolumeRemaining;",
256
+ "type": "int"
257
+ },
258
+ {
259
+ "name": "tank level",
260
+ "value": "@bind=data.ph.tank.level;",
261
+ "type": "float"
262
+ },
263
+ {
264
+ "name": "tank capacity",
265
+ "value": "@bind=data.ph.tank.capacity;",
266
+ "type": "float"
267
+ },
268
+ {
269
+ "name": "dosing status",
270
+ "value": "@bind=data.ph.dosingStatus.val;",
271
+ "type": "int"
272
+ },
273
+ {
274
+ "name": "dosing method",
275
+ "value": "@bind=vars.cfg.dosingMethod;",
276
+ "type": "int"
277
+ },
278
+ {
279
+ "name": "start delay",
280
+ "value": "@bind=vars.cfg.ph.startDelay;",
281
+ "type": "int"
282
+ },
283
+ {
284
+ "name": "max dosing time",
285
+ "value": "@bind=data.ph.maxDosingTime;",
286
+ "type": "int"
287
+ },
288
+ {
289
+ "name": "max dosing volume",
290
+ "value": "@bind=data.ph.maxDosingVolume;",
291
+ "type": "int"
292
+ },
293
+ {
294
+ "name": "mixing time",
295
+ "value": "@bind=data.ph.mixingTime;",
296
+ "type": "int"
297
+ },
298
+ {
299
+ "name": "flow readings only int",
300
+ "value": "@bind=vars.cfg.ph.flowReadingsOnly?1:0;",
301
+ "type": "int"
302
+ },
303
+ {
304
+ "name": "low tolerance",
305
+ "value": "@bind=vars.cfg.ph.tolerance.low;",
306
+ "type": "int"
307
+ },
308
+ {
309
+ "name": "high tolerance",
310
+ "value": "@bind=vars.cfg.ph.tolerance.high;",
311
+ "type": "int"
312
+ },
313
+ {
314
+ "name": "high threshold",
315
+ "value": "@bind=vars.cfg.ph.tolerance.high;",
316
+ "type": "float"
317
+ },
318
+ {
319
+ "name": "low threshold",
320
+ "value": "@bind=vars.cfg.ph.tolerance.low;",
321
+ "type": "float"
322
+ },
323
+ {
324
+ "name": "tolerance enabled int",
325
+ "value": "@bind=vars.cfg.ph.tolerance.enabled?1:0;",
326
+ "type": "int"
327
+ },
328
+ {
329
+ "name": "dose priority int",
330
+ "value": "@bind=vars.cfg.ph.dosePriority?1:0;",
331
+ "type": "int"
332
+ },
333
+ {
334
+ "name": "flow only mixing int",
335
+ "value": "@bind=vars.cfg.ph.flowOnlyMixing?1:0;",
336
+ "type": "int"
337
+ },
338
+ {
339
+ "name": "max daily volume",
340
+ "value": "@bind=vars.cfg.ph.maxDailyVolume;",
341
+ "type": "int"
342
+ },
343
+ {
344
+ "name": "daily volume dosed",
345
+ "value": "@bind=data.ph.dailyVolumeDosed;",
346
+ "type": "int"
347
+ },
348
+ {
349
+ "name": "volume dosed",
350
+ "value": "@bind=data.ph.volumeDosed;",
351
+ "type": "int"
352
+ },
353
+ {
354
+ "name": "acid demand",
355
+ "value": "@bind=data.ph.demand;",
356
+ "type": "int"
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "measurement": "chemControllersOrp",
362
+ "description": "Bind chemController emit and save orp",
363
+ "tags": [
364
+ {
365
+ "name": "name",
366
+ "value": "@bind=data.name;"
367
+ },
368
+ {
369
+ "name": "id",
370
+ "value": "@bind=data.id;"
371
+ },
372
+ {
373
+ "name": "dosing status desc",
374
+ "value": "@bind=data.orp.dosingStatus.desc;"
375
+ },
376
+ {
377
+ "name": "dosing method desc",
378
+ "value": "@bind=vars.cfg.orp.dosingMethod.desc;"
379
+ }
380
+ ],
381
+ "fields": [
382
+ {
383
+ "name": "level",
384
+ "value": "@bind=data.orp.level;",
385
+ "type": "float"
386
+ },
387
+ {
388
+ "name": "setpoint",
389
+ "value": "@bind=data.orp.setpoint;",
390
+ "type": "float"
391
+ },
392
+ {
393
+ "name": "dosing time",
394
+ "value": "@bind=data.orp.doseTime;",
395
+ "type": "float"
396
+ },
397
+ {
398
+ "name": "pump is dosing",
399
+ "value": "@bind=typeof data.orp.pump.isDosing !== 'undefined'?data.orp.pump.isDosing?1:0:0;",
400
+ "type": "int"
401
+ },
402
+ {
403
+ "name": "lockout",
404
+ "value": "@bind=data.orp.lockout;",
405
+ "type": "boolean"
406
+ },
407
+ {
408
+ "name": "pump dose time remaining",
409
+ "value": "@bind=data.orp.dosingTimeRemaining;",
410
+ "type": "float"
411
+ },
412
+ {
413
+ "name": "mix time remaining",
414
+ "value": "@bind=data.orp.mixTimeRemaining;",
415
+ "type": "float"
416
+ },
417
+ {
418
+ "name": "delay time remaining",
419
+ "value": "@bind=data.orp.delayTimeRemaining;",
420
+ "type": "float"
421
+ },
422
+ {
423
+ "name": "dose volume",
424
+ "value": "@bind=data.orp.doseVolume;",
425
+ "type": "int"
426
+ },
427
+ {
428
+ "name": "dose volume remaining",
429
+ "value": "@bind=data.orp.dosingVolumeRemaining;",
430
+ "type": "int"
431
+ },
432
+ {
433
+ "name": "dose volume float",
434
+ "value": "@bind=data.orp.doseVolume;",
435
+ "type": "float"
436
+ },
437
+ {
438
+ "name": "dose volume remaining float",
439
+ "value": "@bind=data.orp.dosingVolumeRemaining;",
440
+ "type": "float"
441
+ },
442
+ {
443
+ "name": "tank level",
444
+ "value": "@bind=data.orp.tank.level;",
445
+ "type": "float"
446
+ },
447
+ {
448
+ "name": "tank capacity",
449
+ "value": "@bind=data.orp.tank.capacity;",
450
+ "type": "float"
451
+ },
452
+ {
453
+ "name": "dosing status",
454
+ "value": "@bind=data.orp.dosingStatus.val;",
455
+ "type": "int"
456
+ },
457
+ {
458
+ "name": "dosing method",
459
+ "value": "@bind=vars.cfg.orp.dosingMethod.val;",
460
+ "type": "int"
461
+ },
462
+ {
463
+ "name": "start delay",
464
+ "value": "@bind=vars.cfg.orp.startDelay;",
465
+ "type": "int"
466
+ },
467
+ {
468
+ "name": "max dosing time",
469
+ "value": "@bind=vars.cfg.orp.maxDosingTime;",
470
+ "type": "int"
471
+ },
472
+ {
473
+ "name": "max dosing volume",
474
+ "value": "@bind=vars.cfg.orp.maxDosingVolume;",
475
+ "type": "int"
476
+ },
477
+ {
478
+ "name": "max dosing volume float",
479
+ "value": "@bind=vars.cfg.orp.maxDosingVolume;",
480
+ "type": "float"
481
+ },
482
+ {
483
+ "name": "mixing time",
484
+ "value": "@bind=vars.cfg.orp.mixingTime;",
485
+ "type": "int"
486
+ },
487
+ {
488
+ "name": "flow readings only int",
489
+ "value": "@bind=vars.cfg.orp.flowReadingsOnly?1:0;",
490
+ "type": "int"
491
+ },
492
+ {
493
+ "name": "low tolerance",
494
+ "value": "@bind=vars.cfg.orp.tolerance.low;",
495
+ "type": "int"
496
+ },
497
+ {
498
+ "name": "high tolerance",
499
+ "value": "@bind=vars.cfg.orp.tolerance.high;",
500
+ "type": "int"
501
+ },
502
+ {
503
+ "name": "tolerance enabled int",
504
+ "value": "@bind=vars.cfg.orp.tolerance.enabled?1:0;",
505
+ "type": "int"
506
+ },
507
+ {
508
+ "name": "dose priority int",
509
+ "value": "@bind=data.orp.dosePriority?1:0;",
510
+ "type": "int"
511
+ },
512
+ {
513
+ "name": "flow only mixing int",
514
+ "value": "@bind=data.orp.flowOnlyMixing?1:0;",
515
+ "type": "int"
516
+ },
517
+ {
518
+ "name": "max daily volume",
519
+ "value": "@bind=data.orp.maxDailyVolume;",
520
+ "type": "int"
521
+ },
522
+ {
523
+ "name": "daily volume dosed",
524
+ "value": "@bind=data.ph.dailyVolumeDosed;",
525
+ "type": "int"
526
+ },
527
+ {
528
+ "name": "volume dosed",
529
+ "value": "@bind=data.ph.volumeDosed;",
530
+ "type": "int"
531
+ },
532
+ {
533
+ "name": "max daily volume float",
534
+ "value": "@bind=data.orp.maxDailyVolume;",
535
+ "type": "float"
536
+ },
537
+ {
538
+ "name": "daily volume dosed float",
539
+ "value": "@bind=data.ph.dailyVolumeDosed;",
540
+ "type": "float"
541
+ },
542
+ {
543
+ "name": "volume dosed float",
544
+ "value": "@bind=data.ph.volumeDosed;",
545
+ "type": "float"
546
+ },
547
+ {
548
+ "name": "orp demand",
549
+ "value": "@bind=data.orp.demand;",
550
+ "type": "int"
551
+ }
552
+ ]
553
+ },
554
+ {
555
+ "description": "Bind chemController emit",
556
+ "measurement": "chemControllersGen",
557
+ "storePrevState": true,
558
+ "tags": [
559
+ {
560
+ "name": "name",
561
+ "value": "@bind=data.name;"
562
+ },
563
+ {
564
+ "name": "id",
565
+ "value": "@bind=data.id;"
566
+ },
567
+ {
568
+ "name": "type",
569
+ "value": "@bind=data.type.desc;"
570
+ },
571
+ {
572
+ "name": "status",
573
+ "value": "@bind=data.status.desc;"
574
+ },
575
+ {
576
+ "name": "alarm: comms desc",
577
+ "value": "@bind=data.alarms.comms.desc;"
578
+ },
579
+ {
580
+ "name": "alarm: flow desc",
581
+ "value": "@bind=data.alarms.flow.desc;"
582
+ },
583
+ {
584
+ "name": "alarm: body fault desc",
585
+ "value": "@bind=data.alarms.bodyFault.desc;"
586
+ },
587
+ {
588
+ "name": "alarm: flow sensor fault desc",
589
+ "value": "@bind=data.alarms.flowSensorFault.desc;"
590
+ },
591
+ {
592
+ "name": "warning: orp daily limit reached desc",
593
+ "value": "@bind=data.warnings.orpDailyLimitReached.desc;"
594
+ },
595
+ {
596
+ "name": "warning: water chemistry desc",
597
+ "value": "@bind=data.warnings.waterChemistry.desc;"
598
+ }
599
+ ],
600
+ "fields": [
601
+ {
602
+ "name": "saturation index",
603
+ "value": "@bind=data.saturationIndex;",
604
+ "type": "float"
605
+ },
606
+ {
607
+ "name": "cyanuric acid",
608
+ "value": "@bind=vars.cfg.cyanuricAcid;",
609
+ "type": "int"
610
+ },
611
+ {
612
+ "name": "calcium hardness",
613
+ "value": "@bind=vars.cfg.calciumHardness;",
614
+ "type": "int"
615
+ },
616
+ {
617
+ "name": "alkalinity",
618
+ "value": "@bind=vars.cfg.alkalinity;",
619
+ "type": "int"
620
+ },
621
+ {
622
+ "name": "borates",
623
+ "value": "@bind=vars.cfg.borates;",
624
+ "type": "int"
625
+ },
626
+ {
627
+ "name": "flow detected",
628
+ "value": "@bind=data.flowDetected;",
629
+ "type": "float"
630
+ },
631
+ {
632
+ "name": "flow sensor state",
633
+ "value": "@bind=data.flowSensor.state;",
634
+ "type": "float"
635
+ },
636
+ {
637
+ "name": "alarm: comms",
638
+ "value": "@bind=data.alarms.comms.val;",
639
+ "type": "int"
640
+ },
641
+ {
642
+ "name": "alarm: flow",
643
+ "value": "@bind=data.alarms.flow.val;",
644
+ "type": "int"
645
+ },
646
+ {
647
+ "name": "alarm: body fault",
648
+ "value": "@bind=data.alarms.bodyFault.val;",
649
+ "type": "int"
650
+ },
651
+ {
652
+ "name": "alarm: flow sensor fault",
653
+ "value": "@bind=data.alarms.flowSensorFault.val;",
654
+ "type": "int"
655
+ },
656
+ {
657
+ "name": "warning: orp daily limit reached",
658
+ "value": "@bind=data.warnings.orpDailyLimitReached.val;",
659
+ "type": "int"
660
+ },
661
+ {
662
+ "name": "warning: pH daily limit reached",
663
+ "value": "@bind=data.warnings.pHDailyLimitReached.val;",
664
+ "type": "int"
665
+ },
666
+ {
667
+ "name": "warning: water chemistry",
668
+ "value": "@bind=data.warnings.waterChemistry.val;",
669
+ "type": "int"
670
+ },
671
+ {
672
+ "name": "lsi range low",
673
+ "value": "@bind=vars.cfg.lsiRange.low.val;",
674
+ "type": "int"
675
+ },
676
+ {
677
+ "name": "lsi range enabled",
678
+ "value": "@bind=vars.cfg.lsiRange.enabled?1:0;",
679
+ "type": "int"
680
+ },
681
+ {
682
+ "name": "lsi range high",
683
+ "value": "@bind=vars.cfg.lsiRange.high.val;",
684
+ "type": "int"
685
+ }
686
+ ]
687
+ }
688
+ ]
689
+ },
690
+ {
691
+ "name": "circuit",
692
+ "description": "Bind circuit emit",
693
+ "points": [
694
+ {
695
+ "measurement": "circuits",
696
+ "storePrevState": true,
697
+ "tags": [
698
+ {
699
+ "name": "name",
700
+ "value": "@bind=data.name;"
701
+ },
702
+ {
703
+ "name": "id",
704
+ "value": "@bind=data.id;"
705
+ },
706
+ {
707
+ "name": "type",
708
+ "value": "@bind=data.type.desc;"
709
+ }
710
+ ],
711
+ "fields": [
712
+ {
713
+ "name": "isOn",
714
+ "value": "@bind=data.isOn;",
715
+ "type": "boolean"
716
+ },
717
+ {
718
+ "name": "isOnVal",
719
+ "value": "@bind=data.isOn?1:0;",
720
+ "type": "integer"
721
+ }
722
+ ]
723
+ }
724
+ ]
725
+ },
726
+ {
727
+ "name": "feature",
728
+ "description": "Bind feature emit",
729
+ "points": [
730
+ {
731
+ "measurement": "circuits",
732
+ "storePrevState": true,
733
+ "tags": [
734
+ {
735
+ "name": "name",
736
+ "value": "@bind=data.name;"
737
+ },
738
+ {
739
+ "name": "id",
740
+ "value": "@bind=data.id;"
741
+ },
742
+ {
743
+ "name": "type",
744
+ "value": "@bind=data.type.desc;"
745
+ }
746
+ ],
747
+ "fields": [
748
+ {
749
+ "name": "isOn",
750
+ "value": "@bind=data.isOn;",
751
+ "type": "boolean"
752
+ },
753
+ {
754
+ "name": "isOnVal",
755
+ "value": "@bind=data.isOn?1:0;",
756
+ "type": "int"
757
+ }
758
+ ]
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ "name": "virtualCircuit",
764
+ "description": "Bind virtualCircuit emit",
765
+ "points": [
766
+ {
767
+ "measurement": "circuits",
768
+ "storePrevState": true,
769
+ "tags": [
770
+ {
771
+ "name": "name",
772
+ "value": "@bind=data.name;"
773
+ },
774
+ {
775
+ "name": "id",
776
+ "value": "@bind=data.id;"
777
+ },
778
+ {
779
+ "name": "type",
780
+ "value": "@bind=data.type.desc;"
781
+ }
782
+ ],
783
+ "fields": [
784
+ {
785
+ "name": "isOn",
786
+ "value": "@bind=data.isOn;",
787
+ "type": "boolean"
788
+ },
789
+ {
790
+ "name": "isOnVal",
791
+ "value": "@bind=data.isOn?1:0;",
792
+ "type": "int"
793
+ }
794
+ ]
795
+ }
796
+ ]
797
+ },
798
+ {
799
+ "name": "lightGroup",
800
+ "description": "Bind lightGroup emit",
801
+ "points": [
802
+ {
803
+ "measurement": "circuits",
804
+ "storePrevState": true,
805
+ "tags": [
806
+ {
807
+ "name": "name",
808
+ "value": "@bind=data.name;"
809
+ },
810
+ {
811
+ "name": "id",
812
+ "value": "@bind=data.id;"
813
+ },
814
+ {
815
+ "name": "type",
816
+ "value": "@bind=data.type.desc;"
817
+ }
818
+ ],
819
+ "fields": [
820
+ {
821
+ "name": "isOn",
822
+ "value": "@bind=data.isOn;",
823
+ "type": "boolean"
824
+ },
825
+ {
826
+ "name": "isOnVal",
827
+ "value": "@bind=data.isOn?1:0;",
828
+ "type": "int"
829
+ }
830
+ ]
831
+ }
832
+ ]
833
+ },
834
+ {
835
+ "name": "circuitGroup",
836
+ "description": "Bind circuitGroup emit",
837
+ "points": [
838
+ {
839
+ "measurement": "circuits",
840
+ "storePrevState": true,
841
+ "tags": [
842
+ {
843
+ "name": "name",
844
+ "value": "@bind=data.name;"
845
+ },
846
+ {
847
+ "name": "id",
848
+ "value": "@bind=data.id;"
849
+ },
850
+ {
851
+ "name": "type",
852
+ "value": "@bind=data.type.desc;"
853
+ }
854
+ ],
855
+ "fields": [
856
+ {
857
+ "name": "isOn",
858
+ "value": "@bind=data.isOn;",
859
+ "type": "boolean"
860
+ },
861
+ {
862
+ "name": "isOnVal",
863
+ "value": "@bind=data.isOn?1:0;",
864
+ "type": "int"
865
+ }
866
+ ]
867
+ }
868
+ ]
869
+ },
870
+ {
871
+ "name": "pump",
872
+ "description": "Pump state emit",
873
+ "points": [
874
+ {
875
+ "measurement": "pumps",
876
+ "tags": [
877
+ {
878
+ "name": "name",
879
+ "value": "@bind=data.name;"
880
+ },
881
+ {
882
+ "name": "id",
883
+ "value": "@bind=data.id;"
884
+ },
885
+ {
886
+ "name": "type",
887
+ "value": "@bind=data.type.desc;"
888
+ },
889
+ {
890
+ "name": "status",
891
+ "value": "@bind=data.status.desc;"
892
+ }
893
+ ],
894
+ "fields": [
895
+ {
896
+ "name": "rpm",
897
+ "value": "@bind=data.rpm;",
898
+ "type": "int"
899
+ },
900
+ {
901
+ "name": "gpm",
902
+ "value": "@bind=data.gpm;",
903
+ "type": "int"
904
+ },
905
+ {
906
+ "name": "flow",
907
+ "value": "@bind=data.flow;",
908
+ "type": "int"
909
+ },
910
+ {
911
+ "name": "watts",
912
+ "value": "@bind=data.watts;",
913
+ "type": "int"
914
+ }
915
+ ]
916
+ }
917
+ ]
918
+ },
919
+ {
920
+ "name": "chlorinator",
921
+ "description": "Bind circuit emit",
922
+ "points": [
923
+ {
924
+ "measurement": "chlorinators",
925
+ "tags": [
926
+ {
927
+ "name": "name",
928
+ "value": "@bind=data.name;"
929
+ },
930
+ {
931
+ "name": "id",
932
+ "value": "@bind=data.id;"
933
+ },
934
+ {
935
+ "name": "status",
936
+ "value": "@bind=data.status.desc;"
937
+ },
938
+ {
939
+ "name": "superChlor",
940
+ "value": "@bind=data.superChlor;"
941
+ },
942
+ {
943
+ "name": "superChlorHours",
944
+ "value": "@bind=data.superChlorHours;"
945
+ }
946
+ ],
947
+ "fields": [
948
+ {
949
+ "name": "currentOutput",
950
+ "value": "@bind=data.currentOutput;",
951
+ "type": "int"
952
+ },
953
+ {
954
+ "name": "poolSetpoint",
955
+ "value": "@bind=data.poolSetpoint;",
956
+ "type": "int"
957
+ },
958
+ {
959
+ "name": "saltLevel",
960
+ "value": "@bind=data.saltLevel;",
961
+ "type": "int"
962
+ },
963
+ {
964
+ "name": "spaSetpoint",
965
+ "value": "@bind=data.spaSetpoint;",
966
+ "type": "int"
967
+ },
968
+ {
969
+ "name": "target output",
970
+ "value": "@bind=data.targetOutput;",
971
+ "type": "int"
972
+ }
973
+ ]
974
+ }
975
+ ]
976
+ },
977
+ {
978
+ "name": "config",
979
+ "description": "Not used for updates",
980
+ "enabled": false
981
+ },
982
+ {
983
+ "name": "filter",
984
+ "description": "Bind filter to measurements",
985
+ "points": [
986
+ {
987
+ "measurement": "filter",
988
+ "tags": [
989
+ {
990
+ "name": "units",
991
+ "value": "@bind=data.pressureUnits.desc;"
992
+ },
993
+ {
994
+ "name": "filterType",
995
+ "value": "@bind=data.filterType.desc;"
996
+ },
997
+ {
998
+ "name": "body",
999
+ "value": "@bind=data.body.desc;"
1000
+ },
1001
+ {
1002
+ "name": "name",
1003
+ "value": "@bind=data.name;"
1004
+ },
1005
+ {
1006
+ "name": "id",
1007
+ "value": "@bind=data.id;"
1008
+ }
1009
+ ],
1010
+ "fields": [
1011
+ {
1012
+ "name": "isOn",
1013
+ "value": "@bind=data.isOn;",
1014
+ "type": "boolean"
1015
+ },
1016
+ {
1017
+ "name": "isOnVal",
1018
+ "value": "@bind=data.isOn?1:0;",
1019
+ "type": "integer"
1020
+ },
1021
+ {
1022
+ "name": "pressure",
1023
+ "value": "@bind=data.pressure;",
1024
+ "type": "float"
1025
+ },
1026
+ {
1027
+ "name": "referencePressure",
1028
+ "value": "@bind=data.refPressure;",
1029
+ "type": "float"
1030
+ },
1031
+ {
1032
+ "name": "cleanPercentage",
1033
+ "value": "@bind=data.cleanPercentage;",
1034
+ "type": "float"
1035
+ }
1036
+ ]
1037
+ }
1038
+ ]
1039
+ },
1040
+ {
1041
+ "name": "cover",
1042
+ "description": "Bind cover to measurements",
1043
+ "points": [
1044
+ {
1045
+ "measurement": "cover",
1046
+ "tags": [
1047
+ {
1048
+ "name": "name",
1049
+ "value": "@bind=data.name;"
1050
+ },
1051
+ {
1052
+ "name": "id",
1053
+ "value": "@bind=data.id;"
1054
+ }
1055
+ ],
1056
+ "fields": [
1057
+ {
1058
+ "name": "isClosed",
1059
+ "value": "@bind=data.isClosed;",
1060
+ "type": "boolean"
1061
+ }
1062
+ ]
1063
+ }
1064
+ ]
1065
+ }
1066
+ ]
1022
1067
  }