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
|
@@ -33,7 +33,7 @@ Follow the instructions to complete a [packet capture](https://github.com/tagyou
|
|
|
33
33
|
- Pump(s) manufacturer and model: [e.g. IntelliFlow 2 VST 011056]
|
|
34
34
|
- Chlorinator: [e.g. iChlor, IntelliChlor-40]
|
|
35
35
|
- Heater(s): [e.g. gas, solar, heatpump, ultratemp]
|
|
36
|
-
- Chemical controller: [e.g. IntelliChem,
|
|
36
|
+
- Chemical controller: [e.g. IntelliChem, Relay Equipment Manager (REM)]
|
|
37
37
|
- Valves: [e.g. Intellivalve]
|
|
38
38
|
- Any other relevant equipment:
|
|
39
39
|
|
package/Changelog
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## 7.6
|
|
3
|
+
1. MasterTemp RS485 support for Nixie and IntelliCenter
|
|
4
|
+
2. Nixie Valve Rotation delay
|
|
5
|
+
3. Nixie Heater Cooldown delay
|
|
6
|
+
4. Nixie Cleaner Start delay
|
|
7
|
+
5. Nixie Cleaner Shutdown on Solar
|
|
8
|
+
6. Nixie Delay Cancel
|
|
9
|
+
|
|
10
|
+
## 7.5.1
|
|
11
|
+
1. Backup/restore fixes
|
|
12
|
+
2. Egg timer expiration
|
|
13
|
+
3. Bug Fixes
|
|
14
|
+
4. dashPanel/messageManager Filter
|
|
15
|
+
5. RS485 refactor
|
|
16
|
+
|
|
17
|
+
## 7.5
|
|
18
|
+
1. Backup/restore
|
|
19
|
+
2. Intellitouch add expansion modules
|
|
20
|
+
## 7.4
|
|
21
|
+
1. Filter object, emit, monitoring
|
|
22
|
+
|
|
23
|
+
## 7.3.1
|
|
24
|
+
1. Influx 2.0 support
|
|
2
25
|
|
|
3
26
|
## 7.3
|
|
4
27
|
1. Dynamic chlorinating % based on ORP demand for Nixie
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# nodejs-poolController - Version 7.
|
|
1
|
+
# nodejs-poolController - Version 7.6
|
|
2
2
|
|
|
3
3
|
## What is nodejs-poolController
|
|
4
4
|
|
|
@@ -15,13 +15,13 @@ Equipment supported
|
|
|
15
15
|
1. Pumps: Intelliflow VS/VSF/VF, older models
|
|
16
16
|
1. Chlorinators: Intellichlor, Aqua-Rite and OEM brands
|
|
17
17
|
1. Heaters: Gas, solar, heatpump
|
|
18
|
-
1. Intellichem and
|
|
18
|
+
1. Intellichem and Relay Equipment Manager (REM) chemical controllers
|
|
19
19
|
1. Intellivalve (coming soon)
|
|
20
20
|
1. Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo
|
|
21
21
|
1. Chemical probes (pH, ORP, flow sensors, EC, etc.)
|
|
22
22
|
|
|
23
23
|
## Latest Changes
|
|
24
|
-
See (
|
|
24
|
+
See [Changelog](https://github.com/tagyoureit/nodejs-poolController/blob/master/Changelog)
|
|
25
25
|
|
|
26
26
|
## What's new in 7.0?
|
|
27
27
|
|
|
@@ -84,8 +84,8 @@ To do anything with this app, you need a client to connect to it. A client can
|
|
|
84
84
|
* Temperature sensors (10k, NTC)
|
|
85
85
|
|
|
86
86
|
## Web Clients
|
|
87
|
-
1.
|
|
88
|
-
1.
|
|
87
|
+
1. [nodejs-poolController-dashPanel](https://github.com/rstrouse/nodejs-poolController-dashPanel). Full compatibility with IntelliCenter, *Touch, REM (RelayEquipmentManager).
|
|
88
|
+
1. Deprecated - ~~[nodejs-poolController-webClient](http://github.com/tagyoureit/nodejs-poolController-webClient). Built primarily around EasyTouch/IntelliTouch but will work with other systems.~~
|
|
89
89
|
|
|
90
90
|
* This app has the default to only listen to clients from localhost (127.0.0.1). If you need to have clients connect from other machines you will need to change the [ip](#module_nodejs-poolController--config.json) in `config.json`.
|
|
91
91
|
|
package/app.ts
CHANGED
|
@@ -35,6 +35,7 @@ export async function initAsync() {
|
|
|
35
35
|
await state.init();
|
|
36
36
|
await webApp.init();
|
|
37
37
|
await sys.start();
|
|
38
|
+
await webApp.initAutoBackup();
|
|
38
39
|
} catch (err) { console.log(`Error Initializing nodejs-PoolController ${err.message}`); }
|
|
39
40
|
//return Promise.resolve()
|
|
40
41
|
// .then(function () { config.init(); })
|
|
@@ -70,6 +71,7 @@ export async function stopAsync(): Promise<void> {
|
|
|
70
71
|
try {
|
|
71
72
|
console.log('Shutting down open processes');
|
|
72
73
|
// await sys.board.virtualPumpControllers.stopAsync();
|
|
74
|
+
await webApp.stopAutoBackup();
|
|
73
75
|
await sys.stopAsync();
|
|
74
76
|
await state.stopAsync();
|
|
75
77
|
await conn.stopAsync();
|
package/config/Config.ts
CHANGED
|
@@ -100,6 +100,8 @@ class Config {
|
|
|
100
100
|
c[section] = val;
|
|
101
101
|
this.update();
|
|
102
102
|
}
|
|
103
|
+
// RKS: 09-21-21 - We are counting on the return from this being immutable. A copy of the data
|
|
104
|
+
// should always be returned here.
|
|
103
105
|
public getSection(section?: string, opts?: any): any {
|
|
104
106
|
if (typeof section === 'undefined') return this._cfg;
|
|
105
107
|
let c: any = this._cfg;
|
|
@@ -118,6 +120,7 @@ class Config {
|
|
|
118
120
|
let baseDir = process.cwd();
|
|
119
121
|
this.ensurePath(baseDir + '/logs/');
|
|
120
122
|
this.ensurePath(baseDir + '/data/');
|
|
123
|
+
this.ensurePath(baseDir + '/backups/');
|
|
121
124
|
// this.ensurePath(baseDir + '/replay/');
|
|
122
125
|
//setTimeout(() => { config.update(); }, 100);
|
|
123
126
|
}
|
package/config/VersionCheck.ts
CHANGED
|
@@ -41,7 +41,7 @@ class VersionCheck {
|
|
|
41
41
|
public checkGitLocal() {
|
|
42
42
|
// check local git version
|
|
43
43
|
try {
|
|
44
|
-
let res = execSync('git rev-parse --abbrev-ref HEAD');
|
|
44
|
+
let res = execSync('git rev-parse --abbrev-ref HEAD', { stdio: 'pipe' });
|
|
45
45
|
let out = res.toString().trim();
|
|
46
46
|
logger.info(`The current git branch output is ${out}`);
|
|
47
47
|
switch (out) {
|
|
@@ -54,10 +54,11 @@ class VersionCheck {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
catch (err) {
|
|
57
|
-
|
|
57
|
+
state.appVersion.gitLocalBranch = '--';
|
|
58
|
+
logger.warn(`Unable to retrieve local git branch. ${err}`);
|
|
58
59
|
}
|
|
59
60
|
try {
|
|
60
|
-
let res = execSync('git rev-parse HEAD');
|
|
61
|
+
let res = execSync('git rev-parse HEAD', { stdio: 'pipe' });
|
|
61
62
|
let out = res.toString().trim();
|
|
62
63
|
logger.info(`The current git commit output is ${out}`);
|
|
63
64
|
switch (out) {
|
|
@@ -69,7 +70,10 @@ class VersionCheck {
|
|
|
69
70
|
state.appVersion.gitLocalCommit = out;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
catch (err) {
|
|
73
|
+
catch (err) {
|
|
74
|
+
state.appVersion.gitLocalCommit = '--';
|
|
75
|
+
logger.warn(`Unable to retrieve local git commit. ${err}`);
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
private checkAll() {
|
|
75
79
|
try {
|
package/controller/Constants.ts
CHANGED
|
@@ -368,6 +368,94 @@ export class Utils {
|
|
|
368
368
|
if (typeof fn !== 'undefined' && typeof fn[to.toLowerCase()] === 'function') return fn[to.toLowerCase()](val);
|
|
369
369
|
}
|
|
370
370
|
},
|
|
371
|
+
pressure: {
|
|
372
|
+
bar: {
|
|
373
|
+
kpa: (val) => { return val * 100; },
|
|
374
|
+
kilopascal: (val) => { return val * 100; },
|
|
375
|
+
pa: (val) => { return val * 100000; },
|
|
376
|
+
pascal: (val) => { return val * 100000; },
|
|
377
|
+
atm: (val) => { return val * 0.986923; },
|
|
378
|
+
atmosphere: (val) => { return val * 0.986923; },
|
|
379
|
+
psi: (val) => { return val * 14.5038; },
|
|
380
|
+
bar: (val) => { return val; }
|
|
381
|
+
},
|
|
382
|
+
kpa: {
|
|
383
|
+
kpa: (val) => { return val; },
|
|
384
|
+
kilopascal: (val) => { return val; },
|
|
385
|
+
pa: (val) => { return val * 1000; },
|
|
386
|
+
pascal: (val) => { return val * 1000; },
|
|
387
|
+
atm: (val) => { return val / 101.325; },
|
|
388
|
+
atmosphere: (val) => { return val / 101.325; },
|
|
389
|
+
psi: (val) => { return val * 0.145038; },
|
|
390
|
+
bar: (val) => { return val * .01; }
|
|
391
|
+
},
|
|
392
|
+
kilopascal: {
|
|
393
|
+
kpa: (val) => { return val; },
|
|
394
|
+
kilopascal: (val) => { return val; },
|
|
395
|
+
pa: (val) => { return val * 1000; },
|
|
396
|
+
pascal: (val) => { return val * 1000; },
|
|
397
|
+
atm: (val) => { return val / 101.325; },
|
|
398
|
+
atmosphere: (val) => { return val / 101.325; },
|
|
399
|
+
psi: (val) => { return val * 0.145038; },
|
|
400
|
+
bar: (val) => { return val * .01; }
|
|
401
|
+
},
|
|
402
|
+
pa: {
|
|
403
|
+
kpa: (val) => { return val / 1000; },
|
|
404
|
+
kilopascal: (val) => { return val / 1000; },
|
|
405
|
+
pa: (val) => { return val; },
|
|
406
|
+
pascal: (val) => { return val; },
|
|
407
|
+
atm: (val) => { return val / 101325; },
|
|
408
|
+
atmosphere: (val) => { return val / 101325; },
|
|
409
|
+
psi: (val) => { return val * 0.000145038; },
|
|
410
|
+
bar: (val) => { return val / 100000; }
|
|
411
|
+
},
|
|
412
|
+
pascal: {
|
|
413
|
+
kpa: (val) => { return val / 1000; },
|
|
414
|
+
kilopascal: (val) => { return val / 1000; },
|
|
415
|
+
pa: (val) => { return val; },
|
|
416
|
+
pascal: (val) => { return val; },
|
|
417
|
+
atm: (val) => { return val / 101325; },
|
|
418
|
+
atmosphere: (val) => { return val / 101325; },
|
|
419
|
+
psi: (val) => { return val * 0.000145038; },
|
|
420
|
+
bar: (val) => { return val / 100000; }
|
|
421
|
+
},
|
|
422
|
+
atm: {
|
|
423
|
+
kpa: (val) => { return val * 101.325; },
|
|
424
|
+
kilopascal: (val) => { return val * 101.325; },
|
|
425
|
+
pa: (val) => { return val * 101325; },
|
|
426
|
+
pascal: (val) => { return val * 101325; },
|
|
427
|
+
atm: (val) => { return val; },
|
|
428
|
+
atmosphere: (val) => { return val; },
|
|
429
|
+
psi: (val) => { return val * 14.6959; },
|
|
430
|
+
bar: (val) => { return val * 1.01325; }
|
|
431
|
+
},
|
|
432
|
+
atmosphere: {
|
|
433
|
+
kpa: (val) => { return val * 101.325; },
|
|
434
|
+
kilopascal: (val) => { return val * 101.325; },
|
|
435
|
+
pa: (val) => { return val * 101325; },
|
|
436
|
+
pascal: (val) => { return val * 101325; },
|
|
437
|
+
atm: (val) => { return val; },
|
|
438
|
+
atmosphere: (val) => { return val; },
|
|
439
|
+
psi: (val) => { return val * 14.6959; },
|
|
440
|
+
bar: (val) => { return val * 1.01325; }
|
|
441
|
+
},
|
|
442
|
+
psi: {
|
|
443
|
+
kpa: (val) => { return val * 6.89476; },
|
|
444
|
+
kilopascal: (val) => { return val * 6.89476; },
|
|
445
|
+
pa: (val) => { return val * 6894.76; },
|
|
446
|
+
pascal: (val) => { return val * 6894.76; },
|
|
447
|
+
atm: (val) => { return val * 0.068046; },
|
|
448
|
+
atmosphere: (val) => { return 0.068046; },
|
|
449
|
+
psi: (val) => { return val; },
|
|
450
|
+
bar: (val) => { return val * 0.0689476; }
|
|
451
|
+
},
|
|
452
|
+
convertUnits: (val: number, from: string, to: string) => {
|
|
453
|
+
if (typeof val !== 'number') return null;
|
|
454
|
+
let fn = this.convert.pressure[from.toLowerCase()];
|
|
455
|
+
if (typeof fn !== 'undefined' && typeof fn[to.toLowerCase()] === 'function') return fn[to.toLowerCase()](val);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
},
|
|
371
459
|
volume: {
|
|
372
460
|
gal: {
|
|
373
461
|
l: (val) => { return val * 3.78541; },
|