nodejs-poolcontroller 7.6.0 → 7.6.1

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