nodejs-poolcontroller 7.6.0 → 7.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +44 -44
- package/.github/ISSUE_TEMPLATE/bug_report.md +52 -52
- package/CONTRIBUTING.md +74 -74
- package/Changelog +215 -215
- package/Dockerfile +17 -17
- package/Gruntfile.js +40 -40
- package/LICENSE +661 -661
- package/README.md +191 -186
- package/app.ts +0 -0
- package/config/Config.ts +24 -2
- package/config/VersionCheck.ts +27 -12
- package/config copy.json +299 -299
- package/controller/Constants.ts +0 -0
- package/controller/Equipment.ts +2459 -2405
- package/controller/Errors.ts +180 -180
- package/controller/Lockouts.ts +436 -422
- package/controller/State.ts +51 -26
- package/controller/boards/BoardFactory.ts +45 -45
- package/controller/boards/EasyTouchBoard.ts +2653 -2537
- package/controller/boards/IntelliCenterBoard.ts +4230 -4034
- package/controller/boards/IntelliComBoard.ts +63 -63
- package/controller/boards/IntelliTouchBoard.ts +241 -241
- package/controller/boards/NixieBoard.ts +1675 -1660
- package/controller/boards/SystemBoard.ts +4697 -4463
- package/controller/comms/Comms.ts +138 -1
- package/controller/comms/messages/Messages.ts +3 -5
- package/controller/comms/messages/config/ChlorinatorMessage.ts +1 -1
- package/controller/comms/messages/config/CircuitGroupMessage.ts +0 -0
- package/controller/comms/messages/config/CircuitMessage.ts +0 -0
- package/controller/comms/messages/config/ConfigMessage.ts +0 -0
- package/controller/comms/messages/config/CoverMessage.ts +0 -0
- package/controller/comms/messages/config/CustomNameMessage.ts +30 -30
- package/controller/comms/messages/config/EquipmentMessage.ts +0 -0
- package/controller/comms/messages/config/ExternalMessage.ts +9 -7
- package/controller/comms/messages/config/FeatureMessage.ts +0 -0
- package/controller/comms/messages/config/GeneralMessage.ts +0 -0
- package/controller/comms/messages/config/HeaterMessage.ts +0 -20
- package/controller/comms/messages/config/IntellichemMessage.ts +0 -0
- package/controller/comms/messages/config/OptionsMessage.ts +25 -1
- package/controller/comms/messages/config/PumpMessage.ts +0 -0
- package/controller/comms/messages/config/RemoteMessage.ts +0 -0
- package/controller/comms/messages/config/ScheduleMessage.ts +347 -342
- package/controller/comms/messages/config/SecurityMessage.ts +0 -0
- package/controller/comms/messages/config/ValveMessage.ts +0 -0
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +0 -0
- package/controller/comms/messages/status/EquipmentStateMessage.ts +1 -1
- package/controller/comms/messages/status/HeaterStateMessage.ts +86 -86
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +445 -397
- package/controller/comms/messages/status/IntelliValveStateMessage.ts +35 -35
- package/controller/comms/messages/status/PumpStateMessage.ts +0 -0
- package/controller/comms/messages/status/VersionMessage.ts +0 -0
- package/controller/nixie/Nixie.ts +162 -162
- package/controller/nixie/NixieEquipment.ts +103 -103
- package/controller/nixie/bodies/Body.ts +120 -120
- package/controller/nixie/bodies/Filter.ts +135 -135
- package/controller/nixie/chemistry/ChemController.ts +2498 -2398
- package/controller/nixie/chemistry/Chlorinator.ts +314 -314
- package/controller/nixie/circuits/Circuit.ts +248 -245
- package/controller/nixie/heaters/Heater.ts +648 -600
- package/controller/nixie/pumps/Pump.ts +661 -661
- package/controller/nixie/schedules/Schedule.ts +257 -257
- package/controller/nixie/valves/Valve.ts +170 -170
- package/defaultConfig.json +286 -286
- package/issue_template.md +51 -51
- package/logger/DataLogger.ts +448 -448
- package/logger/Logger.ts +0 -0
- package/package.json +56 -56
- package/tsconfig.json +25 -25
- package/web/Server.ts +2 -2
- package/web/bindings/influxDB.json +1021 -981
- package/web/bindings/mqtt.json +654 -654
- package/web/bindings/mqttAlt.json +684 -684
- package/web/bindings/rulesManager.json +54 -54
- package/web/bindings/smartThings-Hubitat.json +31 -31
- package/web/bindings/valveRelays.json +20 -20
- package/web/bindings/vera.json +25 -25
- package/web/interfaces/baseInterface.ts +136 -136
- package/web/interfaces/httpInterface.ts +124 -124
- package/web/interfaces/influxInterface.ts +245 -241
- package/web/interfaces/mqttInterface.ts +475 -475
- package/web/services/config/Config.ts +10 -108
- package/web/services/config/ConfigSocket.ts +0 -0
- package/web/services/state/State.ts +71 -4
- package/web/services/state/StateSocket.ts +0 -0
- package/web/services/utilities/Utilities.ts +42 -42
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -689,7 +689,7 @@ export class EquipmentStateMessage {
|
|
|
689
689
|
case 144: // swim
|
|
690
690
|
sys.board.circuits.sequenceLightGroupAsync(grp.id, 'swim');
|
|
691
691
|
break;
|
|
692
|
-
case 160: //
|
|
692
|
+
case 160: // set
|
|
693
693
|
sys.board.circuits.sequenceLightGroupAsync(grp.id, 'set');
|
|
694
694
|
break;
|
|
695
695
|
case 190: // save
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
/* nodejs-poolController. An application to control pool equipment.
|
|
2
|
-
Copyright (C) 2016, 2017, 2018, 2019, 2020. Russell Goldin, tagyoureit. russ.goldin@gmail.com
|
|
3
|
-
|
|
4
|
-
This program is free software: you can redistribute it and/or modify
|
|
5
|
-
it under the terms of the GNU Affero General Public License as
|
|
6
|
-
published by the Free Software Foundation, either version 3 of the
|
|
7
|
-
License, or (at your option) any later version.
|
|
8
|
-
|
|
9
|
-
This program is distributed in the hope that it will be useful,
|
|
10
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
GNU Affero General Public License for more details.
|
|
13
|
-
|
|
14
|
-
You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
-
*/
|
|
17
|
-
import { Inbound, Protocol } from "../Messages";
|
|
18
|
-
import { state, BodyTempState, HeaterState } from "../../../State";
|
|
19
|
-
import { sys, ControllerType, Heater } from "../../../Equipment";
|
|
20
|
-
|
|
21
|
-
export class HeaterStateMessage {
|
|
22
|
-
public static process(msg: Inbound) {
|
|
23
|
-
if (msg.protocol === Protocol.Heater) {
|
|
24
|
-
switch (msg.action) {
|
|
25
|
-
case 112: // This is a message from a master controlling MasterTemp
|
|
26
|
-
case 114: // This is a message from a master controlling UltraTemp
|
|
27
|
-
msg.isProcessed = true;
|
|
28
|
-
break;
|
|
29
|
-
case 116:
|
|
30
|
-
HeaterStateMessage.processMasterTempStatus(msg);
|
|
31
|
-
break;
|
|
32
|
-
case 115:
|
|
33
|
-
HeaterStateMessage.processUltraTempStatus(msg);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
public static processUltraTempStatus(msg: Inbound) {
|
|
39
|
-
// RKS: 07-03-21 - We only know byte 2 at this point for Ultratemp for the 115 message we are processing here. The
|
|
40
|
-
// byte description
|
|
41
|
-
// ------------------------------------------------
|
|
42
|
-
// 0 Unknown (always seems to be 160 for response)
|
|
43
|
-
// 1 Unknown (always 1)
|
|
44
|
-
// 2 Current heater status 0=off, 1=heat, 2=cool
|
|
45
|
-
// 3-9 Unknown
|
|
46
|
-
|
|
47
|
-
// 114 message - outbound response
|
|
48
|
-
//[165, 0, 112, 16, 114, 10][144, 0, 0, 0, 0, 0, 0, 0, 0, 0][2, 49] // OCP to Heater
|
|
49
|
-
// byte description
|
|
50
|
-
// ------------------------------------------------
|
|
51
|
-
// 0 Unknown (always seems to be 144 for request)
|
|
52
|
-
// 1 Current heater status 0=off, 1=heat, 2=cool
|
|
53
|
-
// 3 Believed to be ofset temp
|
|
54
|
-
// 4-9 Unknown
|
|
55
|
-
|
|
56
|
-
// byto 0: always seems to be 144 for outbound
|
|
57
|
-
// byte 1: Sets heater mode to 0 = Off 1 = Heat 2 = Cool
|
|
58
|
-
//[165, 0, 16, 112, 115, 10][160, 1, 0, 3, 0, 0, 0, 0, 0, 0][2, 70] // Heater Reply
|
|
59
|
-
let heater: Heater = sys.heaters.getItemByAddress(msg.source);
|
|
60
|
-
let sheater = state.heaters.getItemById(heater.id);
|
|
61
|
-
let byte = msg.extractPayloadByte(2);
|
|
62
|
-
sheater.isOn = byte >= 1;
|
|
63
|
-
sheater.isCooling = byte === 2;
|
|
64
|
-
sheater.commStatus = 0;
|
|
65
|
-
state.equipment.messages.removeItemByCode(`heater:${heater.id}:comms`);
|
|
66
|
-
msg.isProcessed = true;
|
|
67
|
-
}
|
|
68
|
-
public static processMasterTempStatus(msg: Inbound) {
|
|
69
|
-
//[255, 0, 255][165, 0, 16, 112, 116, 23][67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0][2, 66]
|
|
70
|
-
// Byte 1 is the indicator to which setpoint it is heating to.
|
|
71
|
-
// Byte 8 increments over time when the heater is on.
|
|
72
|
-
// Byte 13 looks like the mode the heater is in for instance it is in cooldown mode.
|
|
73
|
-
// 0 = Normal
|
|
74
|
-
// 2 = ??????
|
|
75
|
-
// 6 = Cooldown
|
|
76
|
-
// Byte 14 looks like the cooldown delay in minutes.
|
|
77
|
-
let heater: Heater = sys.heaters.getItemByAddress(msg.source);
|
|
78
|
-
let sheater = state.heaters.getItemById(heater.id);
|
|
79
|
-
let byte = msg.extractPayloadByte(1);
|
|
80
|
-
sheater.isOn = byte >= 1;
|
|
81
|
-
sheater.isCooling = false;
|
|
82
|
-
sheater.commStatus = 0;
|
|
83
|
-
state.equipment.messages.removeItemByCode(`heater:${heater.id}:comms`);
|
|
84
|
-
msg.isProcessed = true;
|
|
85
|
-
}
|
|
86
|
-
|
|
1
|
+
/* nodejs-poolController. An application to control pool equipment.
|
|
2
|
+
Copyright (C) 2016, 2017, 2018, 2019, 2020. Russell Goldin, tagyoureit. russ.goldin@gmail.com
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
import { Inbound, Protocol } from "../Messages";
|
|
18
|
+
import { state, BodyTempState, HeaterState } from "../../../State";
|
|
19
|
+
import { sys, ControllerType, Heater } from "../../../Equipment";
|
|
20
|
+
|
|
21
|
+
export class HeaterStateMessage {
|
|
22
|
+
public static process(msg: Inbound) {
|
|
23
|
+
if (msg.protocol === Protocol.Heater) {
|
|
24
|
+
switch (msg.action) {
|
|
25
|
+
case 112: // This is a message from a master controlling MasterTemp
|
|
26
|
+
case 114: // This is a message from a master controlling UltraTemp
|
|
27
|
+
msg.isProcessed = true;
|
|
28
|
+
break;
|
|
29
|
+
case 116:
|
|
30
|
+
HeaterStateMessage.processMasterTempStatus(msg);
|
|
31
|
+
break;
|
|
32
|
+
case 115:
|
|
33
|
+
HeaterStateMessage.processUltraTempStatus(msg);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
public static processUltraTempStatus(msg: Inbound) {
|
|
39
|
+
// RKS: 07-03-21 - We only know byte 2 at this point for Ultratemp for the 115 message we are processing here. The
|
|
40
|
+
// byte description
|
|
41
|
+
// ------------------------------------------------
|
|
42
|
+
// 0 Unknown (always seems to be 160 for response)
|
|
43
|
+
// 1 Unknown (always 1)
|
|
44
|
+
// 2 Current heater status 0=off, 1=heat, 2=cool
|
|
45
|
+
// 3-9 Unknown
|
|
46
|
+
|
|
47
|
+
// 114 message - outbound response
|
|
48
|
+
//[165, 0, 112, 16, 114, 10][144, 0, 0, 0, 0, 0, 0, 0, 0, 0][2, 49] // OCP to Heater
|
|
49
|
+
// byte description
|
|
50
|
+
// ------------------------------------------------
|
|
51
|
+
// 0 Unknown (always seems to be 144 for request)
|
|
52
|
+
// 1 Current heater status 0=off, 1=heat, 2=cool
|
|
53
|
+
// 3 Believed to be ofset temp
|
|
54
|
+
// 4-9 Unknown
|
|
55
|
+
|
|
56
|
+
// byto 0: always seems to be 144 for outbound
|
|
57
|
+
// byte 1: Sets heater mode to 0 = Off 1 = Heat 2 = Cool
|
|
58
|
+
//[165, 0, 16, 112, 115, 10][160, 1, 0, 3, 0, 0, 0, 0, 0, 0][2, 70] // Heater Reply
|
|
59
|
+
let heater: Heater = sys.heaters.getItemByAddress(msg.source);
|
|
60
|
+
let sheater = state.heaters.getItemById(heater.id);
|
|
61
|
+
let byte = msg.extractPayloadByte(2);
|
|
62
|
+
sheater.isOn = byte >= 1;
|
|
63
|
+
sheater.isCooling = byte === 2;
|
|
64
|
+
sheater.commStatus = 0;
|
|
65
|
+
state.equipment.messages.removeItemByCode(`heater:${heater.id}:comms`);
|
|
66
|
+
msg.isProcessed = true;
|
|
67
|
+
}
|
|
68
|
+
public static processMasterTempStatus(msg: Inbound) {
|
|
69
|
+
//[255, 0, 255][165, 0, 16, 112, 116, 23][67, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0][2, 66]
|
|
70
|
+
// Byte 1 is the indicator to which setpoint it is heating to.
|
|
71
|
+
// Byte 8 increments over time when the heater is on.
|
|
72
|
+
// Byte 13 looks like the mode the heater is in for instance it is in cooldown mode.
|
|
73
|
+
// 0 = Normal
|
|
74
|
+
// 2 = ??????
|
|
75
|
+
// 6 = Cooldown
|
|
76
|
+
// Byte 14 looks like the cooldown delay in minutes.
|
|
77
|
+
let heater: Heater = sys.heaters.getItemByAddress(msg.source);
|
|
78
|
+
let sheater = state.heaters.getItemById(heater.id);
|
|
79
|
+
let byte = msg.extractPayloadByte(1);
|
|
80
|
+
sheater.isOn = byte >= 1;
|
|
81
|
+
sheater.isCooling = false;
|
|
82
|
+
sheater.commStatus = 0;
|
|
83
|
+
state.equipment.messages.removeItemByCode(`heater:${heater.id}:comms`);
|
|
84
|
+
msg.isProcessed = true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
87
|
}
|