@xyo-network/pentair-plugin 2.73.3 → 2.74.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/Plugin.d.mts +54 -0
- package/dist/Plugin.d.mts.map +1 -0
- package/dist/{types/Plugin.d.ts → Plugin.d.ts} +5 -5
- package/dist/Plugin.d.ts.map +1 -0
- package/dist/Witness.d.mts.map +1 -0
- package/dist/Witness.d.ts +14 -0
- package/dist/Witness.d.ts.map +1 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/{esm/index.js → index.d.ts} +1 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +91 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +62 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +28 -21
- package/dist/cjs/Plugin.js +0 -16
- package/dist/cjs/Plugin.js.map +0 -1
- package/dist/cjs/Witness.js +0 -43
- package/dist/cjs/Witness.js.map +0 -1
- package/dist/cjs/index.js +0 -10
- package/dist/cjs/index.js.map +0 -1
- package/dist/docs.json +0 -22792
- package/dist/esm/Plugin.js +0 -11
- package/dist/esm/Plugin.js.map +0 -1
- package/dist/esm/Witness.js +0 -36
- package/dist/esm/Witness.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/types/Plugin.d.ts.map +0 -1
- package/dist/types/Witness.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- /package/dist/{types/Witness.d.ts → Witness.d.mts} +0 -0
- /package/dist/{types/index.d.ts → index.d.mts} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PentairScreenlogicWitness } from './Witness';
|
|
2
|
+
export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xyo-network/core").BaseParamsFields & {
|
|
3
|
+
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
5
|
+
accountDerivationPath?: string | undefined;
|
|
6
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
8
|
+
readonly name?: string | undefined;
|
|
9
|
+
readonly paging?: Record<string, {
|
|
10
|
+
size?: number | undefined;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
readonly security?: {
|
|
13
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
14
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
15
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly sign?: boolean | undefined;
|
|
18
|
+
readonly storeQueries?: boolean | undefined;
|
|
19
|
+
readonly timestamp?: boolean | undefined;
|
|
20
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
21
|
+
accountDerivationPath?: string | undefined;
|
|
22
|
+
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
24
|
+
readonly name?: string | undefined;
|
|
25
|
+
readonly paging?: Record<string, {
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
}> | undefined;
|
|
28
|
+
readonly security?: {
|
|
29
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
30
|
+
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
31
|
+
readonly disallowed?: Record<string, string[]> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readonly sign?: boolean | undefined;
|
|
34
|
+
readonly storeQueries?: boolean | undefined;
|
|
35
|
+
readonly timestamp?: boolean | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
archivist?: string | undefined;
|
|
38
|
+
schema: "network.xyo.pentair.screenlogic.witness.config";
|
|
39
|
+
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
40
|
+
schema: "network.xyo.payload.set";
|
|
41
|
+
}) | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
schema: "network.xyo.pentair.screenlogic.witness.config";
|
|
44
|
+
}, "schema"> & {
|
|
45
|
+
schema: "network.xyo.pentair.screenlogic.witness.config";
|
|
46
|
+
}, "schema"> & {
|
|
47
|
+
schema: string;
|
|
48
|
+
}, "schema"> & {
|
|
49
|
+
schema: string;
|
|
50
|
+
};
|
|
51
|
+
ephemeralQueryAccountEnabled?: boolean | undefined;
|
|
52
|
+
wallet?: import("@xyo-network/wallet-model").WalletInstance | undefined;
|
|
53
|
+
}>>;
|
|
54
|
+
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAErD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASlC,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { PentairScreenlogicWitness } from './Witness';
|
|
2
2
|
export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PentairScreenlogicWitness<import("@xyo-network/core").BaseParamsFields & {
|
|
3
3
|
account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
|
|
4
|
-
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
4
|
+
config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
5
5
|
accountDerivationPath?: string | undefined;
|
|
6
6
|
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
7
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
7
8
|
readonly name?: string | undefined;
|
|
8
9
|
readonly paging?: Record<string, {
|
|
9
10
|
size?: number | undefined;
|
|
10
11
|
}> | undefined;
|
|
11
|
-
readonly schema: string;
|
|
12
12
|
readonly security?: {
|
|
13
13
|
readonly allowAnonymous?: boolean | undefined;
|
|
14
14
|
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
@@ -17,14 +17,14 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
|
|
|
17
17
|
readonly sign?: boolean | undefined;
|
|
18
18
|
readonly storeQueries?: boolean | undefined;
|
|
19
19
|
readonly timestamp?: boolean | undefined;
|
|
20
|
-
} & Omit<
|
|
20
|
+
} & Omit<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<{
|
|
21
21
|
accountDerivationPath?: string | undefined;
|
|
22
22
|
readonly archivist?: import("@xyo-network/module-model").ArchivistModuleConfig | undefined;
|
|
23
|
+
readonly labels?: import("@xyo-network/module-model").Labels | undefined;
|
|
23
24
|
readonly name?: string | undefined;
|
|
24
25
|
readonly paging?: Record<string, {
|
|
25
26
|
size?: number | undefined;
|
|
26
27
|
}> | undefined;
|
|
27
|
-
readonly schema: "network.xyo.pentair.screenlogic.witness.config";
|
|
28
28
|
readonly security?: {
|
|
29
29
|
readonly allowAnonymous?: boolean | undefined;
|
|
30
30
|
readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
|
|
@@ -33,7 +33,7 @@ export declare const PentairScreenlogicPlugin: () => import("@xyo-network/payloa
|
|
|
33
33
|
readonly sign?: boolean | undefined;
|
|
34
34
|
readonly storeQueries?: boolean | undefined;
|
|
35
35
|
readonly timestamp?: boolean | undefined;
|
|
36
|
-
} &
|
|
36
|
+
} & {
|
|
37
37
|
archivist?: string | undefined;
|
|
38
38
|
schema: "network.xyo.pentair.screenlogic.witness.config";
|
|
39
39
|
targetSet?: (import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/payload-model").PayloadSet & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAErD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASlC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpF,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,qDAA0C;cAE9C,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyConfigSchema } from '@xyo-network/module';
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
import { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness';
|
|
4
|
+
export type PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
5
|
+
export declare const PentairScreenlogicWitnessConfigSchema: PentairScreenlogicWitnessConfigSchema;
|
|
6
|
+
export type PentairScreenlogicWitnessConfig = WitnessConfig<{
|
|
7
|
+
schema: PentairScreenlogicWitnessConfigSchema;
|
|
8
|
+
}>;
|
|
9
|
+
export type PentairScreenlogicWitnessParams = WitnessParams<AnyConfigSchema<PentairScreenlogicWitnessConfig>>;
|
|
10
|
+
export declare class PentairScreenlogicWitness<TParams extends PentairScreenlogicWitnessParams = PentairScreenlogicWitnessParams> extends AbstractWitness<TParams> {
|
|
11
|
+
static configSchemas: "network.xyo.pentair.screenlogic.witness.config"[];
|
|
12
|
+
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../src/Witness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpF,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,qDAA0C;cAE9C,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CA4B5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAEnD,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,wBAAwB,EAAE,CAAA;AAGnC,eAAe,wBAAwB,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PentairScreenlogicPlugin } from './Plugin';
|
|
2
2
|
export * from './Witness';
|
|
3
3
|
export { PentairScreenlogicPlugin };
|
|
4
|
-
// eslint-disable-next-line import/no-default-export
|
|
5
4
|
export default PentairScreenlogicPlugin;
|
|
6
|
-
//# sourceMappingURL=index.
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AAEnD,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,wBAAwB,EAAE,CAAA;AAGnC,eAAe,wBAAwB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
PentairScreenlogicPlugin: () => PentairScreenlogicPlugin,
|
|
24
|
+
PentairScreenlogicWitness: () => PentairScreenlogicWitness,
|
|
25
|
+
PentairScreenlogicWitnessConfigSchema: () => PentairScreenlogicWitnessConfigSchema,
|
|
26
|
+
default: () => src_default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(src_exports);
|
|
29
|
+
|
|
30
|
+
// src/Plugin.ts
|
|
31
|
+
var import_payload_model = require("@xyo-network/payload-model");
|
|
32
|
+
var import_payloadset_plugin = require("@xyo-network/payloadset-plugin");
|
|
33
|
+
var import_pentair_payload_plugin2 = require("@xyo-network/pentair-payload-plugin");
|
|
34
|
+
|
|
35
|
+
// src/Witness.ts
|
|
36
|
+
var import_assert = require("@xylabs/assert");
|
|
37
|
+
var import_pentair_payload_plugin = require("@xyo-network/pentair-payload-plugin");
|
|
38
|
+
var import_witness = require("@xyo-network/witness");
|
|
39
|
+
var import_node_screenlogic = require("node-screenlogic");
|
|
40
|
+
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
41
|
+
var PentairScreenlogicWitness = class extends import_witness.AbstractWitness {
|
|
42
|
+
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
43
|
+
async observeHandler(_payloads) {
|
|
44
|
+
const finder = new import_node_screenlogic.FindUnits();
|
|
45
|
+
const localUnit = (0, import_assert.assertEx)((await finder.searchAsync()).shift(), "No local screenlogic unit found");
|
|
46
|
+
import_node_screenlogic.screenlogic.initUnit(localUnit);
|
|
47
|
+
(0, import_assert.assertEx)(await import_node_screenlogic.screenlogic.connectAsync(), "Failed to connect to ScreenLogic");
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
chem: await import_node_screenlogic.screenlogic.chem.getChemicalDataAsync(),
|
|
51
|
+
chlor: await import_node_screenlogic.screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
52
|
+
equipment: {
|
|
53
|
+
circuitNames: await import_node_screenlogic.screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
54
|
+
config: await import_node_screenlogic.screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
55
|
+
controllerConfig: await import_node_screenlogic.screenlogic.equipment.getControllerConfigAsync(),
|
|
56
|
+
customNames: await import_node_screenlogic.screenlogic.equipment.getCustomNamesAsync(),
|
|
57
|
+
state: await import_node_screenlogic.screenlogic.equipment.getEquipmentStateAsync(),
|
|
58
|
+
systemTime: await import_node_screenlogic.screenlogic.equipment.getSystemTimeAsync(),
|
|
59
|
+
weatherForecast: await import_node_screenlogic.screenlogic.equipment.getWeatherForecastAsync()
|
|
60
|
+
},
|
|
61
|
+
schedule: {
|
|
62
|
+
once: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RUNONCE),
|
|
63
|
+
recurring: await import_node_screenlogic.screenlogic.schedule.getScheduleDataAsync(import_node_screenlogic.SchedTypes.RECURRING)
|
|
64
|
+
},
|
|
65
|
+
schema: import_pentair_payload_plugin.PentairScreenlogicSchema,
|
|
66
|
+
version: await import_node_screenlogic.screenlogic.getVersionAsync()
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/Plugin.ts
|
|
73
|
+
var PentairScreenlogicPlugin = () => (0, import_payloadset_plugin.createPayloadSetWitnessPlugin)(
|
|
74
|
+
{ required: { [import_pentair_payload_plugin2.PentairScreenlogicSchema]: 1 }, schema: import_payload_model.PayloadSetSchema },
|
|
75
|
+
{
|
|
76
|
+
witness: async (params) => {
|
|
77
|
+
const result = await PentairScreenlogicWitness.create(params);
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
// src/index.ts
|
|
84
|
+
var src_default = PentairScreenlogicPlugin;
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
PentairScreenlogicPlugin,
|
|
88
|
+
PentairScreenlogicWitness,
|
|
89
|
+
PentairScreenlogicWitnessConfigSchema
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Plugin.ts","../src/Witness.ts"],"sourcesContent":["import { PentairScreenlogicPlugin } from './Plugin'\n\nexport * from './Witness'\n\nexport { PentairScreenlogicPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default PentairScreenlogicPlugin\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 { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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;AAGzB,oCAAoE;AACpE,qBAA8D;AAC9D,8BAAmD;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,+BAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,kCAAU;AAC7B,UAAM,gBAAY,yBAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,wCAAY,SAAS,SAAS;AAC9B,gCAAS,MAAM,oCAAY,aAAa,GAAG,kCAAkC;AAE7E,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;;;AD3CO,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;;;ADRF,IAAO,cAAQ;","names":["import_pentair_payload_plugin"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/Plugin.ts
|
|
2
|
+
import { PayloadSetSchema } from "@xyo-network/payload-model";
|
|
3
|
+
import { createPayloadSetWitnessPlugin } from "@xyo-network/payloadset-plugin";
|
|
4
|
+
import { PentairScreenlogicSchema as PentairScreenlogicSchema2 } from "@xyo-network/pentair-payload-plugin";
|
|
5
|
+
|
|
6
|
+
// src/Witness.ts
|
|
7
|
+
import { assertEx } from "@xylabs/assert";
|
|
8
|
+
import { PentairScreenlogicSchema } from "@xyo-network/pentair-payload-plugin";
|
|
9
|
+
import { AbstractWitness } from "@xyo-network/witness";
|
|
10
|
+
import { FindUnits, SchedTypes, screenlogic } from "node-screenlogic";
|
|
11
|
+
var PentairScreenlogicWitnessConfigSchema = "network.xyo.pentair.screenlogic.witness.config";
|
|
12
|
+
var PentairScreenlogicWitness = class extends AbstractWitness {
|
|
13
|
+
static configSchemas = [PentairScreenlogicWitnessConfigSchema];
|
|
14
|
+
async observeHandler(_payloads) {
|
|
15
|
+
const finder = new FindUnits();
|
|
16
|
+
const localUnit = assertEx((await finder.searchAsync()).shift(), "No local screenlogic unit found");
|
|
17
|
+
screenlogic.initUnit(localUnit);
|
|
18
|
+
assertEx(await screenlogic.connectAsync(), "Failed to connect to ScreenLogic");
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
chem: await screenlogic.chem.getChemicalDataAsync(),
|
|
22
|
+
chlor: await screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
23
|
+
equipment: {
|
|
24
|
+
circuitNames: await screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
25
|
+
config: await screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
26
|
+
controllerConfig: await screenlogic.equipment.getControllerConfigAsync(),
|
|
27
|
+
customNames: await screenlogic.equipment.getCustomNamesAsync(),
|
|
28
|
+
state: await screenlogic.equipment.getEquipmentStateAsync(),
|
|
29
|
+
systemTime: await screenlogic.equipment.getSystemTimeAsync(),
|
|
30
|
+
weatherForecast: await screenlogic.equipment.getWeatherForecastAsync()
|
|
31
|
+
},
|
|
32
|
+
schedule: {
|
|
33
|
+
once: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RUNONCE),
|
|
34
|
+
recurring: await screenlogic.schedule.getScheduleDataAsync(SchedTypes.RECURRING)
|
|
35
|
+
},
|
|
36
|
+
schema: PentairScreenlogicSchema,
|
|
37
|
+
version: await screenlogic.getVersionAsync()
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// src/Plugin.ts
|
|
44
|
+
var PentairScreenlogicPlugin = () => createPayloadSetWitnessPlugin(
|
|
45
|
+
{ required: { [PentairScreenlogicSchema2]: 1 }, schema: PayloadSetSchema },
|
|
46
|
+
{
|
|
47
|
+
witness: async (params) => {
|
|
48
|
+
const result = await PentairScreenlogicWitness.create(params);
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// src/index.ts
|
|
55
|
+
var src_default = PentairScreenlogicPlugin;
|
|
56
|
+
export {
|
|
57
|
+
PentairScreenlogicPlugin,
|
|
58
|
+
PentairScreenlogicWitness,
|
|
59
|
+
PentairScreenlogicWitnessConfigSchema,
|
|
60
|
+
src_default as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Plugin.ts","../src/Witness.ts","../src/index.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 { AnyConfigSchema } from '@xyo-network/module'\nimport { Payload } from '@xyo-network/payload-model'\nimport { PentairScreenlogicPayload, PentairScreenlogicSchema } from '@xyo-network/pentair-payload-plugin'\nimport { AbstractWitness, WitnessConfig, WitnessParams } from '@xyo-network/witness'\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","import { PentairScreenlogicPlugin } from './Plugin'\n\nexport * from './Witness'\n\nexport { PentairScreenlogicPlugin }\n\n// eslint-disable-next-line import/no-default-export\nexport default PentairScreenlogicPlugin\n"],"mappings":";AAAA,SAAS,wBAAwB;AACjC,SAAS,qCAAqC;AAC9C,SAAS,4BAAAA,iCAAgC;;;ACFzC,SAAS,gBAAgB;AAGzB,SAAoC,gCAAgC;AACpE,SAAS,uBAAqD;AAC9D,SAAS,WAAW,YAAY,mBAAmB;AAG5C,IAAM,wCAA+E;AAQrF,IAAM,4BAAN,cAEG,gBAAyB;AAAA,EACjC,OAAgB,gBAAgB,CAAC,qCAAqC;AAAA,EAEtE,MAAyB,eAAe,WAAoD;AAC1F,UAAM,SAAS,IAAI,UAAU;AAC7B,UAAM,YAAY,UAAU,MAAM,OAAO,YAAY,GAAG,MAAM,GAAG,iCAAiC;AAClG,gBAAY,SAAS,SAAS;AAC9B,aAAS,MAAM,YAAY,aAAa,GAAG,kCAAkC;AAE7E,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;;;AD3CO,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;;;AERF,IAAO,cAAQ;","names":["PentairScreenlogicSchema","PentairScreenlogicSchema"]}
|
package/package.json
CHANGED
|
@@ -10,41 +10,49 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^2.
|
|
14
|
-
"@xyo-network/module": "~2.
|
|
15
|
-
"@xyo-network/payload-model": "~2.
|
|
16
|
-
"@xyo-network/payloadset-plugin": "~2.
|
|
17
|
-
"@xyo-network/pentair-payload-plugin": "~2.
|
|
18
|
-
"@xyo-network/witness": "~2.
|
|
13
|
+
"@xylabs/assert": "^2.11.5",
|
|
14
|
+
"@xyo-network/module": "~2.74.0",
|
|
15
|
+
"@xyo-network/payload-model": "~2.74.0",
|
|
16
|
+
"@xyo-network/payloadset-plugin": "~2.74.0",
|
|
17
|
+
"@xyo-network/pentair-payload-plugin": "~2.74.0",
|
|
18
|
+
"@xyo-network/witness": "~2.74.0",
|
|
19
19
|
"node-screenlogic": "^2.0.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
23
|
-
"@xylabs/tsconfig": "^
|
|
22
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.27",
|
|
23
|
+
"@xylabs/tsconfig": "^3.0.27",
|
|
24
24
|
"typescript": "^5.2.2"
|
|
25
25
|
},
|
|
26
26
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
27
|
-
"browser": "dist/esm/index.js",
|
|
28
27
|
"docs": "dist/docs.json",
|
|
28
|
+
"types": "dist/index.d.ts",
|
|
29
29
|
"exports": {
|
|
30
30
|
".": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
34
|
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
}
|
|
39
|
-
"default": "./dist/esm/index.js"
|
|
35
|
+
"import": {
|
|
36
|
+
"types": "./dist/index.d.mts",
|
|
37
|
+
"default": "./dist/index.mjs"
|
|
38
|
+
}
|
|
40
39
|
},
|
|
41
40
|
"./dist/docs.json": {
|
|
42
41
|
"default": "./dist/docs.json"
|
|
43
42
|
},
|
|
43
|
+
"./cjs": {
|
|
44
|
+
"default": "./dist/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./docs": {
|
|
47
|
+
"default": "./dist/docs.json"
|
|
48
|
+
},
|
|
49
|
+
"./esm": {
|
|
50
|
+
"default": "./dist/index.mjs"
|
|
51
|
+
},
|
|
44
52
|
"./package.json": "./package.json"
|
|
45
53
|
},
|
|
46
|
-
"main": "dist/
|
|
47
|
-
"module": "dist/
|
|
54
|
+
"main": "dist/index.js",
|
|
55
|
+
"module": "dist/index.mjs",
|
|
48
56
|
"homepage": "https://xyo.network",
|
|
49
57
|
"license": "LGPL-3.0",
|
|
50
58
|
"publishConfig": {
|
|
@@ -55,6 +63,5 @@
|
|
|
55
63
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
56
64
|
},
|
|
57
65
|
"sideEffects": false,
|
|
58
|
-
"
|
|
59
|
-
"version": "2.73.3"
|
|
66
|
+
"version": "2.74.0"
|
|
60
67
|
}
|
package/dist/cjs/Plugin.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PentairScreenlogicPlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const payload_model_1 = require("@xyo-network/payload-model");
|
|
6
|
-
const payloadset_plugin_1 = require("@xyo-network/payloadset-plugin");
|
|
7
|
-
const pentair_payload_plugin_1 = require("@xyo-network/pentair-payload-plugin");
|
|
8
|
-
const Witness_1 = require("./Witness");
|
|
9
|
-
const PentairScreenlogicPlugin = () => (0, payloadset_plugin_1.createPayloadSetWitnessPlugin)({ required: { [pentair_payload_plugin_1.PentairScreenlogicSchema]: 1 }, schema: payload_model_1.PayloadSetSchema }, {
|
|
10
|
-
witness: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
11
|
-
const result = yield Witness_1.PentairScreenlogicWitness.create(params);
|
|
12
|
-
return result;
|
|
13
|
-
}),
|
|
14
|
-
});
|
|
15
|
-
exports.PentairScreenlogicPlugin = PentairScreenlogicPlugin;
|
|
16
|
-
//# sourceMappingURL=Plugin.js.map
|
package/dist/cjs/Plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":";;;;AAAA,8DAA6D;AAC7D,sEAA8E;AAC9E,gFAA8E;AAE9E,uCAAqD;AAE9C,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAC3C,IAAA,iDAA6B,EAC3B,EAAE,QAAQ,EAAE,EAAE,CAAC,iDAAwB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,gCAAgB,EAAE,EACzE;IACE,OAAO,EAAE,CAAO,MAAM,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,MAAM,mCAAyB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QAC7D,OAAO,MAAM,CAAA;IACf,CAAC,CAAA;CACF,CACF,CAAA;AATU,QAAA,wBAAwB,4BASlC"}
|
package/dist/cjs/Witness.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PentairScreenlogicWitness = exports.PentairScreenlogicWitnessConfigSchema = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const assert_1 = require("@xylabs/assert");
|
|
6
|
-
const pentair_payload_plugin_1 = require("@xyo-network/pentair-payload-plugin");
|
|
7
|
-
const witness_1 = require("@xyo-network/witness");
|
|
8
|
-
const node_screenlogic_1 = require("node-screenlogic");
|
|
9
|
-
exports.PentairScreenlogicWitnessConfigSchema = 'network.xyo.pentair.screenlogic.witness.config';
|
|
10
|
-
class PentairScreenlogicWitness extends witness_1.AbstractWitness {
|
|
11
|
-
observeHandler(_payloads) {
|
|
12
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
const finder = new node_screenlogic_1.FindUnits();
|
|
14
|
-
const localUnit = (0, assert_1.assertEx)((yield finder.searchAsync()).shift(), 'No local screenlogic unit found');
|
|
15
|
-
node_screenlogic_1.screenlogic.initUnit(localUnit);
|
|
16
|
-
(0, assert_1.assertEx)(yield node_screenlogic_1.screenlogic.connectAsync(), 'Failed to connect to ScreenLogic');
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
chem: yield node_screenlogic_1.screenlogic.chem.getChemicalDataAsync(),
|
|
20
|
-
chlor: yield node_screenlogic_1.screenlogic.chlor.getIntellichlorConfigAsync(),
|
|
21
|
-
equipment: {
|
|
22
|
-
circuitNames: yield node_screenlogic_1.screenlogic.equipment.getAllCircuitNamesAsync(),
|
|
23
|
-
config: yield node_screenlogic_1.screenlogic.equipment.getEquipmentConfigurationAsync(),
|
|
24
|
-
controllerConfig: yield node_screenlogic_1.screenlogic.equipment.getControllerConfigAsync(),
|
|
25
|
-
customNames: yield node_screenlogic_1.screenlogic.equipment.getCustomNamesAsync(),
|
|
26
|
-
state: yield node_screenlogic_1.screenlogic.equipment.getEquipmentStateAsync(),
|
|
27
|
-
systemTime: yield node_screenlogic_1.screenlogic.equipment.getSystemTimeAsync(),
|
|
28
|
-
weatherForecast: yield node_screenlogic_1.screenlogic.equipment.getWeatherForecastAsync(),
|
|
29
|
-
},
|
|
30
|
-
schedule: {
|
|
31
|
-
once: yield node_screenlogic_1.screenlogic.schedule.getScheduleDataAsync(node_screenlogic_1.SchedTypes.RUNONCE),
|
|
32
|
-
recurring: yield node_screenlogic_1.screenlogic.schedule.getScheduleDataAsync(node_screenlogic_1.SchedTypes.RECURRING),
|
|
33
|
-
},
|
|
34
|
-
schema: pentair_payload_plugin_1.PentairScreenlogicSchema,
|
|
35
|
-
version: yield node_screenlogic_1.screenlogic.getVersionAsync(),
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.PentairScreenlogicWitness = PentairScreenlogicWitness;
|
|
42
|
-
PentairScreenlogicWitness.configSchemas = [exports.PentairScreenlogicWitnessConfigSchema];
|
|
43
|
-
//# sourceMappingURL=Witness.js.map
|
package/dist/cjs/Witness.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.js","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":";;;;AAAA,2CAAyC;AAGzC,gFAAyG;AACzG,kDAAoF;AACpF,uDAAqE;AAGxD,QAAA,qCAAqC,GAA0C,gDAAgD,CAAA;AAQ5I,MAAa,yBAEX,SAAQ,yBAAwB;IAGP,cAAc,CAAC,SAA8B;;YACpE,MAAM,MAAM,GAAG,IAAI,4BAAS,EAAE,CAAA;YAC9B,MAAM,SAAS,GAAG,IAAA,iBAAQ,EAAC,CAAC,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,iCAAiC,CAAC,CAAA;YACnG,8BAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;YAC/B,IAAA,iBAAQ,EAAC,MAAM,8BAAW,CAAC,YAAY,EAAE,EAAE,kCAAkC,CAAC,CAAA;YAE9E,OAAO;gBACL;oBACE,IAAI,EAAE,MAAM,8BAAW,CAAC,IAAI,CAAC,oBAAoB,EAAE;oBACnD,KAAK,EAAE,MAAM,8BAAW,CAAC,KAAK,CAAC,0BAA0B,EAAE;oBAC3D,SAAS,EAAE;wBACT,YAAY,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,uBAAuB,EAAE;wBACnE,MAAM,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,8BAA8B,EAAE;wBACpE,gBAAgB,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,wBAAwB,EAAE;wBACxE,WAAW,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,mBAAmB,EAAE;wBAC9D,KAAK,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,sBAAsB,EAAE;wBAC3D,UAAU,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,kBAAkB,EAAE;wBAC5D,eAAe,EAAE,MAAM,8BAAW,CAAC,SAAS,CAAC,uBAAuB,EAAE;qBACvE;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,MAAM,8BAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,6BAAU,CAAC,OAAO,CAAC;wBACzE,SAAS,EAAE,MAAM,8BAAW,CAAC,QAAQ,CAAC,oBAAoB,CAAC,6BAAU,CAAC,SAAS,CAAC;qBACjF;oBACD,MAAM,EAAE,iDAAwB;oBAChC,OAAO,EAAE,MAAM,8BAAW,CAAC,eAAe,EAAE;iBAC7C;aAC6B,CAAA;QAClC,CAAC;KAAA;;AAhCH,8DAiCC;AA9BiB,uCAAa,GAAG,CAAC,6CAAqC,CAAC,CAAA"}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PentairScreenlogicPlugin = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const Plugin_1 = require("./Plugin");
|
|
6
|
-
Object.defineProperty(exports, "PentairScreenlogicPlugin", { enumerable: true, get: function () { return Plugin_1.PentairScreenlogicPlugin; } });
|
|
7
|
-
tslib_1.__exportStar(require("./Witness"), exports);
|
|
8
|
-
// eslint-disable-next-line import/no-default-export
|
|
9
|
-
exports.default = Plugin_1.PentairScreenlogicPlugin;
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAmD;AAI1C,yGAJA,iCAAwB,OAIA;AAFjC,oDAAyB;AAIzB,oDAAoD;AACpD,kBAAe,iCAAwB,CAAA"}
|