nodejs-poolcontroller 7.6.1 → 8.0.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/.eslintrc.json +36 -45
- 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/CONTRIBUTING.md +74 -74
- package/Changelog +242 -215
- package/Dockerfile +17 -17
- package/Gruntfile.js +40 -40
- package/LICENSE +661 -661
- package/README.md +195 -191
- package/anslq25/MessagesMock.ts +218 -0
- package/anslq25/boards/MockBoardFactory.ts +50 -0
- package/anslq25/boards/MockEasyTouchBoard.ts +696 -0
- package/anslq25/boards/MockSystemBoard.ts +217 -0
- package/anslq25/chemistry/MockChlorinator.ts +75 -0
- package/anslq25/pumps/MockPump.ts +84 -0
- package/app.ts +10 -14
- package/config/Config.ts +26 -8
- package/config/VersionCheck.ts +8 -4
- package/controller/Constants.ts +59 -25
- package/controller/Equipment.ts +2667 -2459
- package/controller/Errors.ts +181 -180
- package/controller/Lockouts.ts +534 -436
- package/controller/State.ts +596 -77
- package/controller/boards/AquaLinkBoard.ts +1003 -0
- package/controller/boards/BoardFactory.ts +53 -45
- package/controller/boards/EasyTouchBoard.ts +3079 -2653
- package/controller/boards/IntelliCenterBoard.ts +3821 -4230
- package/controller/boards/IntelliComBoard.ts +69 -63
- package/controller/boards/IntelliTouchBoard.ts +384 -241
- package/controller/boards/NixieBoard.ts +1871 -1675
- package/controller/boards/SunTouchBoard.ts +393 -0
- package/controller/boards/SystemBoard.ts +5244 -4697
- package/controller/comms/Comms.ts +905 -541
- package/controller/comms/ScreenLogic.ts +1663 -0
- package/controller/comms/messages/Messages.ts +382 -54
- package/controller/comms/messages/config/ChlorinatorMessage.ts +8 -4
- package/controller/comms/messages/config/CircuitGroupMessage.ts +5 -2
- package/controller/comms/messages/config/CircuitMessage.ts +82 -13
- package/controller/comms/messages/config/ConfigMessage.ts +3 -1
- package/controller/comms/messages/config/CoverMessage.ts +2 -1
- package/controller/comms/messages/config/CustomNameMessage.ts +31 -30
- package/controller/comms/messages/config/EquipmentMessage.ts +5 -1
- package/controller/comms/messages/config/ExternalMessage.ts +33 -3
- package/controller/comms/messages/config/FeatureMessage.ts +2 -1
- package/controller/comms/messages/config/GeneralMessage.ts +2 -1
- package/controller/comms/messages/config/HeaterMessage.ts +145 -11
- package/controller/comms/messages/config/IntellichemMessage.ts +2 -1
- package/controller/comms/messages/config/OptionsMessage.ts +16 -27
- package/controller/comms/messages/config/PumpMessage.ts +62 -47
- package/controller/comms/messages/config/RemoteMessage.ts +80 -13
- package/controller/comms/messages/config/ScheduleMessage.ts +390 -347
- package/controller/comms/messages/config/SecurityMessage.ts +2 -1
- package/controller/comms/messages/config/ValveMessage.ts +44 -27
- package/controller/comms/messages/status/ChlorinatorStateMessage.ts +44 -91
- package/controller/comms/messages/status/EquipmentStateMessage.ts +139 -30
- package/controller/comms/messages/status/HeaterStateMessage.ts +135 -86
- package/controller/comms/messages/status/IntelliChemStateMessage.ts +448 -445
- package/controller/comms/messages/status/IntelliValveStateMessage.ts +36 -35
- package/controller/comms/messages/status/PumpStateMessage.ts +92 -2
- package/controller/comms/messages/status/VersionMessage.ts +2 -1
- package/controller/nixie/Nixie.ts +173 -162
- package/controller/nixie/NixieEquipment.ts +104 -103
- package/controller/nixie/bodies/Body.ts +120 -120
- package/controller/nixie/bodies/Filter.ts +135 -135
- package/controller/nixie/chemistry/ChemController.ts +2682 -2498
- package/controller/nixie/chemistry/ChemDoser.ts +806 -0
- package/controller/nixie/chemistry/Chlorinator.ts +367 -314
- package/controller/nixie/circuits/Circuit.ts +402 -248
- package/controller/nixie/heaters/Heater.ts +815 -649
- package/controller/nixie/pumps/Pump.ts +934 -661
- package/controller/nixie/schedules/Schedule.ts +319 -257
- package/controller/nixie/valves/Valve.ts +170 -170
- package/defaultConfig.json +346 -286
- package/logger/DataLogger.ts +448 -448
- package/logger/Logger.ts +38 -9
- package/package.json +60 -56
- package/tsconfig.json +25 -25
- package/web/Server.ts +275 -117
- package/web/bindings/aqualinkD.json +560 -0
- package/web/bindings/homeassistant.json +437 -0
- package/web/bindings/influxDB.json +1066 -1021
- package/web/bindings/mqtt.json +721 -654
- package/web/bindings/mqttAlt.json +746 -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 +188 -136
- package/web/interfaces/httpInterface.ts +148 -124
- package/web/interfaces/influxInterface.ts +283 -245
- package/web/interfaces/mqttInterface.ts +695 -475
- package/web/interfaces/ruleInterface.ts +87 -0
- package/web/services/config/Config.ts +177 -49
- package/web/services/config/ConfigSocket.ts +2 -1
- package/web/services/state/State.ts +154 -3
- package/web/services/state/StateSocket.ts +69 -18
- package/web/services/utilities/Utilities.ts +232 -42
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
- package/config copy.json +0 -300
- package/issue_template.md +0 -52
|
@@ -1,43 +1,233 @@
|
|
|
1
|
-
/* nodejs-poolController. An application to control pool equipment.
|
|
2
|
-
Copyright (C) 2016, 2017, 2018, 2019, 2020
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
/* nodejs-poolController. An application to control pool equipment.
|
|
2
|
+
Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022.
|
|
3
|
+
Russell Goldin, tagyoureit. russ.goldin@gmail.com
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as
|
|
7
|
+
published by the Free Software Foundation, either version 3 of the
|
|
8
|
+
License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import * as path from "path";
|
|
19
|
+
import * as fs from "fs";
|
|
20
|
+
import * as multer from 'multer';
|
|
21
|
+
import * as express from 'express';
|
|
22
|
+
import { SsdpServer} from '../../Server';
|
|
23
|
+
import { state } from "../../../controller/State";
|
|
24
|
+
import { sys } from "../../../controller/Equipment";
|
|
25
|
+
import { webApp } from "../../Server";
|
|
26
|
+
import { config } from "../../../config/Config";
|
|
27
|
+
import { logger } from "../../../logger/Logger";
|
|
28
|
+
import { ServiceParameterError, ServiceProcessError } from "../../../controller/Errors";
|
|
29
|
+
import { BindingsFile } from "../../interfaces/baseInterface";
|
|
30
|
+
import { Utils, utils } from "../../../controller/Constants";
|
|
31
|
+
const extend = require("extend");
|
|
32
|
+
export class UtilitiesRoute {
|
|
33
|
+
|
|
34
|
+
public static initRoutes(app: express.Application) {
|
|
35
|
+
app.use('/upnp.xml', async (req, res, next) => {
|
|
36
|
+
try {
|
|
37
|
+
// Put together the upnp device description.
|
|
38
|
+
let ssdp = webApp.findServer('ssdp') as SsdpServer;
|
|
39
|
+
if (typeof ssdp === 'undefined') throw new Error(`SSDP Server not initialized. No upnp information available.`);
|
|
40
|
+
res.status(200).set('Content-Type', 'text/xml').send(ssdp.deviceXML());
|
|
41
|
+
} catch (err) { next(err); }
|
|
42
|
+
});
|
|
43
|
+
app.get('/extended/:section', (req, res) => {
|
|
44
|
+
let cfg = sys.getSection(req.params.section);
|
|
45
|
+
let st = state.getState(req.params.section);
|
|
46
|
+
let arr = [];
|
|
47
|
+
for (let i = 0; i < cfg.length; i++){
|
|
48
|
+
let p = extend(true, {}, cfg[i], st.find(s => s.id === cfg[i].id));
|
|
49
|
+
arr.push(p);
|
|
50
|
+
}
|
|
51
|
+
return res.status(200).send(arr);
|
|
52
|
+
});
|
|
53
|
+
app.put('/app/interfaces/add', async (req, res, next) => {
|
|
54
|
+
try {
|
|
55
|
+
let faces = config.getSection('web.interfaces');
|
|
56
|
+
let opts: any = {};
|
|
57
|
+
switch (req.body.type) {
|
|
58
|
+
case 'rule':
|
|
59
|
+
opts = {};
|
|
60
|
+
break;
|
|
61
|
+
case 'rem':
|
|
62
|
+
opts = {
|
|
63
|
+
options: { protocol: 'http://', host: '', port: 8080, headers: { "content-type": "application/json" } },
|
|
64
|
+
socket: {
|
|
65
|
+
transports: ['websocket'], allowEIO3: true, upgrade: false,
|
|
66
|
+
reconnectionDelay: 2000, reconnection: true, reconnectionDelayMax: 20000
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
case 'http':
|
|
71
|
+
case 'rest':
|
|
72
|
+
opts = {
|
|
73
|
+
options: { protocol: 'http://', host: '', port: 80 }
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case 'influx':
|
|
77
|
+
case 'influxdb':
|
|
78
|
+
opts = {
|
|
79
|
+
options: {
|
|
80
|
+
version: 1,
|
|
81
|
+
protocol: 'http',
|
|
82
|
+
database: 'pool',
|
|
83
|
+
port: 8601,
|
|
84
|
+
retentionPolicy: 'autogen'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case 'influxdb2':
|
|
89
|
+
opts = {
|
|
90
|
+
options: {
|
|
91
|
+
version: 2,
|
|
92
|
+
protocol: 'http',
|
|
93
|
+
port: 9999,
|
|
94
|
+
database: 'pool',
|
|
95
|
+
bucket: '57ec4eed2d90a50b',
|
|
96
|
+
token: '...LuyM84JJx93Qvc7tfaXPbI_mFFjRBjaA==',
|
|
97
|
+
org: 'njsPC-org'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case 'mqtt':
|
|
102
|
+
opts = {
|
|
103
|
+
options: {
|
|
104
|
+
protocol: 'mqtt://', host: '', port: 1883, username: '', password: '',
|
|
105
|
+
selfSignedCertificate: false,
|
|
106
|
+
rootTopic: "pool/@bind=(state.equipment.model).replace(' ','-').replace(' / ','').toLowerCase();",
|
|
107
|
+
retain: true, qos: 0, changesOnly: true
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
default:
|
|
112
|
+
return Promise.reject(new ServiceParameterError(`An invalid type was specified ${req.body.type}`, 'PUT: /app/interfaces/add', 'type', req.body.type));
|
|
113
|
+
}
|
|
114
|
+
opts.uuid = utils.uuid();
|
|
115
|
+
opts.isCustom = true;
|
|
116
|
+
// Now lets create a name for the element. This would have been much easier if it were an array but alas we are stuck.
|
|
117
|
+
let name = req.body.name.replace(/^[^a-zA-Z_$]|[^0-9a-zA-Z_$]/g, '_');
|
|
118
|
+
if (name.length === 0) return Promise.reject(new ServiceParameterError(`An invalid name was specified ${req.body.name}`, 'PUT: /app/interfaces/add', 'name', req.body.name));
|
|
119
|
+
if (name.charAt(0) >= '0' && name.charAt(0) <= '9') name = 'i' + name;
|
|
120
|
+
let fnEnsureUnique = (name, ord?: number): string => {
|
|
121
|
+
let isUnique = true;
|
|
122
|
+
for (let fname in faces) {
|
|
123
|
+
if (fname === (typeof ord !== 'undefined' ? `${name}_${ord}` : name)) {
|
|
124
|
+
isUnique = false;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (!isUnique) name = fnEnsureUnique(name, typeof ord === 'undefined' ? 0 : ord++);
|
|
129
|
+
return typeof ord !== 'undefined' ? `${name}_${ord}` : name;
|
|
130
|
+
}
|
|
131
|
+
name = fnEnsureUnique(name);
|
|
132
|
+
opts = extend(true, {}, opts, req.body);
|
|
133
|
+
config.setSection(`web.interfaces.${name}`, opts);
|
|
134
|
+
res.status(200).send({ id: name, opts: opts });
|
|
135
|
+
} catch (err) { next(err); }
|
|
136
|
+
});
|
|
137
|
+
app.delete('/app/interface', async (req, res, next) => {
|
|
138
|
+
try {
|
|
139
|
+
let faces = config.getSection('web.interfaces');
|
|
140
|
+
let deleted;
|
|
141
|
+
for (let fname in faces) {
|
|
142
|
+
let iface = faces[fname];
|
|
143
|
+
if (typeof req.body.id !== 'undefined') {
|
|
144
|
+
if (fname === req.body.id) {
|
|
145
|
+
deleted = iface;
|
|
146
|
+
iface.enabled = false;
|
|
147
|
+
await webApp.updateServerInterface(iface);
|
|
148
|
+
config.removeSection(`web.interfaces.${fname}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else if (typeof req.body.uuid !== 'undefined') {
|
|
152
|
+
if (req.body.uuid.toLowerCase() === iface.uuid.toLowerCase()) {
|
|
153
|
+
deleted = iface;
|
|
154
|
+
iface.enabled = false;
|
|
155
|
+
await webApp.updateServerInterface(iface);
|
|
156
|
+
config.removeSection(`web.interfaces.${fname}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return res.status(200).send(deleted);
|
|
161
|
+
} catch (err) { next(err); }
|
|
162
|
+
});
|
|
163
|
+
app.get('/app/options/interfaces', async (req, res, next) => {
|
|
164
|
+
try {
|
|
165
|
+
// todo: move bytevaluemaps out to a proper location; add additional definitions
|
|
166
|
+
let opts = {
|
|
167
|
+
interfaces: config.getSection('web.interfaces'),
|
|
168
|
+
types: [
|
|
169
|
+
{ name: 'rule', desc: 'Rule', hasBindings: true, hasUrl: false },
|
|
170
|
+
{ name: 'rest', desc: 'Rest', hasBindings: true },
|
|
171
|
+
{ name: 'http', desc: 'Http', hasBindings: true },
|
|
172
|
+
{ name: 'rem', desc: 'Relay Equipment Manager', hasBindings: false },
|
|
173
|
+
{ name: 'mqtt', desc: 'MQTT', hasBindings: true },
|
|
174
|
+
{ name: 'influx', desc: 'InfluxDB', hasBindings: true },
|
|
175
|
+
{ name: 'influxdb2', desc: 'InfluxDB2', hasBindings: true}
|
|
176
|
+
],
|
|
177
|
+
protocols: [
|
|
178
|
+
{ val: 0, name: 'http://', desc: 'http://' },
|
|
179
|
+
{ val: 1, name: 'https://', desc: 'https://' },
|
|
180
|
+
{ val: 2, name: 'mqtt://', desc: 'mqtt://' }
|
|
181
|
+
],
|
|
182
|
+
files: []
|
|
183
|
+
}
|
|
184
|
+
// Read all the files in the custom bindings directory.
|
|
185
|
+
let cpath = path.posix.join(process.cwd(), '/web/bindings/custom/');
|
|
186
|
+
let files = fs.readdirSync(cpath);
|
|
187
|
+
for (let i = 0; i < files.length; i++) {
|
|
188
|
+
if (path.extname(files[i]) === '.json') {
|
|
189
|
+
let bf = await BindingsFile.fromFile(path.posix.join(process.cwd(), 'web/bindings/'), `custom/${files[i]}`);
|
|
190
|
+
if (typeof bf !== 'undefined') opts.files.push(bf.options);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return res.status(200).send(opts);
|
|
194
|
+
} catch (err) { next(err); }
|
|
195
|
+
});
|
|
196
|
+
app.post('/app/interfaceBindings/file', async (req, res, next) => {
|
|
197
|
+
try {
|
|
198
|
+
let file = multer({
|
|
199
|
+
limits: { fileSize: 1000000 },
|
|
200
|
+
storage: multer.memoryStorage()
|
|
201
|
+
}).single('bindingsFile');
|
|
202
|
+
file(req, res, async (err) => {
|
|
203
|
+
try {
|
|
204
|
+
if (err) { next(err); }
|
|
205
|
+
else {
|
|
206
|
+
// Validate the incoming data and save it off only if it is valid.
|
|
207
|
+
let bf = await BindingsFile.fromBuffer(req.file.originalname, req.file.buffer);
|
|
208
|
+
if (typeof bf === 'undefined') {
|
|
209
|
+
err = new ServiceProcessError(`Invalid bindings file: ${req.file.originalname}`, 'POST: app/bindings/file', 'extractBindingOptions');
|
|
210
|
+
next(err);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
if (fs.existsSync(bf.filePath))
|
|
214
|
+
return next(new ServiceProcessError(`File already exists ${req.file.originalname}`, 'POST: app/bindings/file', 'writeFile'));
|
|
215
|
+
else {
|
|
216
|
+
try {
|
|
217
|
+
fs.writeFileSync(bf.filePath, req.file.buffer);
|
|
218
|
+
} catch (e) { logger.error(`Error writing bindings file ${e.message}`); }
|
|
219
|
+
}
|
|
220
|
+
return res.status(200).send(bf);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
} catch (e) {
|
|
224
|
+
err = new ServiceProcessError(`Error uploading file: ${e.message}`, 'POST: app/backup/file', 'uploadFile');
|
|
225
|
+
next(err);
|
|
226
|
+
logger.error(e);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
} catch (err) { next(err); }
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
}
|
|
43
233
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Screenshots**
|
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
|
25
|
-
|
|
26
|
-
**Packet Capture**
|
|
27
|
-
Follow the instructions to complete a [packet capture](https://github.com/tagyoureit/nodejs-poolController/wiki/How-to-capture-all-packets-for-issue-resolution) and attach the resulting zip/log files.
|
|
28
|
-
|
|
29
|
-
**Pool Equipment**
|
|
30
|
-
- Controller: [e.g. IntelliCenter, EasyTouch, IntelliTouch]
|
|
31
|
-
- Controller Model: [e.g. IntelliCenter i5PS, EasyTouch2 8P]
|
|
32
|
-
- Controller Firmware Version: [e.g. 1.047]
|
|
33
|
-
- Pump(s) manufacturer and model: [e.g. IntelliFlow 2 VST 011056]
|
|
34
|
-
- Chlorinator: [e.g. iChlor, IntelliChlor-40]
|
|
35
|
-
- Heater(s): [e.g. gas, solar, heatpump, ultratemp]
|
|
36
|
-
- Chemical controller: [e.g. IntelliChem, Relay Equipment Manager (REM)]
|
|
37
|
-
- Valves: [e.g. Intellivalve]
|
|
38
|
-
- Any other relevant equipment:
|
|
39
|
-
|
|
40
|
-
**Desktop (please complete the following information):**
|
|
41
|
-
- OS: [e.g. iOS]
|
|
42
|
-
- Browser [e.g. chrome, safari]
|
|
43
|
-
- Version [e.g. 22]
|
|
44
|
-
|
|
45
|
-
**Smartphone (please complete the following information):**
|
|
46
|
-
- Device: [e.g. iPhone6]
|
|
47
|
-
- OS: [e.g. iOS8.1]
|
|
48
|
-
- Browser [e.g. stock browser, safari]
|
|
49
|
-
- Version [e.g. 22]
|
|
50
|
-
|
|
51
|
-
**Additional context**
|
|
52
|
-
Add any other context about the problem here.
|
package/config copy.json
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"controller": {
|
|
3
|
-
"comms": {
|
|
4
|
-
"enabled": true,
|
|
5
|
-
"rs485Port": "/dev/ttyUSB0",
|
|
6
|
-
"mockPort": false,
|
|
7
|
-
"netConnect": true,
|
|
8
|
-
"netHost": "10.0.0.170",
|
|
9
|
-
"netPort": 9801,
|
|
10
|
-
"inactivityRetry": 10,
|
|
11
|
-
"portSettings": {
|
|
12
|
-
"baudRate": 9600,
|
|
13
|
-
"dataBits": 8,
|
|
14
|
-
"parity": "none",
|
|
15
|
-
"stopBits": 1,
|
|
16
|
-
"flowControl": false,
|
|
17
|
-
"autoOpen": false,
|
|
18
|
-
"lock": false
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"web": {
|
|
23
|
-
"servers": {
|
|
24
|
-
"http2": {
|
|
25
|
-
"enabled": false,
|
|
26
|
-
"uuid": "2365fe2f-97e9-4353-95d4-9ccd71e0ce94"
|
|
27
|
-
},
|
|
28
|
-
"http": {
|
|
29
|
-
"enabled": true,
|
|
30
|
-
"ip": "0.0.0.0",
|
|
31
|
-
"port": 4200,
|
|
32
|
-
"httpsRedirect": false,
|
|
33
|
-
"authentication": "none",
|
|
34
|
-
"authFile": "/users.htpasswd",
|
|
35
|
-
"uuid": "4ff21da9-8ba5-49e6-8c87-20e1c988ef9d"
|
|
36
|
-
},
|
|
37
|
-
"https": {
|
|
38
|
-
"enabled": false,
|
|
39
|
-
"ip": "0.0.0.0",
|
|
40
|
-
"port": 4201,
|
|
41
|
-
"authentication": "none",
|
|
42
|
-
"authFile": "/users.htpasswd",
|
|
43
|
-
"sslKeyFile": "",
|
|
44
|
-
"sslCertFile": "",
|
|
45
|
-
"uuid": "fb7e9f5e-d662-4000-b1ca-c01e17f2fc49"
|
|
46
|
-
},
|
|
47
|
-
"mdns": {
|
|
48
|
-
"enabled": false,
|
|
49
|
-
"uuid": "1e7bd3d0-f1d0-4dc5-95d4-f0bd0ceb2d76"
|
|
50
|
-
},
|
|
51
|
-
"ssdp": {
|
|
52
|
-
"enabled": true,
|
|
53
|
-
"uuid": "4fd33942-66c9-46a7-8a5a-9e50fc0f315f"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"services": {},
|
|
57
|
-
"interfaces": {
|
|
58
|
-
"smartThings": {
|
|
59
|
-
"name": "SmartThings",
|
|
60
|
-
"enabled": false,
|
|
61
|
-
"fileName": "smartThings-Hubitat.json",
|
|
62
|
-
"globals": {},
|
|
63
|
-
"options": {
|
|
64
|
-
"host": "0.0.0.0",
|
|
65
|
-
"port": 39500
|
|
66
|
-
},
|
|
67
|
-
"uuid": "95b47bcc-fb46-47c2-a44a-cd9aaa867ccc"
|
|
68
|
-
},
|
|
69
|
-
"hubitat": {
|
|
70
|
-
"name": "Hubitat",
|
|
71
|
-
"enabled": false,
|
|
72
|
-
"fileName": "smartThings-Hubitat.json",
|
|
73
|
-
"globals": {},
|
|
74
|
-
"options": {
|
|
75
|
-
"host": "0.0.0.0",
|
|
76
|
-
"port": 39501
|
|
77
|
-
},
|
|
78
|
-
"uuid": "4573370e-5ae1-40a5-bda3-9597b17e4050"
|
|
79
|
-
},
|
|
80
|
-
"vera": {
|
|
81
|
-
"name": "Vera",
|
|
82
|
-
"enabled": false,
|
|
83
|
-
"fileName": "vera.json",
|
|
84
|
-
"vars": {
|
|
85
|
-
"deviceId": 0
|
|
86
|
-
},
|
|
87
|
-
"options": {
|
|
88
|
-
"host": "",
|
|
89
|
-
"port": 3480
|
|
90
|
-
},
|
|
91
|
-
"uuid": "bc256cd7-af18-41f3-a94d-43397c835165"
|
|
92
|
-
},
|
|
93
|
-
"valveRelay": {
|
|
94
|
-
"name": "Valve Relays",
|
|
95
|
-
"enabled": false,
|
|
96
|
-
"fileName": "valveRelays.json",
|
|
97
|
-
"vars": {
|
|
98
|
-
"valveIds": []
|
|
99
|
-
},
|
|
100
|
-
"options": {
|
|
101
|
-
"host": "0.0.0.0",
|
|
102
|
-
"port": 8081
|
|
103
|
-
},
|
|
104
|
-
"uuid": "415c5cbd-01e0-43bb-99c9-15a003febe0c"
|
|
105
|
-
},
|
|
106
|
-
"influxDB": {
|
|
107
|
-
"name": "InfluxDB",
|
|
108
|
-
"type": "influx",
|
|
109
|
-
"enabled": false,
|
|
110
|
-
"fileName": "influxDB.json",
|
|
111
|
-
"options": {
|
|
112
|
-
"protocol": "http",
|
|
113
|
-
"host": "192.168.0.1",
|
|
114
|
-
"port": 32770,
|
|
115
|
-
"username": "",
|
|
116
|
-
"password": "",
|
|
117
|
-
"database": "pool",
|
|
118
|
-
"retentionPolicy": "autogen"
|
|
119
|
-
},
|
|
120
|
-
"uuid": "7e7875c8-0161-448b-b9fa-c818f0d3d49f"
|
|
121
|
-
},
|
|
122
|
-
"mqtt": {
|
|
123
|
-
"name": "MQTT",
|
|
124
|
-
"type": "mqtt",
|
|
125
|
-
"enabled": false,
|
|
126
|
-
"fileName": "mqtt.json",
|
|
127
|
-
"globals": {},
|
|
128
|
-
"options": {
|
|
129
|
-
"protocol": "mqtt://",
|
|
130
|
-
"host": "192.168.0.1",
|
|
131
|
-
"port": 1883,
|
|
132
|
-
"username": "",
|
|
133
|
-
"password": "",
|
|
134
|
-
"rootTopic": "@bind=(state.equipment.model).replace(' ','-').replace('/','').toLowerCase();",
|
|
135
|
-
"retain": true,
|
|
136
|
-
"qos": 0,
|
|
137
|
-
"changesOnly": true
|
|
138
|
-
},
|
|
139
|
-
"uuid": "dec40fe7-70d5-48d1-8f57-0e1a474838e6"
|
|
140
|
-
},
|
|
141
|
-
"mqttAlt": {
|
|
142
|
-
"name": "MQTTAlt",
|
|
143
|
-
"type": "mqtt",
|
|
144
|
-
"enabled": false,
|
|
145
|
-
"fileName": "mqttAlt.json",
|
|
146
|
-
"globals": {},
|
|
147
|
-
"options": {
|
|
148
|
-
"protocol": "mqtt://",
|
|
149
|
-
"host": "192.168.0.1",
|
|
150
|
-
"port": 1883,
|
|
151
|
-
"username": "",
|
|
152
|
-
"password": "",
|
|
153
|
-
"rootTopic": "@bind=(state.equipment.model).replace(' ','-').replace('/','').toLowerCase();Alt",
|
|
154
|
-
"retain": true,
|
|
155
|
-
"qos": 0,
|
|
156
|
-
"changesOnly": true
|
|
157
|
-
},
|
|
158
|
-
"uuid": "b8b0e719-a81f-4085-b69e-5df3adfa990c"
|
|
159
|
-
},
|
|
160
|
-
"rem": {
|
|
161
|
-
"name": "Relay Equipment Manager",
|
|
162
|
-
"type": "rem",
|
|
163
|
-
"enabled": true,
|
|
164
|
-
"options": {
|
|
165
|
-
"protocol": "http://",
|
|
166
|
-
"host": "10.0.0.98",
|
|
167
|
-
"port": "8080",
|
|
168
|
-
"headers": {
|
|
169
|
-
"content-type": "application/json"
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
"socket": {
|
|
173
|
-
"transports": [
|
|
174
|
-
"websocket"
|
|
175
|
-
],
|
|
176
|
-
"upgrade": false,
|
|
177
|
-
"reconnectionDelay": 2000,
|
|
178
|
-
"reconnection": true,
|
|
179
|
-
"reconnectionDelayMax": 20000
|
|
180
|
-
},
|
|
181
|
-
"uuid": "af4c8252-0715-4edd-872f-9eeda8f18754"
|
|
182
|
-
},
|
|
183
|
-
"rem2": {
|
|
184
|
-
"name": "Relay Equipment Manager2",
|
|
185
|
-
"type": "rem",
|
|
186
|
-
"enabled": false,
|
|
187
|
-
"options": {
|
|
188
|
-
"protocol": "http://",
|
|
189
|
-
"host": "raspberrypi3",
|
|
190
|
-
"port": "8080",
|
|
191
|
-
"headers": {
|
|
192
|
-
"content-type": "application/json"
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"socket": {
|
|
196
|
-
"transports": [
|
|
197
|
-
"websocket"
|
|
198
|
-
],
|
|
199
|
-
"upgrade": false,
|
|
200
|
-
"reconnectionDelay": 2000,
|
|
201
|
-
"reconnection": true,
|
|
202
|
-
"reconnectionDelayMax": 20000
|
|
203
|
-
},
|
|
204
|
-
"uuid": "9346f2a7-734d-475b-a90e-2b43f6131a4c"
|
|
205
|
-
},
|
|
206
|
-
"rulesManager": {
|
|
207
|
-
"name": "Rules Manager",
|
|
208
|
-
"type": "http",
|
|
209
|
-
"enabled": false,
|
|
210
|
-
"fileName": "rulesManager.json",
|
|
211
|
-
"globals": {},
|
|
212
|
-
"options": {
|
|
213
|
-
"host": "localhost",
|
|
214
|
-
"port": 4200
|
|
215
|
-
},
|
|
216
|
-
"uuid": "65ee2581-e652-427e-99c6-17c6aa02a6e3"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
"log": {
|
|
221
|
-
"packet": {
|
|
222
|
-
"enabled": true,
|
|
223
|
-
"logToConsole": true,
|
|
224
|
-
"logToFile": false,
|
|
225
|
-
"filename": "packetLog",
|
|
226
|
-
"invalid": false,
|
|
227
|
-
"broadcast": {
|
|
228
|
-
"enabled": true,
|
|
229
|
-
"includeActions": [
|
|
230
|
-
23,
|
|
231
|
-
24,
|
|
232
|
-
152,
|
|
233
|
-
155,
|
|
234
|
-
215,
|
|
235
|
-
216
|
|
236
|
-
],
|
|
237
|
-
"includeSource": [],
|
|
238
|
-
"includeDest": [],
|
|
239
|
-
"excludeActions": [],
|
|
240
|
-
"excludeSource": [],
|
|
241
|
-
"excludeDest": []
|
|
242
|
-
},
|
|
243
|
-
"pump": {
|
|
244
|
-
"enabled": false,
|
|
245
|
-
"includeActions": [],
|
|
246
|
-
"includeSource": [],
|
|
247
|
-
"includeDest": [],
|
|
248
|
-
"excludeActions": [],
|
|
249
|
-
"excludeSource": [],
|
|
250
|
-
"excludeDest": []
|
|
251
|
-
},
|
|
252
|
-
"chlorinator": {
|
|
253
|
-
"enabled": false,
|
|
254
|
-
"includeSource": [],
|
|
255
|
-
"includeDest": [],
|
|
256
|
-
"excludeSource": [],
|
|
257
|
-
"excludeDest": []
|
|
258
|
-
},
|
|
259
|
-
"intellichem": {
|
|
260
|
-
"enabled": false,
|
|
261
|
-
"includeActions": [],
|
|
262
|
-
"excludeActions": [],
|
|
263
|
-
"includeSource": [],
|
|
264
|
-
"includeDest": [],
|
|
265
|
-
"excludeSource": [],
|
|
266
|
-
"excludeDest": []
|
|
267
|
-
},
|
|
268
|
-
"intellivalve": {
|
|
269
|
-
"enabled": false,
|
|
270
|
-
"includeActions": [],
|
|
271
|
-
"excludeActions": [],
|
|
272
|
-
"includeSource": [],
|
|
273
|
-
"includeDest": [],
|
|
274
|
-
"excludeSource": [],
|
|
275
|
-
"excludeDest": []
|
|
276
|
-
},
|
|
277
|
-
"unidentified": {
|
|
278
|
-
"enabled": true,
|
|
279
|
-
"includeSource": [],
|
|
280
|
-
"includeDest": [],
|
|
281
|
-
"excludeSource": [],
|
|
282
|
-
"excludeDest": []
|
|
283
|
-
},
|
|
284
|
-
"unknown": {
|
|
285
|
-
"enabled": true,
|
|
286
|
-
"includeSource": [],
|
|
287
|
-
"includeDest": [],
|
|
288
|
-
"excludeSource": [],
|
|
289
|
-
"excludeDest": []
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
"app": {
|
|
293
|
-
"enabled": true,
|
|
294
|
-
"level": "verbose",
|
|
295
|
-
"captureForReplay": false,
|
|
296
|
-
"logToFile": false
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
"appVersion": "6.5.2"
|
|
300
|
-
}
|
package/issue_template.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Screenshots**
|
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
|
25
|
-
|
|
26
|
-
**Packet Capture**
|
|
27
|
-
Follow the instructions to complete a [packet capture](https://github.com/tagyoureit/nodejs-poolController/wiki/How-to-capture-all-packets-for-issue-resolution) and attach the resulting zip/log files.
|
|
28
|
-
|
|
29
|
-
**Pool Equipment**
|
|
30
|
-
- Controller: [e.g. IntelliCenter, EasyTouch, IntelliTouch]
|
|
31
|
-
- Controller Model: [e.g. IntelliCenter i5PS, EasyTouch2 8P]
|
|
32
|
-
- Controller Firmware Version: [e.g. 1.047]
|
|
33
|
-
- Pump(s) manufacturer and model: [e.g. IntelliFlow 2 VST 011056]
|
|
34
|
-
- Chlorinator: [e.g. iChlor, IntelliChlor-40]
|
|
35
|
-
- Heater(s): [e.g. gas, solar, heatpump, ultratemp]
|
|
36
|
-
- Chemical controller: [e.g. IntelliChem, Relay Equipment Manager (REM)]
|
|
37
|
-
- Valves: [e.g. Intellivalve]
|
|
38
|
-
- Any other relevant equipment:
|
|
39
|
-
|
|
40
|
-
**Desktop (please complete the following information):**
|
|
41
|
-
- OS: [e.g. iOS]
|
|
42
|
-
- Browser [e.g. chrome, safari]
|
|
43
|
-
- Version [e.g. 22]
|
|
44
|
-
|
|
45
|
-
**Smartphone (please complete the following information):**
|
|
46
|
-
- Device: [e.g. iPhone6]
|
|
47
|
-
- OS: [e.g. iOS8.1]
|
|
48
|
-
- Browser [e.g. stock browser, safari]
|
|
49
|
-
- Version [e.g. 22]
|
|
50
|
-
|
|
51
|
-
**Additional context**
|
|
52
|
-
Add any other context about the problem here.
|