@xyo-network/pentair-plugin 2.92.0 → 2.93.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/dist/browser/Witness.d.cts +3 -2
- package/dist/browser/Witness.d.cts.map +1 -1
- package/dist/browser/Witness.d.mts +3 -2
- package/dist/browser/Witness.d.mts.map +1 -1
- package/dist/browser/Witness.d.ts +3 -2
- package/dist/browser/Witness.d.ts.map +1 -1
- package/dist/browser/index.cjs +2 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/node/Witness.d.cts +3 -2
- package/dist/node/Witness.d.cts.map +1 -1
- package/dist/node/Witness.d.mts +3 -2
- package/dist/node/Witness.d.mts.map +1 -1
- package/dist/node/Witness.d.ts +3 -2
- package/dist/node/Witness.d.ts.map +1 -1
- package/dist/node/index.cjs +2 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +2 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +13 -13
- package/src/Witness.ts +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -39,7 +39,8 @@ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin
|
|
|
39
39
|
var import_node_screenlogic = require("node-screenlogic");
|
|
40
40
|
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
41
41
|
var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
|
|
42
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
42
|
+
static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
|
|
43
|
+
static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
|
|
43
44
|
async observeHandler(_payloads) {
|
|
44
45
|
const finder = new import_node_screenlogic.FindUnits();
|
|
45
46
|
const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas = [PentairScreenlogicWitnessConfigSchema]\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACxG,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,oCAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,oCAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,oCAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,oCAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,oCAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,oCAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,oCAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,oCAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,oCAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,OAAO;AAAA,UACxE,WAAW,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,oCAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,UACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,uDAAwB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_pentair_payload_plugin"]}
|
package/dist/browser/index.js
CHANGED
|
@@ -10,7 +10,8 @@ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
|
|
|
10
10
|
import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
|
|
11
11
|
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
12
12
|
var PentairScreenlogicWitness = class extends AbstractWitness {
|
|
13
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
13
|
+
static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
|
|
14
|
+
static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
|
|
14
15
|
async observeHandler(_payloads) {
|
|
15
16
|
const finder = new FindUnits();
|
|
16
17
|
const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas = [PentairScreenlogicWitnessConfigSchema]\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACxG,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,YAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,YAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,YAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,YAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,YAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,YAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,YAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,YAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,YAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,YAAY,SAAS,qBAAqB,WAAW,OAAO;AAAA,UACxE,WAAW,MAAM,YAAY,SAAS,qBAAqB,WAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,YAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
|
package/dist/node/Witness.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
package/dist/node/Witness.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
package/dist/node/Witness.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
2
2
|
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
-
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
5
5
|
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
6
6
|
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
@@ -9,7 +9,8 @@ export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
|
9
9
|
}>;
|
|
10
10
|
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
11
11
|
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
12
|
-
static configSchemas:
|
|
12
|
+
static configSchemas: Schema[];
|
|
13
|
+
static defaultConfigSchema: Schema;
|
|
13
14
|
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAGzE,MAAM,MAAM,qCAAqC,GAAG,gDAAgD,CAAA;AACpG,eAAO,MAAM,qCAAqC,EAAE,qCAAwF,CAAA;AAE5I,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC;IAC1D,MAAM,EAAE,qCAAqC,CAAA;CAC9C,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,aAAa,CAAC,eAAe,CAAC,+BAA+B,CAAC,CAAC,CAAA;AAE7G,qBAAa,yBAAyB,CACpC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,CACjF,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,OAAgB,aAAa,EAAE,MAAM,EAAE,CAAkE;IACzG,OAAgB,mBAAmB,EAAE,MAAM,CAAwC;cAE1D,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -39,7 +39,8 @@ var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin
|
|
|
39
39
|
var import_node_screenlogic = require("node-screenlogic");
|
|
40
40
|
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
41
41
|
var PentairScreenlogicWitness = class extends import_abstract_witness.AbstractWitness {
|
|
42
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
42
|
+
static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
|
|
43
|
+
static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
|
|
43
44
|
async observeHandler(_payloads) {
|
|
44
45
|
const finder = new import_node_screenlogic.FindUnits();
|
|
45
46
|
const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas = [PentairScreenlogicWitnessConfigSchema]\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["export { PentairScreenlogicPlugin as default, PentairScreenlogicPlugin } from './Plugin'\nexport * from './Witness'\n","import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAiC;AACjC,+BAA8C;AAC9C,IAAAA,iCAAyC;;;ACFzC,oBAAyB;AACzB,8BAAgC;AAGhC,oCAAoE;AAEpE,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,wCAAyB;AAAA,EACjC,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACxG,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,oCAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,oCAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,oCAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,oCAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,oCAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,oCAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,oCAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,oCAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,oCAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,OAAO;AAAA,UACxE,WAAW,MAAM,oCAAY,SAAS,qBAAqB,mCAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,oCAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,UACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAAC,uDAAwB,GAAG,EAAE,GAAG,QAAQ,sCAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["import_pentair_payload_plugin"]}
|
package/dist/node/index.js
CHANGED
|
@@ -10,7 +10,8 @@ import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
|
|
|
10
10
|
import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
|
|
11
11
|
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
12
12
|
var PentairScreenlogicWitness = class extends AbstractWitness {
|
|
13
|
-
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
13
|
+
static configSchemas = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema];
|
|
14
|
+
static defaultConfigSchema = PentairScreenlogicWitnessConfigSchema;
|
|
14
15
|
async observeHandler(_payloads) {
|
|
15
16
|
const finder = new FindUnits();
|
|
16
17
|
const localUnit = assertEx((await finder.searchAsync()).shift(), () => "No local screenlogic unit found");
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas = [PentairScreenlogicWitnessConfigSchema]\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,
|
|
1
|
+
{"version":3,"sources":["../../src/Plugin.ts","../../src/Witness.ts"],"sourcesContent":["import { PayloadSetSchema } from '@xyo-network/payload-model'\nimport { createPayloadSetWitnessPlugin } from '@xyo-network/payloadset-plugin'\nimport { PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\n\nimport { PentairScreenlogicWitness } from './Witness'\n\nexport const PentairScreenlogicPlugin = () =>\n createPayloadSetWitnessPlugin<PentairScreenlogicWitness>(\n { required: { [PentairScreenlogicSchema]: 1 }, schema: PayloadSetSchema },\n {\n witness: async (params) => {\n const result = await PentairScreenlogicWitness.create(params)\n return result\n },\n },\n )\n","import { assertEx } from '@xylabs/assert'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { AnyConfigSchema } from '@xyo-network/module-model'\nimport { Payload, Schema } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'\nimport { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'\n\nexport type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\nexport const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config'\n\nexport type PentairScreenlogicWitnessConfig = WitnessConfig<{\n schema: PentairScreenlogicWitnessConfigSchema\n}>\n\nexport type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>\n\nexport class PentairScreenlogicWitness<\n TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,\n> extends AbstractWitness<TParams> {\n static override configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]\n static override defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema\n\n protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {\n const finder = new FindUnits()\n const localUnit = assertEx((await finder.searchAsync()).shift(), () => 'No local screenlogic unit found')\n screenlogic.initUnit(localUnit)\n assertEx(await screenlogic.connectAsync(), () => 'Failed to connect to ScreenLogic')\n\n return [\n {\n chem: await screenlogic.chem.getChemicalDataAsync(),\n chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),\n equipment: {\n circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),\n config: await screenlogic.equipment.getEquipmentConfigurationAsync(),\n controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),\n customNames: await screenlogic.equipment.getCustomNamesAsync(),\n state: await screenlogic.equipment.getEquipmentStateAsync(),\n systemTime: await screenlogic.equipment.getSystemTimeAsync(),\n weatherForecast: await screenlogic.equipment.getWeatherForecastAsync(),\n },\n schedule: {\n once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),\n recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING),\n },\n schema: PentairScreenlogicSchema,\n version: await screenlogic.getVersionAsync(),\n },\n ] as PentairScreenlogicPayload[]\n }\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAoC,gCAAgC;AAEpE,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,gBAA0B,CAAC,GAAG,MAAM,eAAe,qCAAqC;AAAA,EACxG,OAAgB,sBAA8B;AAAA,EAE9C,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,MAAM,iCAAiC;AACxG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,MAAM,kCAAkC;AAEnF,WAAO;AAAA,MACL;AAAA,QACE,MAAM,MAAM,YAAY,KAAK,qBAAqB;AAAA,QAClD,OAAO,MAAM,YAAY,MAAM,2BAA2B;AAAA,QAC1D,WAAW;AAAA,UACT,cAAc,MAAM,YAAY,UAAU,wBAAwB;AAAA,UAClE,QAAQ,MAAM,YAAY,UAAU,+BAA+B;AAAA,UACnE,kBAAkB,MAAM,YAAY,UAAU,yBAAyB;AAAA,UACvE,aAAa,MAAM,YAAY,UAAU,oBAAoB;AAAA,UAC7D,OAAO,MAAM,YAAY,UAAU,uBAAuB;AAAA,UAC1D,YAAY,MAAM,YAAY,UAAU,mBAAmB;AAAA,UAC3D,iBAAiB,MAAM,YAAY,UAAU,wBAAwB;AAAA,QACvE;AAAA,QACA,UAAU;AAAA,UACR,MAAM,MAAM,YAAY,SAAS,qBAAqB,WAAW,OAAO;AAAA,UACxE,WAAW,MAAM,YAAY,SAAS,qBAAqB,WAAW,SAAS;AAAA,QACjF;AAAA,QACA,QAAQ;AAAA,QACR,SAAS,MAAM,YAAY,gBAAgB;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACF;;;AD7CO,IAAM,2BAA2B,MACtC;AAAA,EACE,EAAE,UAAU,EAAE,CAACC,yBAAwB,GAAG,EAAE,GAAG,QAAQ,iBAAiB;AAAA,EACxE;AAAA,IACE,SAAS,OAAO,WAAW;AACzB,YAAM,SAAS,MAAM,0BAA0B,OAAO,MAAM;AAC5D,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
|
package/package.json
CHANGED
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/plugins/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^3.1.
|
|
14
|
-
"@xyo-network/abstract-witness": "^2.
|
|
15
|
-
"@xyo-network/module-model": "^2.
|
|
16
|
-
"@xyo-network/payload-model": "^2.
|
|
17
|
-
"@xyo-network/payloadset-plugin": "^2.
|
|
18
|
-
"@xyo-network/pentair-payload-plugin": "~2.
|
|
19
|
-
"@xyo-network/witness-model": "^2.
|
|
13
|
+
"@xylabs/assert": "^3.1.8",
|
|
14
|
+
"@xyo-network/abstract-witness": "^2.97.0",
|
|
15
|
+
"@xyo-network/module-model": "^2.97.0",
|
|
16
|
+
"@xyo-network/payload-model": "^2.97.0",
|
|
17
|
+
"@xyo-network/payloadset-plugin": "^2.97.0",
|
|
18
|
+
"@xyo-network/pentair-payload-plugin": "~2.93.0",
|
|
19
|
+
"@xyo-network/witness-model": "^2.97.0",
|
|
20
20
|
"node-screenlogic": "^2.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@xylabs/jest-helpers": "^3.1.
|
|
24
|
-
"@xylabs/ts-scripts-yarn3": "^3.9.
|
|
25
|
-
"@xylabs/tsconfig": "^3.9.
|
|
26
|
-
"@xyo-network/account": "^2.
|
|
27
|
-
"@xyo-network/payload-wrapper": "^2.
|
|
23
|
+
"@xylabs/jest-helpers": "^3.1.8",
|
|
24
|
+
"@xylabs/ts-scripts-yarn3": "^3.9.1",
|
|
25
|
+
"@xylabs/tsconfig": "^3.9.1",
|
|
26
|
+
"@xyo-network/account": "^2.97.0",
|
|
27
|
+
"@xyo-network/payload-wrapper": "^2.97.0",
|
|
28
28
|
"jest": "^29.7.0",
|
|
29
29
|
"typescript": "^5.4.5"
|
|
30
30
|
},
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"url": "https://github.com/XYOracleNetwork/plugins.git"
|
|
68
68
|
},
|
|
69
69
|
"sideEffects": false,
|
|
70
|
-
"version": "2.
|
|
70
|
+
"version": "2.93.0",
|
|
71
71
|
"type": "module"
|
|
72
72
|
}
|
package/src/Witness.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
2
|
import { AbstractWitness } from '@xyo-network/abstract-witness'
|
|
3
3
|
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
4
|
-
import { Payload } from '@xyo-network/payload-model'
|
|
4
|
+
import { Payload, Schema } from '@xyo-network/payload-model'
|
|
5
5
|
import { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'
|
|
6
6
|
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model'
|
|
7
7
|
import { FindUnits, SchedTypes, screenlogic } from 'node-screenlogic'
|
|
@@ -18,7 +18,8 @@ export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<Pent
|
|
|
18
18
|
export class PentairScreenlogicWitness<
|
|
19
19
|
TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams,
|
|
20
20
|
> extends AbstractWitness<TParams> {
|
|
21
|
-
static override configSchemas = [PentairScreenlogicWitnessConfigSchema]
|
|
21
|
+
static override configSchemas: Schema[] = [...super.configSchemas, PentairScreenlogicWitnessConfigSchema]
|
|
22
|
+
static override defaultConfigSchema: Schema = PentairScreenlogicWitnessConfigSchema
|
|
22
23
|
|
|
23
24
|
protected override async observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]> {
|
|
24
25
|
const finder = new FindUnits()
|