nodejs-poolcontroller 7.3.1 → 7.6.1

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