nodejs-poolcontroller 8.1.2 → 8.4.0

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