nodejs-poolcontroller 7.5.1 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/1-bug-report.yml +84 -0
- package/.github/ISSUE_TEMPLATE/2-docs.md +12 -0
- package/.github/ISSUE_TEMPLATE/3-proposal.md +28 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/Changelog +19 -0
- package/Dockerfile +3 -3
- package/README.md +13 -8
- package/app.ts +1 -1
- package/config/Config.ts +38 -2
- package/config/VersionCheck.ts +27 -12
- package/controller/Constants.ts +2 -1
- package/controller/Equipment.ts +193 -9
- package/controller/Errors.ts +10 -0
- package/controller/Lockouts.ts +503 -0
- package/controller/State.ts +269 -64
- package/controller/boards/AquaLinkBoard.ts +1000 -0
- package/controller/boards/BoardFactory.ts +4 -0
- package/controller/boards/EasyTouchBoard.ts +468 -144
- package/controller/boards/IntelliCenterBoard.ts +466 -307
- package/controller/boards/IntelliTouchBoard.ts +37 -5
- package/controller/boards/NixieBoard.ts +671 -141
- package/controller/boards/SystemBoard.ts +1397 -641
- package/controller/comms/Comms.ts +462 -362
- package/controller/comms/messages/Messages.ts +174 -30
- package/controller/comms/messages/config/ChlorinatorMessage.ts +6 -3
- package/controller/comms/messages/config/CircuitMessage.ts +1 -0
- package/controller/comms/messages/config/ExternalMessage.ts +10 -8
- package/controller/comms/messages/config/HeaterMessage.ts +141 -29
- package/controller/comms/messages/config/OptionsMessage.ts +9 -2
- package/controller/comms/messages/config/PumpMessage.ts +53 -35
- package/controller/comms/messages/config/ScheduleMessage.ts +33 -25
- package/controller/comms/messages/config/ValveMessage.ts +2 -2
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +38 -86
- package/controller/comms/messages/status/EquipmentStateMessage.ts +59 -23
- package/controller/comms/messages/status/HeaterStateMessage.ts +57 -3
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +56 -8
- package/controller/comms/messages/status/PumpStateMessage.ts +23 -1
- package/controller/nixie/Nixie.ts +1 -1
- package/controller/nixie/bodies/Body.ts +3 -0
- package/controller/nixie/chemistry/ChemController.ts +164 -51
- package/controller/nixie/chemistry/Chlorinator.ts +137 -88
- package/controller/nixie/circuits/Circuit.ts +51 -19
- package/controller/nixie/heaters/Heater.ts +241 -31
- package/controller/nixie/pumps/Pump.ts +488 -206
- package/controller/nixie/schedules/Schedule.ts +91 -35
- package/controller/nixie/valves/Valve.ts +1 -1
- package/defaultConfig.json +20 -0
- package/package.json +21 -21
- package/web/Server.ts +94 -49
- package/web/bindings/aqualinkD.json +505 -0
- package/web/bindings/influxDB.json +71 -1
- package/web/bindings/mqtt.json +98 -39
- package/web/bindings/mqttAlt.json +59 -1
- package/web/interfaces/baseInterface.ts +1 -0
- package/web/interfaces/httpInterface.ts +23 -2
- package/web/interfaces/influxInterface.ts +45 -10
- package/web/interfaces/mqttInterface.ts +114 -54
- package/web/services/config/Config.ts +55 -132
- package/web/services/state/State.ts +81 -4
- package/web/services/state/StateSocket.ts +4 -4
- package/web/services/utilities/Utilities.ts +8 -6
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
- package/config copy.json +0 -300
- package/issue_template.md +0 -52
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
{
|
|
2
|
+
"context": {
|
|
3
|
+
"name": "AqualinkD",
|
|
4
|
+
"options": {
|
|
5
|
+
"formatter": [
|
|
6
|
+
{
|
|
7
|
+
"transform": ".toLowerCase()"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"regexkey": "\\s",
|
|
11
|
+
"replace": "",
|
|
12
|
+
"description": "Remove whitespace"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"regexkey": "\\/",
|
|
16
|
+
"replace": "",
|
|
17
|
+
"description": "Remove /"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"regexkey": "\\+",
|
|
21
|
+
"replace": "",
|
|
22
|
+
"description": "Remove +"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"regexkey": "\\$",
|
|
26
|
+
"replace": "",
|
|
27
|
+
"description": "Remove $"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"regexkey": "\\#",
|
|
31
|
+
"replace": "",
|
|
32
|
+
"description": "Remove #"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"rootTopic-DIRECTIONS": "You can override the root topic by renaming _rootTopic to rootTopic",
|
|
36
|
+
"_rootTopic": "@bind=(state.equipment.alias).replace(' ','-').replace('/','').toLowerCase();",
|
|
37
|
+
"clientId": "@bind='aqualinkd_njsPC_'+ Math.random().toString(16).substr(2, 8);"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"subscriptions": [
|
|
41
|
+
{
|
|
42
|
+
"topic": "Aux_1",
|
|
43
|
+
"description": "State of the Aux_1 circuit on AqualinkD",
|
|
44
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(2, parseInt(value, 10) === 1);" ]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"topic": "Aux_2",
|
|
48
|
+
"description": "State of the Aux_2 circuit on AqualinkD",
|
|
49
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(3, parseInt(value, 10) === 1);" ]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"topic": "Aux_3",
|
|
53
|
+
"description": "State of the Aux_3 circuit on AqualinkD",
|
|
54
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(4, parseInt(value, 10) === 1);" ]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"topic": "Aux_4",
|
|
58
|
+
"description": "State of the Aux_4 circuit on AqualinkD",
|
|
59
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(5, parseInt(value, 10) === 1);" ]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"topic": "Aux_5",
|
|
63
|
+
"description": "State of the Aux_5 circuit on AqualinkD",
|
|
64
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(7, parseInt(value, 10) === 1);" ]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"topic": "Aux_6",
|
|
68
|
+
"description": "State of the Aux_1 circuit on AqualinkD",
|
|
69
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(8, parseInt(value, 10) === 1);" ]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"topic": "Aux_7",
|
|
73
|
+
"description": "State of the Aux_7 circuit on AqualinkD",
|
|
74
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(9, parseInt(value, 10) === 1);" ]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"topic": "Aux_8",
|
|
78
|
+
"description": "State of the Aux_8 circuit on AqualinkD",
|
|
79
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(10, parseInt(value, 10) === 1);" ]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"topic": "Aux_B1",
|
|
83
|
+
"description": "State of the Aux_B1 feature on AqualinkD",
|
|
84
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(129, parseInt(value, 10) === 1);" ]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"topic": "Aux_B2",
|
|
88
|
+
"description": "State of the Aux_B2 feature on AqualinkD",
|
|
89
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(130, parseInt(value, 10) === 1);" ]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"topic": "Aux_B3",
|
|
93
|
+
"description": "State of the Aux_B3 feature on AqualinkD",
|
|
94
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(131, parseInt(value, 10) === 1);" ]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"topic": "Aux_B4",
|
|
98
|
+
"description": "State of the Aux_B4 feature on AqualinkD",
|
|
99
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(132, parseInt(value, 10) === 1);" ]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"topic": "Aux_B5",
|
|
103
|
+
"description": "State of the Aux_B5 feature on AqualinkD",
|
|
104
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(133, parseInt(value, 10) === 1);" ]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"topic": "Aux_B6",
|
|
108
|
+
"description": "State of the Aux_B6 feature on AqualinkD",
|
|
109
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(134, parseInt(value, 10) === 1);" ]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"topic": "Aux_B7",
|
|
113
|
+
"description": "State of the Aux_B7 feature on AqualinkD",
|
|
114
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(135, parseInt(value, 10) === 1);" ]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"topic": "Aux_B8",
|
|
118
|
+
"description": "State of the Aux_B8 feature on AqualinkD",
|
|
119
|
+
"processor": [ "sys.board.features.setFeatureStateAsync(136, parseInt(value, 10) === 1);" ]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"topic": "Filter_Pump",
|
|
123
|
+
"description": "State of the Filter_Pump on AqualinkD",
|
|
124
|
+
"processor": [
|
|
125
|
+
"if(state.circuits.getItemById(1).isOn === false) ",
|
|
126
|
+
" sys.board.circuits.setCircuitStateAsync(6, parseInt(value, 10) === 1);",
|
|
127
|
+
"else sys.board.circuits.setCircuitStateAsync(1, parseInt(value, 10) === 1);"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"topic": "Spa_Mode",
|
|
132
|
+
"description": "The body mode for the controller. If 1 then we are in spa mode otherwise we are in pool mode.",
|
|
133
|
+
"processor": [ "sys.board.circuits.setCircuitStateAsync(1, parseInt(value, 10) === 1);" ]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"topic": "Temperature/Pool",
|
|
137
|
+
"description": "The current temperature emitted by the controller for the pool. However, we only want to set this when the pool circuit is on.",
|
|
138
|
+
"processor": [
|
|
139
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
140
|
+
"state.temps.bodies.getItemById(1).temp = temp;",
|
|
141
|
+
"if(state.circuits.getItemById(6).isOn) sys.board.system.setTempsAsync({ waterSensor1: temp });"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"topic": "Temperature/Spa",
|
|
146
|
+
"description": "The current temperature emitted by the controller for the spa. However, we only want to set this when the spa circuit is on.",
|
|
147
|
+
"processor": [
|
|
148
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
149
|
+
"state.temps.bodies.getItemById(2).temp = temp;",
|
|
150
|
+
"if(state.circuits.getItemById(1).isOn) sys.board.system.setTempsAsync({ waterSensor1: temp });"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"topic": "Temperature/Air",
|
|
155
|
+
"description": "The current temperature emitted by the controller for air temperature.",
|
|
156
|
+
"processor": [
|
|
157
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
158
|
+
"sys.board.system.setTempsAsync({ air: temp });"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"topic": "Temperature/Solar",
|
|
163
|
+
"description": "The current temperature emitted by the controller for solar.",
|
|
164
|
+
"processor": [
|
|
165
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
166
|
+
"sys.board.system.setTempsAsync({ solarSensor1: temp });"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"topic": "Filter_Pump/RPM",
|
|
171
|
+
"description": "The RPM for the first pump",
|
|
172
|
+
"processor": [ "state.pumps.getPumpByAddress(96).rpm = parseInt(value, 10);" ]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"topic": "Filter_Pump/Watts",
|
|
176
|
+
"description": "The Watts for the first pump",
|
|
177
|
+
"processor": [ "state.pumps.getPumpByAddress(96).watts = parseInt(value, 10);" ]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"topic": "Filter_Pump/GPM",
|
|
181
|
+
"description": "The flow for the first pump",
|
|
182
|
+
"processor": [ "state.pumps.getPumpByAddress(96).flow = parseInt(value, 10);" ]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"topic": "Pump_1/RPM",
|
|
186
|
+
"description": "The RPM for aux the pump",
|
|
187
|
+
"processor": [ "state.pumps.getPumpByAddress(97).rpm = parseInt(value, 10);" ]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"topic": "Pump_1/Watts",
|
|
191
|
+
"description": "The Watts for aux the pump",
|
|
192
|
+
"processor": [ "state.pumps.getPumpByAddress(97).watts = parseInt(value, 10);" ]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"topic": "Pump_1/GPM",
|
|
196
|
+
"description": "The flow for the aux pump",
|
|
197
|
+
"processor": [ "state.pumps.getPumpByAddress(97).flow = parseInt(value, 10);" ]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"topic": "Pump_2/RPM",
|
|
201
|
+
"description": "The RPM for aux the pump",
|
|
202
|
+
"processor": [ "state.pumps.getPumpByAddress(98).rpm = parseInt(value, 10);" ]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"topic": "Pump_2/Watts",
|
|
206
|
+
"description": "The Watts for aux the pump",
|
|
207
|
+
"processor": [ "state.pumps.getPumpByAddress(98).watts = parseInt(value, 10);" ]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"topic": "Pump_2/GPM",
|
|
211
|
+
"description": "The flow for the aux pump",
|
|
212
|
+
"processor": [ "state.pumps.getPumpByAddress(98).flow = parseInt(value, 10);" ]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"topic": "Pump_3/RPM",
|
|
216
|
+
"description": "The RPM for aux the pump",
|
|
217
|
+
"processor": [ "state.pumps.getPumpByAddress(99).rpm = parseInt(value, 10);" ]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"topic": "Pump_3/Watts",
|
|
221
|
+
"description": "The Watts for aux the pump",
|
|
222
|
+
"processor": [ "state.pumps.getPumpByAddress(99).watts = parseInt(value, 10);" ]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"topic": "Pump_3/GPM",
|
|
226
|
+
"description": "The flow for the aux pump",
|
|
227
|
+
"processor": [ "state.pumps.getPumpByAddress(99).flow = parseInt(value, 10);" ]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"topic": "Pump_4/RPM",
|
|
231
|
+
"description": "The RPM for aux the pump",
|
|
232
|
+
"processor": [ "state.pumps.getPumpByAddress(100).rpm = parseInt(value, 10);" ]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"topic": "Pump_4/Watts",
|
|
236
|
+
"description": "The Watts for aux the pump",
|
|
237
|
+
"processor": [ "state.pumps.getPumpByAddress(100).watts = parseInt(value, 10);" ]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"topic": "Pump_4/GPM",
|
|
241
|
+
"description": "The flow for the aux pump",
|
|
242
|
+
"processor": [ "state.pumps.getPumpByAddress(100).flow = parseInt(value, 10);" ]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"topic": "Pump_5/RPM",
|
|
246
|
+
"description": "The RPM for aux the pump",
|
|
247
|
+
"processor": [ "state.pumps.getPumpByAddress(101).rpm = parseInt(value, 10);" ]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"topic": "Pump_5/Watts",
|
|
251
|
+
"description": "The Watts for aux the pump",
|
|
252
|
+
"processor": [ "state.pumps.getPumpByAddress(101).watts = parseInt(value, 10);" ]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"topic": "Pump_5/GPM",
|
|
256
|
+
"description": "The flow for the aux pump",
|
|
257
|
+
"processor": [ "state.pumps.getPumpByAddress(101).flow = parseInt(value, 10);" ]
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"topic": "Pump_6/RPM",
|
|
261
|
+
"description": "The RPM for aux the pump",
|
|
262
|
+
"processor": [ "state.pumps.getPumpByAddress(102).rpm = parseInt(value, 10);" ]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"topic": "Pump_6/Watts",
|
|
266
|
+
"description": "The Watts for aux the pump",
|
|
267
|
+
"processor": [ "state.pumps.getPumpByAddress(102).watts = parseInt(value, 10);" ]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"topic": "Pump_6/GPM",
|
|
271
|
+
"description": "The flow for the aux pump",
|
|
272
|
+
"processor": [ "state.pumps.getPumpByAddress(102).flow = parseInt(value, 10);" ]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"topic": "Pump_7/RPM",
|
|
276
|
+
"description": "The RPM for aux the pump",
|
|
277
|
+
"processor": [ "state.pumps.getPumpByAddress(103).rpm = parseInt(value, 10);" ]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"topic": "Pump_7/Watts",
|
|
281
|
+
"description": "The Watts for aux the pump",
|
|
282
|
+
"processor": [ "state.pumps.getPumpByAddress(103).watts = parseInt(value, 10);" ]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"topic": "Pump_7/GPM",
|
|
286
|
+
"description": "The flow for the aux pump",
|
|
287
|
+
"processor": [ "state.pumps.getPumpByAddress(103).flow = parseInt(value, 10);" ]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"topic": "SWG/PPM",
|
|
291
|
+
"description": "The salt level for the chlorinator",
|
|
292
|
+
"processor": [ "state.chlorinators.getItemById(1).saltLevel = parseInt(value, 10);" ]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"topic": "SWG/fullstatus",
|
|
296
|
+
"description": "The current status for the chlorinator",
|
|
297
|
+
"processor": [
|
|
298
|
+
"switch(parseInt(value, 10)) {",
|
|
299
|
+
"case 8: state.chlorinators.getItemById(1).status = 5;",
|
|
300
|
+
"case 9: state.chlorinators.getItemById(1).status = 0;",
|
|
301
|
+
"case 16: state.chlorinators.getItemById(1).status = 4;",
|
|
302
|
+
"case 32: state.chlorinators.getItemById(1).status = 6;",
|
|
303
|
+
"case 64: state.chlorinators.getItemById(1).status = 7;",
|
|
304
|
+
"case 128: state.chlorinators.getItemById(1).status = 8;",
|
|
305
|
+
"case 255: state.chlorinators.getItemById(1).status = 128;",
|
|
306
|
+
"default: state.chlorinators.getItemById(1).status = parseInt(value, 10); }"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"topic": "Pool_Heater/enabled",
|
|
311
|
+
"description": "The current heat mode for the pool heater",
|
|
312
|
+
"processor": [ "sys.bodies.getItemById(1).heatMode = state.temps.bodies.getItemById(1).heatMode = parseInt(value, 10) === 1 ? 2 : 1;" ]
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"topic": "Spa_Heater/enabled",
|
|
316
|
+
"description": "The current heat mode for the spa heater",
|
|
317
|
+
"processor": [ "sys.bodies.getItemById(2).heatMode = state.temps.bodies.getItemById(2).heatMode = parseInt(value, 10) === 1 ? 2 : 1;" ]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"topic": "Pool_Heater/setpoint",
|
|
321
|
+
"description": "The setpoint for the pool body",
|
|
322
|
+
"processor": [
|
|
323
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
324
|
+
"let body = sys.bodies.getItemById(1); sys.board.bodies.setHeatSetpointAsync(body, parseInt(temp, 10));"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"topic": "Spa_Heater/setpoint",
|
|
329
|
+
"description": "The setpoint for the spa body",
|
|
330
|
+
"processor": [
|
|
331
|
+
"let temp = ctx.util.convert.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
332
|
+
"let body = sys.bodies.getItemById(2); sys.board.bodies.setHeatSetpointAsync(body, parseInt(temp, 10));"
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"topic": "Pool_Heater",
|
|
337
|
+
"description": "The heat status for the pool heater",
|
|
338
|
+
"processor": [ "let body = state.temps.bodies.getItemById(1); body.heatStatus = parseInt(value, 10);" ]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"topic": "Spa_Heater",
|
|
342
|
+
"description": "The heat status for the spa heater",
|
|
343
|
+
"processor": [ "let body = state.temps.bodies.getItemById(2); body.heatStatus = parseInt(value, 10);" ]
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
{
|
|
347
|
+
"topic": "SWG/Percent",
|
|
348
|
+
"description": "The current status for the chlorinator",
|
|
349
|
+
"processor": [ "sys.chlorinators.getItemById(1).poolSetpoint = state.chlorinators.getItemById(1).poolSetpoint = parseInt(value, 10);" ]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"topic": "Freeze_Protect/setpoint",
|
|
353
|
+
"description": "The current freeze protection setpoint",
|
|
354
|
+
"processor": [
|
|
355
|
+
"let temp = ctx.util.temperature.convertUnits(parseFloat(value), 'F', sys.board.valueMaps.tempUnits.getName(state.temps.units));",
|
|
356
|
+
"sys.general.options.freezeThreshold = parseInt(temp, 10);"
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"topic": "Freeze_Protect",
|
|
361
|
+
"description": "The current freeze protection setpoint",
|
|
362
|
+
"processor": [ "state.freeze = parseInt(value, 10) === 1;" ]
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"events": [
|
|
366
|
+
{
|
|
367
|
+
"name": "config",
|
|
368
|
+
"description": "Don't flood the MQTT bus.",
|
|
369
|
+
"enabled": false
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "circuit",
|
|
373
|
+
"description": "Populate the circuits topics",
|
|
374
|
+
"topics": [
|
|
375
|
+
{
|
|
376
|
+
"topic": "Filter_Pump/set",
|
|
377
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
378
|
+
"description": "Bind the state",
|
|
379
|
+
"filter": "@bind=data.id; === 6;"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"topic": "Spa_Mode/set",
|
|
383
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
384
|
+
"description": "Bind the state",
|
|
385
|
+
"filter": "@bind=data.id; === 1;"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"topic": "Aux_1/set",
|
|
389
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
390
|
+
"description": "Bind the state",
|
|
391
|
+
"filter": "@bind=data.id; === 2;"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"topic": "Aux_2/set",
|
|
395
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
396
|
+
"description": "Bind the state",
|
|
397
|
+
"filter": "@bind=data.id; === 3;"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"topic": "Aux_3/set",
|
|
401
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
402
|
+
"description": "Bind the state",
|
|
403
|
+
"filter": "@bind=data.id; === 4;"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"topic": "Aux_4/set",
|
|
407
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
408
|
+
"description": "Bind the state",
|
|
409
|
+
"filter": "@bind=data.id; === 5;"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"topic": "Aux_5/set",
|
|
413
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
414
|
+
"description": "Bind the state",
|
|
415
|
+
"filter": "@bind=data.id; === 7;"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"topic": "Aux_6/set",
|
|
419
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
420
|
+
"description": "Bind the state",
|
|
421
|
+
"filter": "@bind=data.id; === 8;"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"topic": "Aux_7/set",
|
|
425
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
426
|
+
"description": "Bind the state",
|
|
427
|
+
"filter": "@bind=data.id; === 9;"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"topic": "Aux_8/set",
|
|
431
|
+
"message": "@bind=data.isOn; ? 1 : 0;",
|
|
432
|
+
"description": "Bind the state",
|
|
433
|
+
"filter": "@bind=data.id === 10;"
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "feature",
|
|
439
|
+
"description": "Populate the features topics",
|
|
440
|
+
"topics": [
|
|
441
|
+
{
|
|
442
|
+
"topic": "Aux_B@bind=data.id - 128;/set",
|
|
443
|
+
"message": "@bind=data.isOn ? 1 : 0;",
|
|
444
|
+
"description": "Bind the state"
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "body",
|
|
450
|
+
"description": "Populate the body topic",
|
|
451
|
+
"filter": "@bind=data.isActive;",
|
|
452
|
+
"topics": [
|
|
453
|
+
{
|
|
454
|
+
"topic": "Pool_Heater/setpoint/set",
|
|
455
|
+
"message": "@bind=data.setPoint;",
|
|
456
|
+
"description": "Set the heat setpoint for the pool",
|
|
457
|
+
"filter": "@bind=data.id; === 1;",
|
|
458
|
+
"processor": [
|
|
459
|
+
"let units = sys.board.valueMaps.tempUnits.getName(state.temps.units);",
|
|
460
|
+
"return ctx.util.convert.temperature.convertUnits(data.setPoint, units, 'F');"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"topic": "Spa_Heater/setpoint/set",
|
|
465
|
+
"message": "@bind=data.setPoint;",
|
|
466
|
+
"description": "Set the heat setpoint for the spa",
|
|
467
|
+
"filter": "@bind=data.id; === 2;",
|
|
468
|
+
"processor": [
|
|
469
|
+
"let units = sys.board.valueMaps.tempUnits.getName(state.temps.units);",
|
|
470
|
+
"return ctx.util.convert.temperature.convertUnits(data.setPoint, units, 'F');"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"topic": "Pool_Heater/set",
|
|
475
|
+
"message": "@bind=data.heatMode.val === 2 ? 1 : 0;",
|
|
476
|
+
"description": "Bind the state",
|
|
477
|
+
"filter": "@bind=data.id === 1;"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"topic": "Spa_Heater/set",
|
|
481
|
+
"message": "@bind=data.heatMode.val === 2 ? 1 : 0;",
|
|
482
|
+
"description": "Bind the state",
|
|
483
|
+
"filter": "@bind=data.id === 2;"
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
]
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"name": "chlorinator",
|
|
490
|
+
"description": "Populate the chlorinator topic",
|
|
491
|
+
"topics": [
|
|
492
|
+
{
|
|
493
|
+
"topic": "SWG/Percent/set",
|
|
494
|
+
"message": "@bind=data.superChlor ? 100 : data.disabled ? 0 : data.poolSetpoint;",
|
|
495
|
+
"description": "Bind the setpoint topic. Unfortunately aqualink only supports one setpoint."
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
"name": "pump",
|
|
501
|
+
"description": "Populate the pumps topic. We will need to figure this one out. Perhaps if the RS485 comm port is disabled we don't try to send anything.",
|
|
502
|
+
"topics": []
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
}
|
|
@@ -37,6 +37,26 @@
|
|
|
37
37
|
"name": "solarTemp",
|
|
38
38
|
"value": "@bind=data.solar;",
|
|
39
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"
|
|
40
60
|
}
|
|
41
61
|
]
|
|
42
62
|
}
|
|
@@ -275,6 +295,16 @@
|
|
|
275
295
|
"value": "@bind=vars.cfg.ph.tolerance.high;",
|
|
276
296
|
"type": "int"
|
|
277
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
|
+
},
|
|
278
308
|
{
|
|
279
309
|
"name": "tolerance enabled int",
|
|
280
310
|
"value": "@bind=vars.cfg.ph.tolerance.enabled?1:0;",
|
|
@@ -384,6 +414,16 @@
|
|
|
384
414
|
"value": "@bind=data.orp.dosingVolumeRemaining;",
|
|
385
415
|
"type": "int"
|
|
386
416
|
},
|
|
417
|
+
{
|
|
418
|
+
"name": "dose volume float",
|
|
419
|
+
"value": "@bind=data.orp.doseVolume;",
|
|
420
|
+
"type": "float"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "dose volume remaining float",
|
|
424
|
+
"value": "@bind=data.orp.dosingVolumeRemaining;",
|
|
425
|
+
"type": "float"
|
|
426
|
+
},
|
|
387
427
|
{
|
|
388
428
|
"name": "tank level",
|
|
389
429
|
"value": "@bind=data.orp.tank.level;",
|
|
@@ -419,6 +459,11 @@
|
|
|
419
459
|
"value": "@bind=vars.cfg.orp.maxDosingVolume;",
|
|
420
460
|
"type": "int"
|
|
421
461
|
},
|
|
462
|
+
{
|
|
463
|
+
"name": "max dosing volume float",
|
|
464
|
+
"value": "@bind=vars.cfg.orp.maxDosingVolume;",
|
|
465
|
+
"type": "float"
|
|
466
|
+
},
|
|
422
467
|
{
|
|
423
468
|
"name": "mixing time",
|
|
424
469
|
"value": "@bind=vars.cfg.orp.mixingTime;",
|
|
@@ -469,6 +514,21 @@
|
|
|
469
514
|
"value": "@bind=data.ph.volumeDosed;",
|
|
470
515
|
"type": "int"
|
|
471
516
|
},
|
|
517
|
+
{
|
|
518
|
+
"name": "max daily volume float",
|
|
519
|
+
"value": "@bind=data.orp.maxDailyVolume;",
|
|
520
|
+
"type": "float"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "daily volume dosed float",
|
|
524
|
+
"value": "@bind=data.ph.dailyVolumeDosed;",
|
|
525
|
+
"type": "float"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "volume dosed float",
|
|
529
|
+
"value": "@bind=data.ph.volumeDosed;",
|
|
530
|
+
"type": "float"
|
|
531
|
+
},
|
|
472
532
|
{
|
|
473
533
|
"name": "orp demand",
|
|
474
534
|
"value": "@bind=data.orp.demand;",
|
|
@@ -583,6 +643,11 @@
|
|
|
583
643
|
"value": "@bind=data.warnings.orpDailyLimitReached.val;",
|
|
584
644
|
"type": "int"
|
|
585
645
|
},
|
|
646
|
+
{
|
|
647
|
+
"name": "warning: pH daily limit reached",
|
|
648
|
+
"value": "@bind=data.warnings.pHDailyLimitReached.val;",
|
|
649
|
+
"type": "int"
|
|
650
|
+
},
|
|
586
651
|
{
|
|
587
652
|
"name": "warning: water chemistry",
|
|
588
653
|
"value": "@bind=data.warnings.waterChemistry.val;",
|
|
@@ -789,7 +854,7 @@
|
|
|
789
854
|
},
|
|
790
855
|
{
|
|
791
856
|
"name": "pump",
|
|
792
|
-
"description": "
|
|
857
|
+
"description": "Pump state emit",
|
|
793
858
|
"points": [
|
|
794
859
|
{
|
|
795
860
|
"measurement": "pumps",
|
|
@@ -822,6 +887,11 @@
|
|
|
822
887
|
"value": "@bind=data.gpm;",
|
|
823
888
|
"type": "int"
|
|
824
889
|
},
|
|
890
|
+
{
|
|
891
|
+
"name": "flow",
|
|
892
|
+
"value": "@bind=data.flow;",
|
|
893
|
+
"type": "int"
|
|
894
|
+
},
|
|
825
895
|
{
|
|
826
896
|
"name": "watts",
|
|
827
897
|
"value": "@bind=data.watts;",
|