nodejs-poolcontroller 7.6.1 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.eslintrc.json +44 -44
  2. package/.github/ISSUE_TEMPLATE/1-bug-report.yml +84 -0
  3. package/.github/ISSUE_TEMPLATE/2-docs.md +12 -0
  4. package/.github/ISSUE_TEMPLATE/3-proposal.md +28 -0
  5. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  6. package/CONTRIBUTING.md +74 -74
  7. package/Changelog +220 -215
  8. package/Dockerfile +17 -17
  9. package/Gruntfile.js +40 -40
  10. package/LICENSE +661 -661
  11. package/README.md +191 -191
  12. package/app.ts +1 -1
  13. package/config/Config.ts +14 -0
  14. package/config/VersionCheck.ts +2 -2
  15. package/controller/Constants.ts +2 -1
  16. package/controller/Equipment.ts +2484 -2459
  17. package/controller/Errors.ts +180 -180
  18. package/controller/Lockouts.ts +502 -436
  19. package/controller/State.ts +106 -30
  20. package/controller/boards/AquaLinkBoard.ts +1000 -0
  21. package/controller/boards/BoardFactory.ts +49 -45
  22. package/controller/boards/EasyTouchBoard.ts +2859 -2653
  23. package/controller/boards/IntelliCenterBoard.ts +4198 -4230
  24. package/controller/boards/IntelliComBoard.ts +63 -63
  25. package/controller/boards/IntelliTouchBoard.ts +273 -241
  26. package/controller/boards/NixieBoard.ts +1728 -1675
  27. package/controller/boards/SystemBoard.ts +4925 -4697
  28. package/controller/comms/Comms.ts +442 -479
  29. package/controller/comms/messages/Messages.ts +171 -25
  30. package/controller/comms/messages/config/ChlorinatorMessage.ts +5 -2
  31. package/controller/comms/messages/config/CircuitGroupMessage.ts +0 -0
  32. package/controller/comms/messages/config/CircuitMessage.ts +1 -0
  33. package/controller/comms/messages/config/ConfigMessage.ts +0 -0
  34. package/controller/comms/messages/config/CoverMessage.ts +0 -0
  35. package/controller/comms/messages/config/CustomNameMessage.ts +30 -30
  36. package/controller/comms/messages/config/EquipmentMessage.ts +0 -0
  37. package/controller/comms/messages/config/ExternalMessage.ts +0 -0
  38. package/controller/comms/messages/config/FeatureMessage.ts +0 -0
  39. package/controller/comms/messages/config/GeneralMessage.ts +0 -0
  40. package/controller/comms/messages/config/HeaterMessage.ts +142 -10
  41. package/controller/comms/messages/config/IntellichemMessage.ts +0 -0
  42. package/controller/comms/messages/config/OptionsMessage.ts +4 -21
  43. package/controller/comms/messages/config/PumpMessage.ts +53 -35
  44. package/controller/comms/messages/config/RemoteMessage.ts +0 -0
  45. package/controller/comms/messages/config/ScheduleMessage.ts +350 -347
  46. package/controller/comms/messages/config/SecurityMessage.ts +0 -0
  47. package/controller/comms/messages/config/ValveMessage.ts +1 -1
  48. package/controller/comms/messages/status/ChlorinatorStateMessage.ts +38 -86
  49. package/controller/comms/messages/status/EquipmentStateMessage.ts +58 -22
  50. package/controller/comms/messages/status/HeaterStateMessage.ts +116 -86
  51. package/controller/comms/messages/status/IntelliChemStateMessage.ts +445 -445
  52. package/controller/comms/messages/status/IntelliValveStateMessage.ts +35 -35
  53. package/controller/comms/messages/status/PumpStateMessage.ts +23 -1
  54. package/controller/comms/messages/status/VersionMessage.ts +0 -0
  55. package/controller/nixie/Nixie.ts +162 -162
  56. package/controller/nixie/NixieEquipment.ts +103 -103
  57. package/controller/nixie/bodies/Body.ts +120 -120
  58. package/controller/nixie/bodies/Filter.ts +135 -135
  59. package/controller/nixie/chemistry/ChemController.ts +2511 -2498
  60. package/controller/nixie/chemistry/Chlorinator.ts +363 -314
  61. package/controller/nixie/circuits/Circuit.ts +261 -248
  62. package/controller/nixie/heaters/Heater.ts +650 -648
  63. package/controller/nixie/pumps/Pump.ts +906 -661
  64. package/controller/nixie/schedules/Schedule.ts +313 -257
  65. package/controller/nixie/valves/Valve.ts +170 -170
  66. package/defaultConfig.json +306 -286
  67. package/logger/DataLogger.ts +448 -448
  68. package/logger/Logger.ts +0 -0
  69. package/package.json +56 -56
  70. package/tsconfig.json +25 -25
  71. package/web/Server.ts +92 -47
  72. package/web/bindings/aqualinkD.json +505 -0
  73. package/web/bindings/influxDB.json +1051 -1021
  74. package/web/bindings/mqtt.json +702 -654
  75. package/web/bindings/mqttAlt.json +731 -684
  76. package/web/bindings/rulesManager.json +54 -54
  77. package/web/bindings/smartThings-Hubitat.json +31 -31
  78. package/web/bindings/valveRelays.json +20 -20
  79. package/web/bindings/vera.json +25 -25
  80. package/web/interfaces/baseInterface.ts +137 -136
  81. package/web/interfaces/httpInterface.ts +145 -124
  82. package/web/interfaces/influxInterface.ts +276 -245
  83. package/web/interfaces/mqttInterface.ts +535 -475
  84. package/web/services/config/Config.ts +39 -18
  85. package/web/services/config/ConfigSocket.ts +0 -0
  86. package/web/services/state/State.ts +10 -0
  87. package/web/services/state/StateSocket.ts +4 -4
  88. package/web/services/utilities/Utilities.ts +44 -42
  89. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
  90. package/config copy.json +0 -300
  91. package/issue_template.md +0 -52
@@ -1,1022 +1,1052 @@
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": "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": "dose volume float",
419
+ "value": "@bind=data.orp.doseVolume;",
420
+ "type": "float"
421
+ },
422
+ {
423
+ "name": "dose volume remaining float",
424
+ "value": "@bind=data.orp.dosingVolumeRemaining;",
425
+ "type": "float"
426
+ },
427
+ {
428
+ "name": "tank level",
429
+ "value": "@bind=data.orp.tank.level;",
430
+ "type": "float"
431
+ },
432
+ {
433
+ "name": "tank capacity",
434
+ "value": "@bind=data.orp.tank.capacity;",
435
+ "type": "float"
436
+ },
437
+ {
438
+ "name": "dosing status",
439
+ "value": "@bind=data.orp.dosingStatus.val;",
440
+ "type": "int"
441
+ },
442
+ {
443
+ "name": "dosing method",
444
+ "value": "@bind=vars.cfg.orp.dosingMethod.val;",
445
+ "type": "int"
446
+ },
447
+ {
448
+ "name": "start delay",
449
+ "value": "@bind=vars.cfg.orp.startDelay;",
450
+ "type": "int"
451
+ },
452
+ {
453
+ "name": "max dosing time",
454
+ "value": "@bind=vars.cfg.orp.maxDosingTime;",
455
+ "type": "int"
456
+ },
457
+ {
458
+ "name": "max dosing volume",
459
+ "value": "@bind=vars.cfg.orp.maxDosingVolume;",
460
+ "type": "int"
461
+ },
462
+ {
463
+ "name": "max dosing volume float",
464
+ "value": "@bind=vars.cfg.orp.maxDosingVolume;",
465
+ "type": "float"
466
+ },
467
+ {
468
+ "name": "mixing time",
469
+ "value": "@bind=vars.cfg.orp.mixingTime;",
470
+ "type": "int"
471
+ },
472
+ {
473
+ "name": "flow readings only int",
474
+ "value": "@bind=vars.cfg.orp.flowReadingsOnly?1:0;",
475
+ "type": "int"
476
+ },
477
+ {
478
+ "name": "low tolerance",
479
+ "value": "@bind=vars.cfg.orp.tolerance.low;",
480
+ "type": "int"
481
+ },
482
+ {
483
+ "name": "high tolerance",
484
+ "value": "@bind=vars.cfg.orp.tolerance.high;",
485
+ "type": "int"
486
+ },
487
+ {
488
+ "name": "tolerance enabled int",
489
+ "value": "@bind=vars.cfg.orp.tolerance.enabled?1:0;",
490
+ "type": "int"
491
+ },
492
+ {
493
+ "name": "dose priority int",
494
+ "value": "@bind=data.orp.dosePriority?1:0;",
495
+ "type": "int"
496
+ },
497
+ {
498
+ "name": "flow only mixing int",
499
+ "value": "@bind=data.orp.flowOnlyMixing?1:0;",
500
+ "type": "int"
501
+ },
502
+ {
503
+ "name": "max daily volume",
504
+ "value": "@bind=data.orp.maxDailyVolume;",
505
+ "type": "int"
506
+ },
507
+ {
508
+ "name": "daily volume dosed",
509
+ "value": "@bind=data.ph.dailyVolumeDosed;",
510
+ "type": "int"
511
+ },
512
+ {
513
+ "name": "volume dosed",
514
+ "value": "@bind=data.ph.volumeDosed;",
515
+ "type": "int"
516
+ },
517
+ {
518
+ "name": "max daily volume float",
519
+ "value": "@bind=data.orp.maxDailyVolume;",
520
+ "type": "float"
521
+ },
522
+ {
523
+ "name": "daily volume dosed float",
524
+ "value": "@bind=data.ph.dailyVolumeDosed;",
525
+ "type": "float"
526
+ },
527
+ {
528
+ "name": "volume dosed float",
529
+ "value": "@bind=data.ph.volumeDosed;",
530
+ "type": "float"
531
+ },
532
+ {
533
+ "name": "orp demand",
534
+ "value": "@bind=data.orp.demand;",
535
+ "type": "int"
536
+ }
537
+ ]
538
+ },
539
+ {
540
+ "description": "Bind chemController emit",
541
+ "measurement": "chemControllersGen",
542
+ "storePrevState": true,
543
+ "tags": [
544
+ {
545
+ "name": "name",
546
+ "value": "@bind=data.name;"
547
+ },
548
+ {
549
+ "name": "id",
550
+ "value": "@bind=data.id;"
551
+ },
552
+ {
553
+ "name": "type",
554
+ "value": "@bind=data.type.desc;"
555
+ },
556
+ {
557
+ "name": "status",
558
+ "value": "@bind=data.status.desc;"
559
+ },
560
+ {
561
+ "name": "alarm: comms desc",
562
+ "value": "@bind=data.alarms.comms.desc;"
563
+ },
564
+ {
565
+ "name": "alarm: flow desc",
566
+ "value": "@bind=data.alarms.flow.desc;"
567
+ },
568
+ {
569
+ "name": "alarm: body fault desc",
570
+ "value": "@bind=data.alarms.bodyFault.desc;"
571
+ },
572
+ {
573
+ "name": "alarm: flow sensor fault desc",
574
+ "value": "@bind=data.alarms.flowSensorFault.desc;"
575
+ },
576
+ {
577
+ "name": "warning: orp daily limit reached desc",
578
+ "value": "@bind=data.warnings.orpDailyLimitReached.desc;"
579
+ },
580
+ {
581
+ "name": "warning: water chemistry desc",
582
+ "value": "@bind=data.warnings.waterChemistry.desc;"
583
+ }
584
+ ],
585
+ "fields": [
586
+ {
587
+ "name": "saturation index",
588
+ "value": "@bind=data.saturationIndex;",
589
+ "type": "float"
590
+ },
591
+ {
592
+ "name": "cyanuric acid",
593
+ "value": "@bind=vars.cfg.cyanuricAcid;",
594
+ "type": "int"
595
+ },
596
+ {
597
+ "name": "calcium hardness",
598
+ "value": "@bind=vars.cfg.calciumHardness;",
599
+ "type": "int"
600
+ },
601
+ {
602
+ "name": "alkalinity",
603
+ "value": "@bind=vars.cfg.alkalinity;",
604
+ "type": "int"
605
+ },
606
+ {
607
+ "name": "borates",
608
+ "value": "@bind=vars.cfg.borates;",
609
+ "type": "int"
610
+ },
611
+ {
612
+ "name": "flow detected",
613
+ "value": "@bind=data.flowDetected;",
614
+ "type": "float"
615
+ },
616
+ {
617
+ "name": "flow sensor state",
618
+ "value": "@bind=data.flowSensor.state;",
619
+ "type": "float"
620
+ },
621
+ {
622
+ "name": "alarm: comms",
623
+ "value": "@bind=data.alarms.comms.val;",
624
+ "type": "int"
625
+ },
626
+ {
627
+ "name": "alarm: flow",
628
+ "value": "@bind=data.alarms.flow.val;",
629
+ "type": "int"
630
+ },
631
+ {
632
+ "name": "alarm: body fault",
633
+ "value": "@bind=data.alarms.bodyFault.val;",
634
+ "type": "int"
635
+ },
636
+ {
637
+ "name": "alarm: flow sensor fault",
638
+ "value": "@bind=data.alarms.flowSensorFault.val;",
639
+ "type": "int"
640
+ },
641
+ {
642
+ "name": "warning: orp daily limit reached",
643
+ "value": "@bind=data.warnings.orpDailyLimitReached.val;",
644
+ "type": "int"
645
+ },
646
+ {
647
+ "name": "warning: pH daily limit reached",
648
+ "value": "@bind=data.warnings.pHDailyLimitReached.val;",
649
+ "type": "int"
650
+ },
651
+ {
652
+ "name": "warning: water chemistry",
653
+ "value": "@bind=data.warnings.waterChemistry.val;",
654
+ "type": "int"
655
+ },
656
+ {
657
+ "name": "lsi range low",
658
+ "value": "@bind=vars.cfg.lsiRange.low.val;",
659
+ "type": "int"
660
+ },
661
+ {
662
+ "name": "lsi range enabled",
663
+ "value": "@bind=vars.cfg.lsiRange.enabled?1:0;",
664
+ "type": "int"
665
+ },
666
+ {
667
+ "name": "lsi range high",
668
+ "value": "@bind=vars.cfg.lsiRange.high.val;",
669
+ "type": "int"
670
+ }
671
+ ]
672
+ }
673
+ ]
674
+ },
675
+ {
676
+ "name": "circuit",
677
+ "description": "Bind circuit emit",
678
+ "points": [
679
+ {
680
+ "measurement": "circuits",
681
+ "storePrevState": true,
682
+ "tags": [
683
+ {
684
+ "name": "name",
685
+ "value": "@bind=data.name;"
686
+ },
687
+ {
688
+ "name": "id",
689
+ "value": "@bind=data.id;"
690
+ },
691
+ {
692
+ "name": "type",
693
+ "value": "@bind=data.type.desc;"
694
+ }
695
+ ],
696
+ "fields": [
697
+ {
698
+ "name": "isOn",
699
+ "value": "@bind=data.isOn;",
700
+ "type": "boolean"
701
+ },
702
+ {
703
+ "name": "isOnVal",
704
+ "value": "@bind=data.isOn?1:0;",
705
+ "type": "integer"
706
+ }
707
+ ]
708
+ }
709
+ ]
710
+ },
711
+ {
712
+ "name": "feature",
713
+ "description": "Bind feature emit",
714
+ "points": [
715
+ {
716
+ "measurement": "circuits",
717
+ "storePrevState": true,
718
+ "tags": [
719
+ {
720
+ "name": "name",
721
+ "value": "@bind=data.name;"
722
+ },
723
+ {
724
+ "name": "id",
725
+ "value": "@bind=data.id;"
726
+ },
727
+ {
728
+ "name": "type",
729
+ "value": "@bind=data.type.desc;"
730
+ }
731
+ ],
732
+ "fields": [
733
+ {
734
+ "name": "isOn",
735
+ "value": "@bind=data.isOn;",
736
+ "type": "boolean"
737
+ },
738
+ {
739
+ "name": "isOnVal",
740
+ "value": "@bind=data.isOn?1:0;",
741
+ "type": "int"
742
+ }
743
+ ]
744
+ }
745
+ ]
746
+ },
747
+ {
748
+ "name": "virtualCircuit",
749
+ "description": "Bind virtualCircuit emit",
750
+ "points": [
751
+ {
752
+ "measurement": "circuits",
753
+ "storePrevState": true,
754
+ "tags": [
755
+ {
756
+ "name": "name",
757
+ "value": "@bind=data.name;"
758
+ },
759
+ {
760
+ "name": "id",
761
+ "value": "@bind=data.id;"
762
+ },
763
+ {
764
+ "name": "type",
765
+ "value": "@bind=data.type.desc;"
766
+ }
767
+ ],
768
+ "fields": [
769
+ {
770
+ "name": "isOn",
771
+ "value": "@bind=data.isOn;",
772
+ "type": "boolean"
773
+ },
774
+ {
775
+ "name": "isOnVal",
776
+ "value": "@bind=data.isOn?1:0;",
777
+ "type": "int"
778
+ }
779
+ ]
780
+ }
781
+ ]
782
+ },
783
+ {
784
+ "name": "lightGroup",
785
+ "description": "Bind lightGroup emit",
786
+ "points": [
787
+ {
788
+ "measurement": "circuits",
789
+ "storePrevState": true,
790
+ "tags": [
791
+ {
792
+ "name": "name",
793
+ "value": "@bind=data.name;"
794
+ },
795
+ {
796
+ "name": "id",
797
+ "value": "@bind=data.id;"
798
+ },
799
+ {
800
+ "name": "type",
801
+ "value": "@bind=data.type.desc;"
802
+ }
803
+ ],
804
+ "fields": [
805
+ {
806
+ "name": "isOn",
807
+ "value": "@bind=data.isOn;",
808
+ "type": "boolean"
809
+ },
810
+ {
811
+ "name": "isOnVal",
812
+ "value": "@bind=data.isOn?1:0;",
813
+ "type": "int"
814
+ }
815
+ ]
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ "name": "circuitGroup",
821
+ "description": "Bind circuitGroup emit",
822
+ "points": [
823
+ {
824
+ "measurement": "circuits",
825
+ "storePrevState": true,
826
+ "tags": [
827
+ {
828
+ "name": "name",
829
+ "value": "@bind=data.name;"
830
+ },
831
+ {
832
+ "name": "id",
833
+ "value": "@bind=data.id;"
834
+ },
835
+ {
836
+ "name": "type",
837
+ "value": "@bind=data.type.desc;"
838
+ }
839
+ ],
840
+ "fields": [
841
+ {
842
+ "name": "isOn",
843
+ "value": "@bind=data.isOn;",
844
+ "type": "boolean"
845
+ },
846
+ {
847
+ "name": "isOnVal",
848
+ "value": "@bind=data.isOn?1:0;",
849
+ "type": "int"
850
+ }
851
+ ]
852
+ }
853
+ ]
854
+ },
855
+ {
856
+ "name": "pump",
857
+ "description": "Pump state emit",
858
+ "points": [
859
+ {
860
+ "measurement": "pumps",
861
+ "tags": [
862
+ {
863
+ "name": "name",
864
+ "value": "@bind=data.name;"
865
+ },
866
+ {
867
+ "name": "id",
868
+ "value": "@bind=data.id;"
869
+ },
870
+ {
871
+ "name": "type",
872
+ "value": "@bind=data.type.desc;"
873
+ },
874
+ {
875
+ "name": "status",
876
+ "value": "@bind=data.status.desc;"
877
+ }
878
+ ],
879
+ "fields": [
880
+ {
881
+ "name": "rpm",
882
+ "value": "@bind=data.rpm;",
883
+ "type": "int"
884
+ },
885
+ {
886
+ "name": "gpm",
887
+ "value": "@bind=data.gpm;",
888
+ "type": "int"
889
+ },
890
+ {
891
+ "name": "flow",
892
+ "value": "@bind=data.flow;",
893
+ "type": "int"
894
+ },
895
+ {
896
+ "name": "watts",
897
+ "value": "@bind=data.watts;",
898
+ "type": "int"
899
+ }
900
+ ]
901
+ }
902
+ ]
903
+ },
904
+ {
905
+ "name": "chlorinator",
906
+ "description": "Bind circuit emit",
907
+ "points": [
908
+ {
909
+ "measurement": "chlorinators",
910
+ "tags": [
911
+ {
912
+ "name": "name",
913
+ "value": "@bind=data.name;"
914
+ },
915
+ {
916
+ "name": "id",
917
+ "value": "@bind=data.id;"
918
+ },
919
+ {
920
+ "name": "status",
921
+ "value": "@bind=data.status.desc;"
922
+ },
923
+ {
924
+ "name": "superChlor",
925
+ "value": "@bind=data.superChlor;"
926
+ },
927
+ {
928
+ "name": "superChlorHours",
929
+ "value": "@bind=data.superChlorHours;"
930
+ }
931
+ ],
932
+ "fields": [
933
+ {
934
+ "name": "currentOutput",
935
+ "value": "@bind=data.currentOutput;",
936
+ "type": "int"
937
+ },
938
+ {
939
+ "name": "poolSetpoint",
940
+ "value": "@bind=data.poolSetpoint;",
941
+ "type": "int"
942
+ },
943
+ {
944
+ "name": "saltLevel",
945
+ "value": "@bind=data.saltLevel;",
946
+ "type": "int"
947
+ },
948
+ {
949
+ "name": "spaSetpoint",
950
+ "value": "@bind=data.spaSetpoint;",
951
+ "type": "int"
952
+ },
953
+ {
954
+ "name": "target output",
955
+ "value": "@bind=data.targetOutput;",
956
+ "type": "int"
957
+ }
958
+ ]
959
+ }
960
+ ]
961
+ },
962
+ {
963
+ "name": "config",
964
+ "description": "Not used for updates",
965
+ "enabled": false
966
+ },
967
+ {
968
+ "name": "filter",
969
+ "description": "Bind filter to measurements",
970
+ "points": [
971
+ {
972
+ "measurement": "filter",
973
+ "tags": [
974
+ {
975
+ "name": "units",
976
+ "value": "@bind=data.pressureUnits.desc;"
977
+ },
978
+ {
979
+ "name": "filterType",
980
+ "value": "@bind=data.filterType.desc;"
981
+ },
982
+ {
983
+ "name": "body",
984
+ "value": "@bind=data.body.desc;"
985
+ },
986
+ {
987
+ "name": "name",
988
+ "value": "@bind=data.name;"
989
+ },
990
+ {
991
+ "name": "id",
992
+ "value": "@bind=data.id;"
993
+ }
994
+ ],
995
+ "fields": [
996
+ {
997
+ "name": "isOn",
998
+ "value": "@bind=data.isOn;",
999
+ "type": "boolean"
1000
+ },
1001
+ {
1002
+ "name": "isOnVal",
1003
+ "value": "@bind=data.isOn?1:0;",
1004
+ "type": "integer"
1005
+ },
1006
+ {
1007
+ "name": "pressure",
1008
+ "value": "@bind=data.pressure;",
1009
+ "type": "float"
1010
+ },
1011
+ {
1012
+ "name": "referencePressure",
1013
+ "value": "@bind=data.refPressure;",
1014
+ "type": "float"
1015
+ },
1016
+ {
1017
+ "name": "cleanPercentage",
1018
+ "value": "@bind=data.cleanPercentage;",
1019
+ "type": "float"
1020
+ }
1021
+ ]
1022
+ }
1023
+ ]
1024
+ },
1025
+ {
1026
+ "name": "cover",
1027
+ "description": "Bind cover to measurements",
1028
+ "points": [
1029
+ {
1030
+ "measurement": "cover",
1031
+ "tags": [
1032
+ {
1033
+ "name": "name",
1034
+ "value": "@bind=data.name;"
1035
+ },
1036
+ {
1037
+ "name": "id",
1038
+ "value": "@bind=data.id;"
1039
+ }
1040
+ ],
1041
+ "fields": [
1042
+ {
1043
+ "name": "isClosed",
1044
+ "value": "@bind=data.isClosed;",
1045
+ "type": "boolean"
1046
+ }
1047
+ ]
1048
+ }
1049
+ ]
1050
+ }
1051
+ ]
1022
1052
  }