@xyo-network/pentair-plugin 2.56.0 → 2.56.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.
@@ -1,15 +1,37 @@
1
+ import { assertEx } from '@xylabs/assert';
1
2
  import { XyoPentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin';
2
3
  import { AbstractWitness } from '@xyo-network/witness';
3
- import { Controller } from './screenlogic';
4
+ import { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic';
4
5
  export const XyoPentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
5
- export class XyoPentairScreenlogicWitness extends AbstractWitness {
6
+ class XyoPentairScreenlogicWitness extends AbstractWitness {
6
7
  static configSchema = XyoPentairScreenlogicWitnessConfigSchema;
7
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
- controller = new Controller();
9
8
  async observe(_payloads) {
10
- const config = await this.controller.getPoolConfig();
11
- const status = await this.controller.getPoolStatus();
12
- return await super.observe([{ config, schema: XyoPentairScreenlogicSchema, status }]);
9
+ const finder = new FindUnits();
10
+ const localUnit = assertEx((await finder.searchAsync()).shift(), 'No local screenlogic unit found');
11
+ screenlogic.initUnit(localUnit);
12
+ assertEx(await screenlogic.connectAsync(), 'Failed to connect to ScreenLogic');
13
+ return await super.observe([
14
+ {
15
+ chem: await screenlogic.chem.getChemicalDataAsync(),
16
+ chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
17
+ equipment: {
18
+ circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
19
+ config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
20
+ controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
21
+ customNames: await screenlogic.equipment.getCustomNamesAsync(),
22
+ state: await screenlogic.equipment.getEquipmentStateAsync(),
23
+ systemTime: await screenlogic.equipment.getSystemTimeAsync(),
24
+ weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),
25
+ },
26
+ schedule: {
27
+ once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
28
+ recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),
29
+ },
30
+ schema: XyoPentairScreenlogicSchema,
31
+ version: await screenlogic.getVersionAsync(),
32
+ },
33
+ ]);
13
34
  }
14
35
  }
36
+ export { XyoPentairScreenlogicWitness };
15
37
  //# sourceMappingURL=Witness.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AAC/G,OAAO,EAAE,eAAe,EAAgC,MAAM,sBAAsB,CAAA;AAEpF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,MAAM,CAAC,MAAM,wCAAwC,GAA6C,gDAAgD,CAAA;AAmBlJ,MAAM,OAAO,4BAEX,SAAQ,eAAwB;IAChC,MAAM,CAAU,YAAY,GAAG,wCAAwC,CAAA;IAEvE,8DAA8D;IACpD,UAAU,GAAG,IAAI,UAAU,EAAE,CAAA;IAE9B,KAAK,CAAC,OAAO,CAAC,SAA8B;QACnD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA;QACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA;QACpD,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,2BAA2B,EAAE,MAAM,EAAE,CAAmC,CAAC,CAAA;IACzH,CAAC"}
1
+ {"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAGzC,OAAO,EAAgC,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AAC/G,OAAO,EAAE,eAAe,EAAgC,MAAM,sB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E;oBACR,IAAI,EAAE,MAAM,WAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,OAAO,CAAC;oBACzE,SAAS,EAAE,MAAM,WAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,SAAS,CAAC;iBACjF;gBACD,MAAM,EAAE,2BAA2B;gBACnC,OAAO,EAAE,MAAM,WAAW,CAAC,eAAe,EAAE;aAC7C;SACgC,CAAC,CAAA;IACtC,CAAC;;SAhCU,4BAA4B"}
@@ -1,24 +1,14 @@
1
1
  import { AnyConfigSchema } from '@xyo-network/module';
2
2
  import { Payload } from '@xyo-network/payload-model';
3
3
  import { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness';
4
- import { Controller } from './screenlogic';
5
4
  export type XyoPentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
6
5
  export declare const XyoPentairScreenlogicWitnessConfigSchema: XyoPentairScreenlogicWitnessConfigSchema;
7
- export interface PentairServer {
8
- address: string;
9
- gatewayName: string;
10
- gatewaySubtype: number;
11
- gatewayType: number;
12
- port: number;
13
- type: number;
14
- }
15
6
  export type XyoPentairScreenlogicWitnessConfig = WitnessConfig<{
16
7
  schema: XyoPentairScreenlogicWitnessConfigSchema;
17
8
  }>;
18
9
  export type XyoPentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<XyoPentairScreenlogicWitnessConfig>>;
19
10
  export declare class XyoPentairScreenlogicWitness<TParams extends XyoPentairScreenlogicWitnessParams = XyoPentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
20
11
  static configSchema: "network.xyo.pentair.screenlogic.witness.config";
21
- protected controller: Controller;
22
12
  observe(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
23
13
  }
24
14
  //# sourceMappingURL=Witness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,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wC,GAAG,gDAAgD,CAAA;AACvG,eAAO,MAAM,wCAAwC,EAAE,wCAA2F,CAAA;AAElJ,MAAM,MAAM,kCAAkC,GAAG,aAAa,CAAC;IAC7D,MAAM,EAAE,wCAAwC,CAAA;CACjD,CAAC,CAAA;AAEF,MAAM,MAAM,kCAAkC,GAAG,aAAa,CAAC,eAAe,CAAC,kCAAkC,CAAC,CAAC,CAAA;AAEnH,qBAAa,4BAA4B,CACvC,OAAO,SAAS,kCAAkC,GAAG,kCAAkC,CACvF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,YAAY,mDAA2C;IAExD,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B3E"}
package/package.json CHANGED
@@ -10,17 +10,17 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xyo-network/module": "^2.56.0",
14
- "@xyo-network/payload-model": "^2.56.0",
15
- "@xyo-network/payloadset-plugin": "^2.56.0",
16
- "@xyo-network/pentair-payload-plugin": "^2.56.0",
17
- "@xyo-network/witness": "^2.56.0",
13
+ "@xyo-network/module": "^2.56.1",
14
+ "@xyo-network/payload-model": "^2.56.1",
15
+ "@xyo-network/payloadset-plugin": "^2.56.1",
16
+ "@xyo-network/pentair-payload-plugin": "^2.56.1",
17
+ "@xyo-network/witness": "^2.56.1",
18
18
  "node-screenlogic": "^2.0.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@xylabs/ts-scripts-yarn3": "^2.16.5",
22
- "@xylabs/tsconfig": "^2.16.5",
23
- "typescript": "^4.9.5"
21
+ "@xylabs/ts-scripts-yarn3": "^2.17.6",
22
+ "@xylabs/tsconfig": "^2.17.6",
23
+ "typescript": "^5.0.4"
24
24
  },
25
25
  "description": "Primary SDK for using XYO Protocol 2.0",
26
26
  "browser": "dist/esm/index.js",
@@ -55,5 +55,5 @@
55
55
  },
56
56
  "sideEffects": false,
57
57
  "types": "dist/types/index.d.ts",
58
- "version": "2.56.0"
58
+ "version": "2.56.1"
59
59
  }
package/src/Witness.ts CHANGED
@@ -1,24 +1,13 @@
1
+ import { assertEx } from '@xylabs/assert'
1
2
  import { AnyConfigSchema } from '@xyo-network/module'
2
3
  import { Payload } from '@xyo-network/payload-model'
3
4
  import { XyoPentairScreenlogicPayload, XyoPentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'
4
5
  import { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'
5
-
6
- import { Controller } from './screenlogic'
6
+ import { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'
7
7
 
8
8
  export type XyoPentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'
9
9
  export const XyoPentairScreenlogicWitnessConfigSchema: XyoPentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'
10
10
 
11
- export interface PentairServer {
12
- address: string
13
-
14
- gatewayName: string
15
- gatewaySubtype: number
16
- gatewayType: number
17
-
18
- port: number
19
- type: number
20
- }
21
-
22
11
  export type XyoPentairScreenlogicWitnessConfig = WitnessConfig<{
23
12
  schema: XyoPentairScreenlogicWitnessConfigSchema
24
13
  }>
@@ -30,12 +19,32 @@ export class XyoPentairScreenlogicWitness<
30
19
  > extends AbstractWitness<TParams> {
31
20
  static override configSchema = XyoPentairScreenlogicWitnessConfigSchema
32
21
 
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- protected controller = new Controller()
35
-
36
22
  override async observe(_payloads?: Partial<Payload>[]): Promise<Payload[]> {
37
- const config = await this.controller.getPoolConfig()
38
- const status = await this.controller.getPoolStatus()
39
- return await super.observe([{ config, schema: XyoPentairScreenlogicSchema, status }] as XyoPentairScreenlogicPayload[])
23
+ const finder = new FindUnits()
24
+ const localUnit = assertEx((await finder.searchAsync()).shift(), 'No local screenlogic unit found')
25
+ screenlogic.initUnit(localUnit)
26
+ assertEx(await screenlogic.connectAsync(), 'Failed to connect to ScreenLogic')
27
+
28
+ return await super.observe([
29
+ {
30
+ chem: await screenlogic.chem.getChemicalDataAsync(),
31
+ chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
32
+ equipment: {
33
+ circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
34
+ config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
35
+ controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
36
+ customNames: await screenlogic.equipment.getCustomNamesAsync(),
37
+ state: await screenlogic.equipment.getEquipmentStateAsync(),
38
+ systemTime: await screenlogic.equipment.getSystemTimeAsync(),
39
+ weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),
40
+ },
41
+ schedule: {
42
+ once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
43
+ recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),
44
+ },
45
+ schema: XyoPentairScreenlogicSchema,
46
+ version: await screenlogic.getVersionAsync(),
47
+ },
48
+ ] as XyoPentairScreenlogicPayload[])
40
49
  }
41
50
  }
@@ -1,326 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PoolStatus = exports.PoolConfig = exports.PoolCircuit = exports.ControllerError = exports.Controller = void 0;
4
- const tslib_1 = require("tslib");
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- const node_screenlogic_1 = require("node-screenlogic");
7
- class Controller {
8
- constructor(settings) {
9
- var _a;
10
- this.log = (_a = settings === null || settings === void 0 ? void 0 : settings.log) !== null && _a !== void 0 ? _a : console;
11
- this.ip_address = settings === null || settings === void 0 ? void 0 : settings.ip_address;
12
- this.port = settings === null || settings === void 0 ? void 0 : settings.port;
13
- this.username = settings === null || settings === void 0 ? void 0 : settings.username;
14
- this.password = settings === null || settings === void 0 ? void 0 : settings.password;
15
- }
16
- _getConnection() {
17
- if (this.ip_address) {
18
- return this._getConnectionByIPAddress();
19
- }
20
- else if (this.username && this.password) {
21
- return this._getConnectionByRemoteLogin();
22
- }
23
- else {
24
- return this._getConnectionByBroadcast();
25
- }
26
- }
27
- /** get a connection by udp broadcast */
28
- _getConnectionByBroadcast() {
29
- return new Promise((resolve, reject) => {
30
- const finder = new node_screenlogic_1.FindUnits();
31
- finder
32
- .on('serverFound', (server) => {
33
- finder.close();
34
- const connection = new node_screenlogic_1.UnitConnection(server);
35
- connection.gatewayName = server.gatewayName;
36
- resolve(connection);
37
- })
38
- .on('error', (err) => {
39
- reject(err);
40
- });
41
- finder.search();
42
- });
43
- }
44
- /** get a connection by IP address */
45
- _getConnectionByIPAddress() {
46
- return new Promise((resolve, _reject) => {
47
- var _a;
48
- const connection = new node_screenlogic_1.UnitConnection(this.port || 80, this.ip_address, this.password);
49
- connection.gatewayName = (_a = this.username) !== null && _a !== void 0 ? _a : 'Pentair: XX-XX-XX';
50
- resolve(connection);
51
- });
52
- }
53
- /** find a unit by remote login */
54
- _getConnectionByRemoteLogin() {
55
- return new Promise((resolve, reject) => {
56
- const remote = new node_screenlogic_1.RemoteLogin(this.username);
57
- remote
58
- .on('gatewayFound', (unit) => {
59
- remote.close();
60
- if (unit && unit.gatewayFound) {
61
- const connection = new node_screenlogic_1.UnitConnection(unit.port, unit.ipAddr, this.password);
62
- connection.gatewayName = this.username;
63
- resolve(connection);
64
- }
65
- else {
66
- reject(new ControllerError('no remote unit found'));
67
- }
68
- })
69
- .on('error', (err) => {
70
- reject(err);
71
- });
72
- remote.connect();
73
- });
74
- }
75
- _getPoolConfig(connection) {
76
- let softwareVersion = '';
77
- return new Promise((resolve, reject) => {
78
- connection
79
- .once('version', (version) => {
80
- softwareVersion = version.version;
81
- connection.getControllerConfig();
82
- })
83
- .once('controllerConfig', (poolConfig) => {
84
- //this.log.debug('controllerConfig', poolConfig)
85
- resolve(new PoolConfig(connection.gatewayName, softwareVersion, poolConfig));
86
- })
87
- .on('error', (err) => {
88
- reject(err);
89
- });
90
- connection.getVersion();
91
- });
92
- }
93
- _getPoolStatus(connection) {
94
- return new Promise((resolve, reject) => {
95
- connection
96
- .once('poolStatus', (status) => {
97
- //this.log.debug('poolStatus', status)
98
- resolve(new PoolStatus(status));
99
- })
100
- .on('error', (err) => {
101
- reject(err);
102
- });
103
- connection.getPoolStatus();
104
- });
105
- }
106
- _login(connection) {
107
- return new Promise((resolve, reject) => {
108
- connection
109
- .once('loggedIn', () => {
110
- resolve();
111
- })
112
- .once('loginFailed', () => {
113
- reject(new ControllerError('unable to login'));
114
- })
115
- .on('error', (err) => {
116
- reject(err);
117
- });
118
- connection.connect();
119
- });
120
- }
121
- _sendLightCommand(connection, cmd) {
122
- return new Promise((resolve, reject) => {
123
- connection
124
- .once('sentLightCommand', () => {
125
- resolve();
126
- })
127
- .once('badParameter', () => {
128
- reject(new ControllerError('bad parameter passed to send light command'));
129
- })
130
- .on('error', (err) => {
131
- reject(err);
132
- });
133
- connection.sendLightCommand(0, cmd);
134
- });
135
- }
136
- _setCircuitState(connection, circuitId, circuitState) {
137
- return new Promise((resolve, reject) => {
138
- connection
139
- .once('circuitStateChanged', () => {
140
- resolve();
141
- })
142
- .once('badParameter', () => {
143
- reject(new ControllerError('bad parameter passed to set command'));
144
- })
145
- .on('error', (err) => {
146
- reject(err);
147
- });
148
- connection.setCircuitState(0, circuitId, circuitState ? 1 : 0);
149
- });
150
- }
151
- _setHeatMode(connection, bodyType, heatMode) {
152
- return new Promise((resolve, reject) => {
153
- connection
154
- .once('heatModeChanged', () => {
155
- resolve();
156
- })
157
- .once('badParameter', () => {
158
- reject(new ControllerError('bad parameter passed to set command'));
159
- })
160
- .on('error', (err) => {
161
- reject(err);
162
- });
163
- connection.setHeatMode(0, bodyType, heatMode);
164
- });
165
- }
166
- _setHeatPoint(connection, bodyType, heatPoint) {
167
- return new Promise((resolve, reject) => {
168
- connection
169
- .once('setPointChanged', () => {
170
- resolve();
171
- })
172
- .once('badParameter', () => {
173
- reject(new ControllerError('bad parameter passed to set command'));
174
- })
175
- .on('error', (err) => {
176
- reject(err);
177
- });
178
- connection.setSetPoint(0, bodyType, heatPoint);
179
- });
180
- }
181
- getPoolConfig() {
182
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
183
- const connection = yield this._getConnection();
184
- try {
185
- yield this._login(connection);
186
- return yield this._getPoolConfig(connection);
187
- }
188
- finally {
189
- connection.close();
190
- }
191
- });
192
- }
193
- getPoolStatus() {
194
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
195
- const connection = yield this._getConnection();
196
- try {
197
- yield this._login(connection);
198
- return yield this._getPoolStatus(connection);
199
- }
200
- finally {
201
- connection.close();
202
- }
203
- });
204
- }
205
- sendLightCommand(cmd) {
206
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
207
- const connection = yield this._getConnection();
208
- try {
209
- yield this._login(connection);
210
- return yield this._sendLightCommand(connection, cmd);
211
- }
212
- finally {
213
- connection.close();
214
- }
215
- });
216
- }
217
- setCircuitState(circuitId, circuitState) {
218
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
219
- const connection = yield this._getConnection();
220
- try {
221
- yield this._login(connection);
222
- return yield this._setCircuitState(connection, circuitId, circuitState);
223
- }
224
- finally {
225
- connection.close();
226
- }
227
- });
228
- }
229
- setHeatMode(bodyType, heatMode) {
230
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
231
- const connection = yield this._getConnection();
232
- try {
233
- yield this._login(connection);
234
- return yield this._setHeatMode(connection, bodyType, heatMode);
235
- }
236
- finally {
237
- connection.close();
238
- }
239
- });
240
- }
241
- setHeatPoint(bodyType, heatPoint) {
242
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
243
- const connection = yield this._getConnection();
244
- try {
245
- yield this._login(connection);
246
- return yield this._setHeatPoint(connection, bodyType, heatPoint);
247
- }
248
- finally {
249
- connection.close();
250
- }
251
- });
252
- }
253
- }
254
- exports.Controller = Controller;
255
- Controller.HEAT_MODE_HEAT_PUMP = 3;
256
- Controller.HEAT_MODE_OFF = 0;
257
- Controller.HEAT_MODE_SOLAR = 1;
258
- Controller.HEAT_MODE_SOLAR_PREFERRED = 2;
259
- Controller.HEAT_MODE_UNCHANGED = 4;
260
- Controller.POOL_CIRCUIT_ID = 505;
261
- Controller.SPA_CIRCUIT_ID = 500;
262
- class ControllerError extends Error {
263
- }
264
- exports.ControllerError = ControllerError;
265
- class PoolCircuit {
266
- constructor(id, name) {
267
- this.id = id;
268
- this.name = name;
269
- }
270
- }
271
- exports.PoolCircuit = PoolCircuit;
272
- class PoolConfig {
273
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
274
- constructor(gatewayName, softwareVersion, config) {
275
- var _a, _b, _c, _d;
276
- this.circuits = [];
277
- this.gatewayName = gatewayName;
278
- this.deviceId = gatewayName.replace('Pentair: ', '');
279
- this.softwareVersion = softwareVersion;
280
- this.isCelsius = config.degC;
281
- this.poolMinSetPoint = (_a = config.minSetPoint[0]) !== null && _a !== void 0 ? _a : 0;
282
- this.poolMaxSetPoint = (_b = config.maxSetPoint[0]) !== null && _b !== void 0 ? _b : 0;
283
- this.spaMinSetPoint = (_c = config.minSetPoint[1]) !== null && _c !== void 0 ? _c : 0;
284
- this.spaMaxSetPoint = (_d = config.maxSetPoint[1]) !== null && _d !== void 0 ? _d : 0;
285
- this.hasSpa = false;
286
- this.hasPool = false;
287
- this.circuits = [];
288
- for (const circuit of config.bodyArray) {
289
- const poolCircuit = new PoolCircuit(circuit.circuitId, circuit.name);
290
- this.circuits.push(poolCircuit);
291
- if (poolCircuit.id === Controller.POOL_CIRCUIT_ID) {
292
- this.hasPool = true;
293
- }
294
- else if (poolCircuit.id === Controller.SPA_CIRCUIT_ID) {
295
- this.hasSpa = true;
296
- }
297
- }
298
- }
299
- }
300
- exports.PoolConfig = PoolConfig;
301
- class PoolStatus {
302
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
303
- constructor(status) {
304
- this.circuitState = new Map();
305
- // save circuit state
306
- this.circuitState = new Map();
307
- for (const circuit of status.circuitArray) {
308
- this.circuitState.set(circuit.id, circuit.state);
309
- }
310
- this.hasPool = this.circuitState.get(Controller.POOL_CIRCUIT_ID) !== undefined;
311
- this.hasSpa = this.circuitState.get(Controller.SPA_CIRCUIT_ID) !== undefined;
312
- this.poolTemperature = status.currentTemp[0];
313
- this.poolSetPoint = status.setPoint[0];
314
- this.isPoolActive = this.hasPool && status.isPoolActive();
315
- this.isPoolHeating = this.hasPool && status.heatStatus[0] !== 0;
316
- this.poolHeatMode = status.heatMode[0];
317
- this.spaTemperature = status.currentTemp[1];
318
- this.spaSetPoint = status.setPoint[1];
319
- this.isSpaActive = this.hasSpa && status.isSpaActive();
320
- this.isSpaHeating = this.hasSpa && status.heatStatus[1] !== 0;
321
- this.spaHeatMode = status.heatMode[1];
322
- this.airTemperature = status.airTemp;
323
- }
324
- }
325
- exports.PoolStatus = PoolStatus;
326
- //# sourceMappingURL=controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../src/screenlogic/controller.ts"],"names":[],"mappings":";;;;AAAA,uDAAuD;AACvD,uDAAyE;AAYzE,MAAa,UAAU;IAiBrB,YAAY,QAA4B;;QACtC,IAAI,CAAC,GAAG,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,mCAAI,OAAO,CAAA;QACnC,IAAI,CAAC,UAAU,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,CAAA;QACtC,IAAI,CAAC,IAAI,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAA;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAA;IACpC,CAAC;IAED,cAAc;QACZ,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,OAAO,I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
4
- tslib_1.__exportStar(require("./controller"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screenlogic/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B"}