nodejs-poolcontroller 7.3.0 → 7.6.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/bug_report.md +1 -1
- package/Changelog +23 -0
- package/README.md +5 -5
- package/app.ts +2 -0
- package/config/Config.ts +3 -0
- package/config/VersionCheck.ts +8 -4
- package/controller/Constants.ts +88 -0
- package/controller/Equipment.ts +246 -66
- package/controller/Errors.ts +24 -1
- package/controller/Lockouts.ts +423 -0
- package/controller/State.ts +314 -54
- package/controller/boards/EasyTouchBoard.ts +107 -59
- package/controller/boards/IntelliCenterBoard.ts +186 -125
- package/controller/boards/IntelliTouchBoard.ts +104 -30
- package/controller/boards/NixieBoard.ts +721 -159
- package/controller/boards/SystemBoard.ts +2370 -1108
- package/controller/comms/Comms.ts +85 -10
- package/controller/comms/messages/Messages.ts +10 -4
- package/controller/comms/messages/config/ChlorinatorMessage.ts +13 -4
- package/controller/comms/messages/config/CircuitGroupMessage.ts +6 -0
- package/controller/comms/messages/config/CoverMessage.ts +1 -0
- package/controller/comms/messages/config/EquipmentMessage.ts +4 -0
- package/controller/comms/messages/config/ExternalMessage.ts +44 -26
- package/controller/comms/messages/config/FeatureMessage.ts +8 -1
- package/controller/comms/messages/config/GeneralMessage.ts +8 -0
- package/controller/comms/messages/config/HeaterMessage.ts +15 -9
- package/controller/comms/messages/config/IntellichemMessage.ts +4 -1
- package/controller/comms/messages/config/OptionsMessage.ts +13 -1
- package/controller/comms/messages/config/PumpMessage.ts +4 -20
- package/controller/comms/messages/config/RemoteMessage.ts +4 -0
- package/controller/comms/messages/config/ScheduleMessage.ts +11 -0
- package/controller/comms/messages/config/SecurityMessage.ts +1 -0
- package/controller/comms/messages/config/ValveMessage.ts +13 -3
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +2 -3
- package/controller/comms/messages/status/EquipmentStateMessage.ts +78 -24
- package/controller/comms/messages/status/HeaterStateMessage.ts +42 -9
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +37 -26
- package/controller/nixie/Nixie.ts +18 -16
- package/controller/nixie/bodies/Body.ts +4 -1
- package/controller/nixie/chemistry/ChemController.ts +80 -77
- package/controller/nixie/chemistry/Chlorinator.ts +9 -8
- package/controller/nixie/circuits/Circuit.ts +55 -6
- package/controller/nixie/heaters/Heater.ts +192 -32
- package/controller/nixie/pumps/Pump.ts +146 -84
- package/controller/nixie/schedules/Schedule.ts +3 -2
- package/controller/nixie/valves/Valve.ts +1 -1
- package/defaultConfig.json +32 -1
- package/issue_template.md +1 -1
- package/logger/DataLogger.ts +37 -22
- package/package.json +20 -18
- package/web/Server.ts +520 -29
- package/web/bindings/influxDB.json +96 -8
- package/web/bindings/mqtt.json +151 -40
- package/web/bindings/mqttAlt.json +114 -4
- package/web/interfaces/httpInterface.ts +2 -0
- package/web/interfaces/influxInterface.ts +36 -19
- package/web/interfaces/mqttInterface.ts +14 -3
- package/web/services/config/Config.ts +171 -44
- package/web/services/state/State.ts +49 -5
- package/web/services/state/StateSocket.ts +18 -1
|
@@ -83,7 +83,9 @@
|
|
|
83
83
|
{
|
|
84
84
|
"measurement": "chemicalDose",
|
|
85
85
|
"description": "Active doses recorded by chemical dosed",
|
|
86
|
-
"series": {
|
|
86
|
+
"series": {
|
|
87
|
+
"value": "@bind=data.start;"
|
|
88
|
+
},
|
|
87
89
|
"tags": [
|
|
88
90
|
{
|
|
89
91
|
"name": "chemical",
|
|
@@ -95,7 +97,6 @@
|
|
|
95
97
|
"name": "volumeDosed",
|
|
96
98
|
"value": "@bind=data.volumeDosed;",
|
|
97
99
|
"type": "float"
|
|
98
|
-
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
102
|
"name": "timeDosed",
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
{
|
|
126
127
|
"name": "status",
|
|
127
128
|
"value": "@bind=data.status;",
|
|
128
|
-
"type":
|
|
129
|
+
"type": "string"
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
132
|
"name": "end",
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
},
|
|
187
188
|
{
|
|
188
189
|
"name": "pump is dosing",
|
|
189
|
-
"value": "@bind=data.ph.pump.isDosing?1:0;",
|
|
190
|
+
"value": "@bind=typeof data.ph.pump.isDosing !== 'undefined'?data.ph.pump.isDosing?1:0:0;",
|
|
190
191
|
"type": "int"
|
|
191
192
|
},
|
|
192
193
|
{
|
|
@@ -350,7 +351,7 @@
|
|
|
350
351
|
},
|
|
351
352
|
{
|
|
352
353
|
"name": "pump is dosing",
|
|
353
|
-
"value": "@bind=data.orp.pump.isDosing?1:0;",
|
|
354
|
+
"value": "@bind=typeof data.orp.pump.isDosing !== 'undefined'?data.orp.pump.isDosing?1:0:0;",
|
|
354
355
|
"type": "int"
|
|
355
356
|
},
|
|
356
357
|
{
|
|
@@ -606,8 +607,6 @@
|
|
|
606
607
|
}
|
|
607
608
|
]
|
|
608
609
|
},
|
|
609
|
-
|
|
610
|
-
|
|
611
610
|
{
|
|
612
611
|
"name": "circuit",
|
|
613
612
|
"description": "Bind circuit emit",
|
|
@@ -880,6 +879,11 @@
|
|
|
880
879
|
"name": "spaSetpoint",
|
|
881
880
|
"value": "@bind=data.spaSetpoint;",
|
|
882
881
|
"type": "int"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "target output",
|
|
885
|
+
"value": "@bind=data.targetOutput;",
|
|
886
|
+
"type": "int"
|
|
883
887
|
}
|
|
884
888
|
]
|
|
885
889
|
}
|
|
@@ -889,6 +893,90 @@
|
|
|
889
893
|
"name": "config",
|
|
890
894
|
"description": "Not used for updates",
|
|
891
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
|
+
]
|
|
892
980
|
}
|
|
893
981
|
]
|
|
894
|
-
}
|
|
982
|
+
}
|
package/web/bindings/mqtt.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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='mqttjs_njsPC_'+Math.random().toString(16).substr(2, 8);"
|
|
2
|
+
"context": {
|
|
3
|
+
"name": "MQTT",
|
|
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 #"
|
|
38
33
|
}
|
|
39
|
-
|
|
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='mqttjs_njsPC_'+Math.random().toString(16).substr(2, 8);"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
40
|
"events": [
|
|
41
41
|
{
|
|
42
42
|
"name": "config",
|
|
@@ -64,6 +64,10 @@
|
|
|
64
64
|
{
|
|
65
65
|
"topic": "state/mode",
|
|
66
66
|
"message": "@bind=data.mode;"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"topic": "state/startTime",
|
|
70
|
+
"message": "@bind=data.startTime;"
|
|
67
71
|
}
|
|
68
72
|
]
|
|
69
73
|
},
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
"topics": [
|
|
74
78
|
{
|
|
75
79
|
"topic": "state/circuits/@bind=data.id;/@bind=data.name;",
|
|
76
|
-
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"'
|
|
80
|
+
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"';,\"endTime\":\"@bind=data.endTime;\"}",
|
|
77
81
|
"description": "Bind 'on'/'off' as a message to the state topic."
|
|
78
82
|
},
|
|
79
83
|
{
|
|
@@ -116,6 +120,11 @@
|
|
|
116
120
|
"options": { "qos": 2 },
|
|
117
121
|
"enabled": false
|
|
118
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"topic": "state/circuits/@bind=data.id;/@bind=data.name;/endTime",
|
|
125
|
+
"message": "{\"id\":@bind=data.id;,\"endTime\":@bind=data.endTime;}",
|
|
126
|
+
"description": "Bind endTime as a message to the state topic."
|
|
127
|
+
},
|
|
119
128
|
{
|
|
120
129
|
"topic": "state/circuits/@bind=data.id;/@bind=data.name;/object",
|
|
121
130
|
"message": "@bind=data;",
|
|
@@ -146,15 +155,19 @@
|
|
|
146
155
|
}
|
|
147
156
|
]
|
|
148
157
|
},
|
|
149
|
-
|
|
150
158
|
{
|
|
151
159
|
"name": "feature",
|
|
152
160
|
"description": "Populate the features topics",
|
|
153
161
|
"topics": [
|
|
154
162
|
{
|
|
155
163
|
"topic": "state/features/@bind=data.id;/@bind=data.name;",
|
|
156
|
-
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"'
|
|
164
|
+
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"';,\"endTime\":\"@bind=data.endTime;\"}",
|
|
157
165
|
"description": "Bind 'on'/'off' as a message to the state topic."
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"topic": "state/features/@bind=data.id;/@bind=data.name;/endTime",
|
|
169
|
+
"message": "{\"id\":@bind=data.id;,\"endTime\":@bind=data.endTime;}",
|
|
170
|
+
"description": "Bind endTime as a message to the state topic."
|
|
158
171
|
}
|
|
159
172
|
]
|
|
160
173
|
},
|
|
@@ -179,6 +192,32 @@
|
|
|
179
192
|
}
|
|
180
193
|
]
|
|
181
194
|
},
|
|
195
|
+
{
|
|
196
|
+
"name": "circuitGroup",
|
|
197
|
+
"description": "Populate the circuitGroup topic",
|
|
198
|
+
"topics": [
|
|
199
|
+
{
|
|
200
|
+
"topic": "state/circuitGroups/@bind=data.id;/name",
|
|
201
|
+
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"';}",
|
|
202
|
+
"description": "Bind name to the state topic."
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"topic": "state/circuitGroups/@bind=data.id;/isOn",
|
|
206
|
+
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"';}",
|
|
207
|
+
"description": "Bind the on/off status to the topic."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"topic": "state/circuitGroups/@bind=data.id;/type",
|
|
211
|
+
"message": "{\"type\":@bind=data.type;}"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"topic": "state/circuitGroups/@bind=data.id;/showInFeatures",
|
|
215
|
+
"message": "{\"showInFeatures\":@bind=data.showInFeatures;}",
|
|
216
|
+
"description": "Indicates wether the item should show in features."
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
]
|
|
220
|
+
},
|
|
182
221
|
{
|
|
183
222
|
"name": "body",
|
|
184
223
|
"description": "Populate the body topic",
|
|
@@ -203,6 +242,11 @@
|
|
|
203
242
|
"message": "{\"setPoint\":@bind=data.setPoint;}",
|
|
204
243
|
"description": "Send set point."
|
|
205
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"topic": "state/temps/bodies/@bind=data.id;/@bind=data.name;/coolSetpoint",
|
|
247
|
+
"message": "{\"coolSetpoint\":@bind=data.coolSetpoint;}",
|
|
248
|
+
"description": "Send cool set point."
|
|
249
|
+
},
|
|
206
250
|
{
|
|
207
251
|
"topic": "state/temps/bodies/@bind=data.id;/@bind=data.name;/temp",
|
|
208
252
|
"message": "{\"temp\":@bind=data.temp;}",
|
|
@@ -286,6 +330,10 @@
|
|
|
286
330
|
{
|
|
287
331
|
"topic": "state/lightgroups/@bind=data.id;/@bind=data.name;/type",
|
|
288
332
|
"message": "{\"type\":@bind=data.type;}"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"topic": "state/lightgroups/@bind=data.id;/@bind=data.name;/endTime",
|
|
336
|
+
"message": "{\"endTime\":@bind=data.endTime;}"
|
|
289
337
|
}
|
|
290
338
|
]
|
|
291
339
|
},
|
|
@@ -534,6 +582,69 @@
|
|
|
534
582
|
}
|
|
535
583
|
]
|
|
536
584
|
},
|
|
585
|
+
{
|
|
586
|
+
"name": "chemicalDose",
|
|
587
|
+
"description": "Event when a chemical is being dosed",
|
|
588
|
+
"topics": [
|
|
589
|
+
{
|
|
590
|
+
"topic": "state/chemControllers/@bind=data.id;/@bind=data.chem;",
|
|
591
|
+
"message": "@bind=data;",
|
|
592
|
+
"enabled": true
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "filter",
|
|
598
|
+
"description": "Populate the filter topic",
|
|
599
|
+
"topics": [
|
|
600
|
+
{
|
|
601
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;",
|
|
602
|
+
"message": "{\"id\":@bind=data.id;,\"isOn\":@bind=data.isOn?'\"on\"':'\"off\"';}",
|
|
603
|
+
"description": "Bind 'on'/'off' as a message to the state topic."
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/pressure",
|
|
607
|
+
"message": "{\"pressure\":@bind=data.pressure;}",
|
|
608
|
+
"description": "Send current pressure."
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/refPressure",
|
|
612
|
+
"message": "{\"refPressure\":@bind=data.refPressure;}",
|
|
613
|
+
"description": "Send reference pressure (when circuits are on)."
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/body",
|
|
617
|
+
"message": "{\"body\":@bind=data.body.desc;}",
|
|
618
|
+
"description": "Send associated body."
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/filterType",
|
|
622
|
+
"message": "{\"filterType\":@bind=data.filterType.desc;}",
|
|
623
|
+
"description": "Send filter type."
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/pressureUnits",
|
|
627
|
+
"message": "{\"pressureUnits\":@bind=data.pressureUnits.desc;}",
|
|
628
|
+
"description": "Send pressureUnits."
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"topic": "state/filters/@bind=data.id;/@bind=data.name;/cleanPercentage",
|
|
632
|
+
"message": "{\"cleanPercentage\":@bind=data.cleanPercentage;}",
|
|
633
|
+
"description": "Send cleanPercentage."
|
|
634
|
+
}
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "cover",
|
|
639
|
+
"description": "Populate the cover topic",
|
|
640
|
+
"topics": [
|
|
641
|
+
{
|
|
642
|
+
"topic": "state/covers/@bind=data.id;/@bind=data.name;",
|
|
643
|
+
"message": "{\"id\":@bind=data.id;,\"isClosed\":@bind=data.isClosed?'\"true\"':'\"false\"';}",
|
|
644
|
+
"description": "Bind isClosed as a message to the state topic."
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
},
|
|
537
648
|
{
|
|
538
649
|
"name": "*",
|
|
539
650
|
"description": "DEFAULT: Sends the entire emitted response.",
|
|
@@ -63,8 +63,11 @@
|
|
|
63
63
|
{
|
|
64
64
|
"topic": "state/mode",
|
|
65
65
|
"message": "@bind=data.mode;"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"topic": "state/startTime",
|
|
69
|
+
"message": "@bind=data.startTime;"
|
|
66
70
|
}
|
|
67
|
-
|
|
68
71
|
]
|
|
69
72
|
},
|
|
70
73
|
{
|
|
@@ -86,6 +89,11 @@
|
|
|
86
89
|
"message": "@bind=data.type;",
|
|
87
90
|
"description": "The type of circuit we are dealing with."
|
|
88
91
|
},
|
|
92
|
+
{
|
|
93
|
+
"topic": "state/circuits/@bind=data.id;/endTime",
|
|
94
|
+
"message": "@bind=data.endTime;",
|
|
95
|
+
"description": "The end time for the circuit."
|
|
96
|
+
},
|
|
89
97
|
{
|
|
90
98
|
"topic": "state/circuits/@bind=data.id;/lightingTheme",
|
|
91
99
|
"message": "@bind=data.lightingTheme;",
|
|
@@ -95,7 +103,12 @@
|
|
|
95
103
|
{
|
|
96
104
|
"topic": "state/circuits/@bind=data.id;/showInFeatures",
|
|
97
105
|
"message": "@bind=data.showInFeatures;",
|
|
98
|
-
"description": "Indicates
|
|
106
|
+
"description": "Indicates whether the item should show in features."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"topic": "state/circuits/@bind=data.id;/endTime",
|
|
110
|
+
"message": "@bind=data.endTime;",
|
|
111
|
+
"description": "Indicates end time for a circuit (when it will turn off)."
|
|
99
112
|
}
|
|
100
113
|
]
|
|
101
114
|
},
|
|
@@ -113,6 +126,11 @@
|
|
|
113
126
|
"message": "@bind=data.isOn;",
|
|
114
127
|
"description": "Bind the on/off status to the topic."
|
|
115
128
|
},
|
|
129
|
+
{
|
|
130
|
+
"topic": "state/features/@bind=data.id;/endTime",
|
|
131
|
+
"message": "@bind=data.endTime;",
|
|
132
|
+
"description": "The end time for the feature."
|
|
133
|
+
},
|
|
116
134
|
{
|
|
117
135
|
"topic": "state/features/@bind=data.id;/type",
|
|
118
136
|
"message": "@bind=data.type;",
|
|
@@ -121,7 +139,12 @@
|
|
|
121
139
|
{
|
|
122
140
|
"topic": "state/features/@bind=data.id;/showInFeatures",
|
|
123
141
|
"message": "@bind=data.showInFeatures;",
|
|
124
|
-
"description": "Indicates
|
|
142
|
+
"description": "Indicates whether the item should show in features."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"topic": "state/features/@bind=data.id;/endTime",
|
|
146
|
+
"message": "@bind=data.endTime;",
|
|
147
|
+
"description": "Indicates end time for a features (when it will turn off)."
|
|
125
148
|
}
|
|
126
149
|
]
|
|
127
150
|
},
|
|
@@ -150,6 +173,10 @@
|
|
|
150
173
|
{
|
|
151
174
|
"topic": "state/lightGroups/@bind=data.id;/type",
|
|
152
175
|
"message": "@bind=data.type;"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"topic": "state/lightGroups/@bind=data.id;/endTime",
|
|
179
|
+
"message": "@bind=data.endTime;"
|
|
153
180
|
}
|
|
154
181
|
]
|
|
155
182
|
},
|
|
@@ -174,7 +201,12 @@
|
|
|
174
201
|
{
|
|
175
202
|
"topic": "state/circuitGroups/@bind=data.id;/showInFeatures",
|
|
176
203
|
"message": "@bind=data.showInFeatures;",
|
|
177
|
-
"description": "Indicates
|
|
204
|
+
"description": "Indicates whether the item should show in features."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"topic": "state/circuitGroups/@bind=data.id;/endTime",
|
|
208
|
+
"message": "@bind=data.showInFeatures;",
|
|
209
|
+
"description": "Indicates end time for the circuitGroup (when it will turn off)."
|
|
178
210
|
}
|
|
179
211
|
|
|
180
212
|
]
|
|
@@ -309,6 +341,11 @@
|
|
|
309
341
|
"message": "@bind=data.setPoint;",
|
|
310
342
|
"description": "Setpoint."
|
|
311
343
|
},
|
|
344
|
+
{
|
|
345
|
+
"topic": "state/temps/bodies/@bind=data.id;/coolSetpoint",
|
|
346
|
+
"message": "@bind=data.coolSetpoint;",
|
|
347
|
+
"description": "Cool setpoint."
|
|
348
|
+
},
|
|
312
349
|
{
|
|
313
350
|
"topic": "state/temps/bodies/@bind=data.id;/temp",
|
|
314
351
|
"message": "@bind=data.temp;",
|
|
@@ -565,6 +602,79 @@
|
|
|
565
602
|
}
|
|
566
603
|
]
|
|
567
604
|
},
|
|
605
|
+
{
|
|
606
|
+
"name": "chemicalDose",
|
|
607
|
+
"description": "Event when a chemical is being dosed",
|
|
608
|
+
"topics": [
|
|
609
|
+
{
|
|
610
|
+
"topic": "state/chemControllers/@bind=data.id;/@bind=data.chem;",
|
|
611
|
+
"message": "@bind=data;",
|
|
612
|
+
"enabled": true
|
|
613
|
+
}
|
|
614
|
+
]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"name": "filter",
|
|
618
|
+
"description": "Populate the filter topic",
|
|
619
|
+
"topics": [
|
|
620
|
+
{
|
|
621
|
+
"topic": "state/filters/@bind=data.id;/name",
|
|
622
|
+
"message": "@bind=data.name;",
|
|
623
|
+
"description": "Bind the name topic."
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"topic": "state/filters/@bind=data.id;/isOn",
|
|
627
|
+
"message": "@bind=data.currentOutput > 0;",
|
|
628
|
+
"description": "Bind 'on'/'off' as a message to the state topic."
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"topic": "state/filters/@bind=data.id;/body",
|
|
632
|
+
"message": "@bind=data.body.desc;",
|
|
633
|
+
"description": "Send body description."
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"topic": "state/filters/@bind=data.id;/cleanPercentage",
|
|
637
|
+
"message": "@bind=data.cleanPercentage;",
|
|
638
|
+
"description": "Send clean percentage."
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"topic": "state/filters/@bind=data.id;/filterType",
|
|
642
|
+
"message": "@bind=data.filterType.desc;",
|
|
643
|
+
"description": "Send filter type."
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"topic": "state/filters/@bind=data.id;/pressure",
|
|
647
|
+
"message": "@bind=data.pressure;",
|
|
648
|
+
"description": "Send pressure."
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"topic": "state/filters/@bind=data.id;/pressureUnits",
|
|
652
|
+
"message": "@bind=data.pressureUnits.desc;",
|
|
653
|
+
"description": "Send pressure units."
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"topic": "state/filters/@bind=data.id;/refPressure",
|
|
657
|
+
"message": "@bind=data.refPressure;",
|
|
658
|
+
"description": "Send reference pressure."
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "cover",
|
|
664
|
+
"description": "Populate the cover topic",
|
|
665
|
+
"topics": [
|
|
666
|
+
{
|
|
667
|
+
"topic": "state/covers/@bind=data.id;/name",
|
|
668
|
+
"message": "@bind=data.name;",
|
|
669
|
+
"description": "Bind the name topic."
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"topic": "state/covers/@bind=data.id;/isClosed",
|
|
673
|
+
"message": "@bind=data.isClosed;",
|
|
674
|
+
"description": "Bind isClosed as a message to the state topic."
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
},
|
|
568
678
|
{
|
|
569
679
|
"name": "*",
|
|
570
680
|
"description": "DEFAULT: Sends the entire emitted response.",
|
|
@@ -100,11 +100,13 @@ export class HttpInterfaceBindings extends BaseInterfaceBindings {
|
|
|
100
100
|
opts.headers["CONTENT-LENGTH"] = Buffer.byteLength(sbody || '');
|
|
101
101
|
}
|
|
102
102
|
if (opts.port === 443 || (opts.protocol || '').startsWith('https')) {
|
|
103
|
+
opts.protocol = 'https:';
|
|
103
104
|
req = https.request(opts, (response: http.IncomingMessage) => {
|
|
104
105
|
//console.log(response);
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
else {
|
|
109
|
+
opts.protocol = 'http:';
|
|
108
110
|
req = http.request(opts, (response: http.IncomingMessage) => {
|
|
109
111
|
//console.log(response.statusCode);
|
|
110
112
|
});
|