isy-nodejs 1.0.1-alpha.27 → 1.0.1-alpha.29
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/cjs/CodeGeneration/EnumFactory.js +6 -6
- package/dist/cjs/CodeGeneration/EnumFactory.js.map +1 -1
- package/dist/cjs/CodeGeneration/NodeClassFactory.js +7 -7
- package/dist/cjs/CodeGeneration/NodeClassFactory.js.map +1 -1
- package/dist/cjs/Definitions/Global/Commands.js.map +1 -1
- package/dist/cjs/Definitions/Global/Drivers.js.map +1 -1
- package/dist/cjs/Devices/ISYDevice.js.map +1 -1
- package/dist/cjs/Devices/ISYDeviceNode.js.map +1 -1
- package/dist/cjs/Devices/Insteon/InsteonDevice.js.map +1 -1
- package/dist/cjs/Devices/Insteon/InsteonDeviceFactory.js +12 -8
- package/dist/cjs/Devices/Insteon/InsteonDeviceFactory.js.map +1 -1
- package/dist/cjs/Devices/Insteon/InsteonKeypadDevice.js +2 -2
- package/dist/cjs/Devices/Insteon/InsteonKeypadDevice.js.map +1 -1
- package/dist/cjs/Devices/Insteon/InsteonRelayDevice.js +0 -16
- package/dist/cjs/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
- package/dist/cjs/Devices/Insteon/KeypadButton.js +52 -0
- package/dist/cjs/Devices/Insteon/KeypadButton.js.map +1 -0
- package/dist/cjs/Devices/MapsTo.js +11 -0
- package/dist/cjs/Devices/MapsTo.js.map +1 -1
- package/dist/cjs/Devices/NodeFactory.js +5 -4
- package/dist/cjs/Devices/NodeFactory.js.map +1 -1
- package/dist/cjs/Devices/index.js.map +1 -1
- package/dist/cjs/ISY.js +220 -213
- package/dist/cjs/ISY.js.map +1 -1
- package/dist/cjs/ISYNode.js +3 -3
- package/dist/cjs/ISYNode.js.map +1 -1
- package/dist/cjs/ISYScene.js.map +1 -1
- package/dist/cjs/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/cjs/Matter/Behaviors/ISYClusterBehavior.js.map +1 -1
- package/dist/cjs/Matter/Bridge/Server.js +6 -5
- package/dist/cjs/Matter/Bridge/Server.js.map +1 -1
- package/dist/cjs/Model/ClassDefinition.js +2 -2
- package/dist/cjs/Model/ClassDefinition.js.map +1 -1
- package/dist/cjs/Model/ClusterMap.js +2 -2
- package/dist/cjs/Model/ClusterMap.js.map +1 -1
- package/dist/cjs/Model/NodeDef.js.map +1 -1
- package/dist/cjs/Model/NodeInfo.js +3 -3
- package/dist/cjs/Model/NodeInfo.js.map +1 -1
- package/dist/cjs/Utils.js.map +1 -1
- package/dist/cjs/types/CodeGeneration/EnumFactory.d.ts +1 -1
- package/dist/cjs/types/CodeGeneration/EnumFactory.d.ts.map +1 -1
- package/dist/cjs/types/CodeGeneration/NodeClassFactory.d.ts +1 -1
- package/dist/cjs/types/CodeGeneration/NodeClassFactory.d.ts.map +1 -1
- package/dist/cjs/types/Definitions/Global/Commands.d.ts.map +1 -1
- package/dist/cjs/types/Definitions/Global/Drivers.d.ts +1 -1
- package/dist/cjs/types/Definitions/Global/Drivers.d.ts.map +1 -1
- package/dist/cjs/types/Definitions/Global/Events.d.ts +1 -1
- package/dist/cjs/types/Definitions/Global/Events.d.ts.map +1 -1
- package/dist/cjs/types/Devices/ISYDevice.d.ts +2 -3
- package/dist/cjs/types/Devices/ISYDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/ISYDeviceNode.d.ts +2 -1
- package/dist/cjs/types/Devices/ISYDeviceNode.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonBaseDevice.d.ts +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonBaseDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonDevice.d.ts +10 -9
- package/dist/cjs/types/Devices/Insteon/InsteonDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonDeviceFactory.d.ts +2 -1
- package/dist/cjs/types/Devices/Insteon/InsteonDeviceFactory.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonFanDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonKeypadDevice.d.ts +4 -4
- package/dist/cjs/types/Devices/Insteon/InsteonKeypadDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/InsteonRelayDevice.d.ts +0 -3
- package/dist/cjs/types/Devices/Insteon/InsteonRelayDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/Insteon/KeypadButton.d.ts +63 -0
- package/dist/cjs/types/Devices/Insteon/KeypadButton.d.ts.map +1 -0
- package/dist/cjs/types/Devices/MapsTo.d.ts +0 -9
- package/dist/cjs/types/Devices/MapsTo.d.ts.map +1 -1
- package/dist/cjs/types/Devices/NodeFactory.d.ts +2 -1
- package/dist/cjs/types/Devices/NodeFactory.d.ts.map +1 -1
- package/dist/cjs/types/Devices/ZWave/ZWaveBaseDevice.d.ts +1 -1
- package/dist/cjs/types/Devices/ZWave/ZWaveBaseDevice.d.ts.map +1 -1
- package/dist/cjs/types/Devices/index.d.ts +1 -1
- package/dist/cjs/types/Devices/index.d.ts.map +1 -1
- package/dist/cjs/types/ISY.d.ts +13 -28
- package/dist/cjs/types/ISY.d.ts.map +1 -1
- package/dist/cjs/types/ISYDevice.d.ts +1 -1
- package/dist/cjs/types/ISYDevice.d.ts.map +1 -1
- package/dist/cjs/types/ISYNode.d.ts +6 -4
- package/dist/cjs/types/ISYNode.d.ts.map +1 -1
- package/dist/cjs/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts +3 -8
- package/dist/cjs/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts.map +1 -1
- package/dist/cjs/types/Matter/Behaviors/ISYClusterBehavior.d.ts.map +1 -1
- package/dist/cjs/types/Matter/Behaviors/Insteon/ISYOnOffBehavior.d.ts +3 -40
- package/dist/cjs/types/Matter/Behaviors/Insteon/ISYOnOffBehavior.d.ts.map +1 -1
- package/dist/cjs/types/Matter/Bridge/Server.d.ts.map +1 -1
- package/dist/cjs/types/Model/ClusterMap.d.ts +2 -3
- package/dist/cjs/types/Model/ClusterMap.d.ts.map +1 -1
- package/dist/cjs/types/Model/EnumDefinition.d.ts +1 -1
- package/dist/cjs/types/Model/NodeDef.d.ts.map +1 -1
- package/dist/cjs/types/Model/NodeInfo.d.ts +2 -2
- package/dist/cjs/types/Model/NodeInfo.d.ts.map +1 -1
- package/dist/cjs/types/Utils.d.ts +8 -1
- package/dist/cjs/types/Utils.d.ts.map +1 -1
- package/dist/esm/CodeGeneration/EnumFactory.js +1 -1
- package/dist/esm/CodeGeneration/EnumFactory.js.map +1 -1
- package/dist/esm/CodeGeneration/NodeClassFactory.js +1 -1
- package/dist/esm/CodeGeneration/NodeClassFactory.js.map +1 -1
- package/dist/esm/Definitions/Global/Commands.js.map +1 -1
- package/dist/esm/Definitions/Global/Drivers.js.map +1 -1
- package/dist/esm/Devices/ISYDevice.js.map +1 -1
- package/dist/esm/Devices/ISYDeviceNode.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonDeviceFactory.js +5 -1
- package/dist/esm/Devices/Insteon/InsteonDeviceFactory.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonKeypadDevice.js +2 -2
- package/dist/esm/Devices/Insteon/InsteonKeypadDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonRelayDevice.js +0 -16
- package/dist/esm/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/KeypadButton.js +48 -0
- package/dist/esm/Devices/Insteon/KeypadButton.js.map +1 -0
- package/dist/esm/Devices/MapsTo.js +11 -0
- package/dist/esm/Devices/MapsTo.js.map +1 -1
- package/dist/esm/Devices/NodeFactory.js +2 -1
- package/dist/esm/Devices/NodeFactory.js.map +1 -1
- package/dist/esm/Devices/index.js.map +1 -1
- package/dist/esm/ISY.js +220 -183
- package/dist/esm/ISY.js.map +1 -1
- package/dist/esm/ISYNode.js +2 -2
- package/dist/esm/ISYNode.js.map +1 -1
- package/dist/esm/ISYScene.js.map +1 -1
- package/dist/esm/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/esm/Matter/Behaviors/ISYClusterBehavior.js.map +1 -1
- package/dist/esm/Matter/Bridge/Server.js +7 -6
- package/dist/esm/Matter/Bridge/Server.js.map +1 -1
- package/dist/esm/Model/ClassDefinition.js +1 -1
- package/dist/esm/Model/ClassDefinition.js.map +1 -1
- package/dist/esm/Model/ClusterMap.js +2 -2
- package/dist/esm/Model/ClusterMap.js.map +1 -1
- package/dist/esm/Model/NodeDef.js.map +1 -1
- package/dist/esm/Model/NodeInfo.js +1 -1
- package/dist/esm/Model/NodeInfo.js.map +1 -1
- package/dist/esm/Utils.js.map +1 -1
- package/dist/esm/types/CodeGeneration/EnumFactory.d.ts +1 -1
- package/dist/esm/types/CodeGeneration/EnumFactory.d.ts.map +1 -1
- package/dist/esm/types/CodeGeneration/NodeClassFactory.d.ts +1 -1
- package/dist/esm/types/CodeGeneration/NodeClassFactory.d.ts.map +1 -1
- package/dist/esm/types/Definitions/Global/Commands.d.ts.map +1 -1
- package/dist/esm/types/Definitions/Global/Drivers.d.ts +1 -1
- package/dist/esm/types/Definitions/Global/Drivers.d.ts.map +1 -1
- package/dist/esm/types/Definitions/Global/Events.d.ts +1 -1
- package/dist/esm/types/Definitions/Global/Events.d.ts.map +1 -1
- package/dist/esm/types/Devices/ISYDevice.d.ts +2 -3
- package/dist/esm/types/Devices/ISYDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/ISYDeviceNode.d.ts +2 -1
- package/dist/esm/types/Devices/ISYDeviceNode.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonBaseDevice.d.ts +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonBaseDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts +10 -9
- package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDeviceFactory.d.ts +2 -1
- package/dist/esm/types/Devices/Insteon/InsteonDeviceFactory.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonFanDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonKeypadDevice.d.ts +4 -4
- package/dist/esm/types/Devices/Insteon/InsteonKeypadDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonRelayDevice.d.ts +0 -3
- package/dist/esm/types/Devices/Insteon/InsteonRelayDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/KeypadButton.d.ts +63 -0
- package/dist/esm/types/Devices/Insteon/KeypadButton.d.ts.map +1 -0
- package/dist/esm/types/Devices/MapsTo.d.ts +0 -9
- package/dist/esm/types/Devices/MapsTo.d.ts.map +1 -1
- package/dist/esm/types/Devices/NodeFactory.d.ts +2 -1
- package/dist/esm/types/Devices/NodeFactory.d.ts.map +1 -1
- package/dist/esm/types/Devices/ZWave/ZWaveBaseDevice.d.ts +1 -1
- package/dist/esm/types/Devices/ZWave/ZWaveBaseDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/index.d.ts +1 -1
- package/dist/esm/types/Devices/index.d.ts.map +1 -1
- package/dist/esm/types/ISY.d.ts +13 -28
- package/dist/esm/types/ISY.d.ts.map +1 -1
- package/dist/esm/types/ISYDevice.d.ts +1 -1
- package/dist/esm/types/ISYDevice.d.ts.map +1 -1
- package/dist/esm/types/ISYNode.d.ts +6 -4
- package/dist/esm/types/ISYNode.d.ts.map +1 -1
- package/dist/esm/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts +1 -1
- package/dist/esm/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts.map +1 -1
- package/dist/esm/types/Matter/Behaviors/ISYClusterBehavior.d.ts.map +1 -1
- package/dist/esm/types/Matter/Behaviors/Insteon/ISYOnOffBehavior.d.ts +4 -4
- package/dist/esm/types/Matter/Bridge/Server.d.ts.map +1 -1
- package/dist/esm/types/Model/ClusterMap.d.ts +2 -3
- package/dist/esm/types/Model/ClusterMap.d.ts.map +1 -1
- package/dist/esm/types/Model/NodeDef.d.ts.map +1 -1
- package/dist/esm/types/Model/NodeInfo.d.ts +2 -2
- package/dist/esm/types/Model/NodeInfo.d.ts.map +1 -1
- package/dist/esm/types/Utils.d.ts +8 -1
- package/dist/esm/types/Utils.d.ts.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/src/CodeGeneration/EnumFactory.ts +2 -1
- package/src/CodeGeneration/NodeClassFactory.ts +2 -1
- package/src/Definitions/Global/Commands.ts +1 -3
- package/src/Definitions/Global/Drivers.ts +7 -16
- package/src/Definitions/Global/Events.ts +3 -3
- package/src/Devices/EndpointFor.ts +3 -2
- package/src/Devices/ISYDevice.ts +3 -6
- package/src/Devices/ISYDeviceNode.ts +2 -1
- package/src/Devices/ISYMultiNodeDevice.ts +1 -1
- package/src/Devices/Insteon/InsteonBaseDevice.ts +2 -2
- package/src/Devices/Insteon/InsteonDevice.ts +3 -2
- package/src/Devices/Insteon/InsteonDeviceFactory.ts +7 -2
- package/src/Devices/Insteon/InsteonDimmableDevice.ts +2 -2
- package/src/Devices/Insteon/InsteonFanDevice.ts +1 -1
- package/src/Devices/Insteon/InsteonKeypadDevice.ts +5 -5
- package/src/Devices/Insteon/InsteonRelayDevice.ts +4 -19
- package/src/Devices/Insteon/{Generated/KeypadButton.ts → KeypadButton.ts} +20 -20
- package/src/Devices/MapsTo.ts +3 -3
- package/src/Devices/NodeFactory.ts +3 -2
- package/src/Devices/ZWave/ZWaveBaseDevice.ts +1 -1
- package/src/Devices/ZWave/ZWaveDimmerSwitchDevice.ts +1 -1
- package/src/Devices/index.ts +2 -2
- package/src/ISY.ts +249 -228
- package/src/ISYDevice.ts +3 -2
- package/src/ISYNode.ts +9 -6
- package/src/ISYScene.ts +1 -1
- package/src/Matter/Behaviors/ISYBridgedDeviceBehavior.ts +5 -3
- package/src/Matter/Behaviors/ISYClusterBehavior.ts +2 -12
- package/src/Matter/Bridge/Server.ts +10 -7
- package/src/Matter/Mappings/Insteon.ts +2 -2
- package/src/Model/ClassDefinition.ts +1 -1
- package/src/Model/ClusterMap.ts +7 -14
- package/src/Model/NodeDef.ts +1 -2
- package/src/Model/NodeInfo.ts +4 -3
- package/src/Utils.ts +13 -6
- package/tsconfig.json +2 -1
- package/dist/cjs/Devices/EndpointFor.js +0 -36
- package/dist/cjs/Devices/EndpointFor.js.map +0 -1
- package/dist/cjs/Matter/Behaviors/ISYOnOffBehavior.js +0 -52
- package/dist/cjs/Matter/Behaviors/ISYOnOffBehavior.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/types/Devices/EndpointFor.d.ts +0 -108
- package/dist/cjs/types/Devices/EndpointFor.d.ts.map +0 -1
- package/dist/cjs/types/Matter/Behaviors/ISYOnOffBehavior.d.ts +0 -55
- package/dist/cjs/types/Matter/Behaviors/ISYOnOffBehavior.d.ts.map +0 -1
- package/dist/esm/Devices/EndpointFor.js +0 -31
- package/dist/esm/Devices/EndpointFor.js.map +0 -1
- package/dist/esm/Matter/Behaviors/ISYOnOffBehavior.js +0 -47
- package/dist/esm/Matter/Behaviors/ISYOnOffBehavior.js.map +0 -1
- package/dist/esm/types/Devices/EndpointFor.d.ts +0 -108
- package/dist/esm/types/Devices/EndpointFor.d.ts.map +0 -1
- package/dist/esm/types/Matter/Behaviors/ISYOnOffBehavior.d.ts +0 -55
- package/dist/esm/types/Matter/Behaviors/ISYOnOffBehavior.d.ts.map +0 -1
package/src/ISYNode.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import { Logger } from 'winston';
|
|
3
3
|
import { Driver } from './Definitions/Global/Drivers.js';
|
|
4
4
|
import { Family } from './Definitions/Global/Families.js';
|
|
5
5
|
import { UnitOfMeasure } from './Definitions/Global/UOM.js';
|
|
6
|
-
import { ISY
|
|
6
|
+
import { ISY } from './ISY.js';
|
|
7
7
|
|
|
8
8
|
import { CliConfigSetLevels } from 'winston/lib/winston/config/index.js';
|
|
9
9
|
import { Converter } from './Converters.js';
|
|
@@ -14,13 +14,16 @@ import type { DriverState } from './Model/DriverState.js';
|
|
|
14
14
|
import { NodeInfo } from './Model/NodeInfo.js';
|
|
15
15
|
import type { NodeNotes } from './Model/NodeNotes.js';
|
|
16
16
|
import { type StringKeys } from './Utils.js';
|
|
17
|
+
import { NodeType } from './ISYConstants.js';
|
|
18
|
+
import type { ISYScene } from './ISYScene.js';
|
|
19
|
+
import type { UnionToIntersection } from '@matter/general';
|
|
17
20
|
|
|
18
21
|
//type DriverValues<DK extends string | number | symbol,V = any> = {[x in DK]?:V};
|
|
19
22
|
|
|
20
23
|
export class ISYNode<
|
|
21
|
-
T extends Family,
|
|
22
|
-
D extends ISYNode.DriverSignatures,
|
|
23
|
-
C extends ISYNode.CommandSignatures,
|
|
24
|
+
T extends Family = Family,
|
|
25
|
+
D extends ISYNode.DriverSignatures = {},
|
|
26
|
+
C extends ISYNode.CommandSignatures = {},
|
|
24
27
|
E extends ISYNode.EventSignatures = { [x in keyof D]: Event.DriverToEvent<D[x]> & { driver: x } } & { [x in keyof C]: Event.CommandToEvent<C[x]> & { command: x } }
|
|
25
28
|
> {
|
|
26
29
|
// #region Properties (32)
|
|
@@ -219,7 +222,7 @@ export class ISYNode<
|
|
|
219
222
|
|
|
220
223
|
public async getNotes(): Promise<NodeNotes> {
|
|
221
224
|
try {
|
|
222
|
-
const result = await this.isy.sendRequest(`nodes/${this.address}/notes`, { trailingSlash: false, errorLogLevel: 'debug' });
|
|
225
|
+
const result = await this.isy.sendRequest(`nodes/${this.address}/notes`, { trailingSlash: false, errorLogLevel: 'debug', validateStatus(status) { return true; }});
|
|
223
226
|
if (result !== null && result !== undefined) {
|
|
224
227
|
return result.NodeProperties;
|
|
225
228
|
} else {
|
package/src/ISYScene.ts
CHANGED
|
@@ -32,7 +32,7 @@ export class ISYScene extends ISYNode<Family.Scene, Driver.Signatures<'ST'>,Comm
|
|
|
32
32
|
public members: ISYDevice<any,any,any>[];
|
|
33
33
|
public typeCode: string;
|
|
34
34
|
constructor(isy: ISY, scene: SceneInfo) {
|
|
35
|
-
super(isy, scene as
|
|
35
|
+
super(isy, scene as NodeInfo);
|
|
36
36
|
// this.logger(JSON.stringify(scene));
|
|
37
37
|
this.typeCode = '';
|
|
38
38
|
this.connectionType = 'Insteon Wired';
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
import { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
7
7
|
import type { StateType } from '@project-chip/matter.js/behavior/state';
|
|
8
8
|
import { Internal } from '@project-chip/matter.js/behavior/state/managed';
|
|
9
|
-
import { EventEmitter, Observable
|
|
9
|
+
import { EventEmitter, Observable } from '@project-chip/matter.js/util';
|
|
10
10
|
import internal from 'stream';
|
|
11
11
|
import type { Driver } from '../../Definitions/Global/Drivers.js';
|
|
12
|
-
import { ISY
|
|
12
|
+
import { ISY } from '../../ISY.js';
|
|
13
13
|
import type { ISYDevice } from '../../ISYDevice.js';
|
|
14
14
|
import { DeviceToClusterMap, MappingRegistry, type ClusterMapping, type BehaviorMapping } from '../../Model/ClusterMap.js';
|
|
15
15
|
import { server } from 'typescript';
|
|
16
|
+
import type { ISYNode } from '../../ISYNode.js';
|
|
17
|
+
import type { Family } from '../../Definitions/index.js';
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
type ClusterForBehavior<B extends ClusterBehavior> = B extends ClusterBehavior.Type<infer C> ? C : never;
|
|
@@ -32,7 +34,7 @@ export class ISYBridgedDeviceBehavior<N extends ISYNode<any, D, any, any>, D ext
|
|
|
32
34
|
const d = ISY.instance.nodeMap.get(this.state.address);
|
|
33
35
|
this.internal.device = d;
|
|
34
36
|
this.internal.map = MappingRegistry.getMapping(this.internal.device as unknown as ISYNode<Family, any, any, any>);
|
|
35
|
-
|
|
37
|
+
|
|
36
38
|
ISY.instance.logger.debug(`Initializing ${this.constructor.name} for ${this.internal.device.constructor.name} ${this.internal.device.name} with address ${address}`);
|
|
37
39
|
if (d) {
|
|
38
40
|
d.events.on('propertyChanged', this.handlePropertyChange.bind(this));
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ClusterBehavior, ClusterInterface } from '@project-chip/matter.js/behavior/cluster';
|
|
3
|
-
import { BridgedDeviceBasicInformationServer } from '@project-chip/matter.js/behaviors/bridged-device-basic-information';
|
|
1
|
+
import type { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
4
2
|
import type { LevelControlBehavior } from '@project-chip/matter.js/behaviors/level-control';
|
|
5
|
-
import type { OnOffBehavior, OnOffServer } from '@project-chip/matter.js/behaviors/on-off';
|
|
6
|
-
import type { Cluster, ClusterServerHandlers, ClusterType as CT } from '@project-chip/matter.js/cluster';
|
|
7
3
|
import '@project-chip/matter.js/device';
|
|
8
|
-
import { OnOffLightRequirements } from '@project-chip/matter.js/devices/OnOffLightDevice';
|
|
9
|
-
import type { AnyMxRecord } from 'dns';
|
|
10
4
|
import { Converter } from '../../Converters.js';
|
|
11
|
-
import { Driver, DriverType } from '../../Definitions/Global/Drivers.js';
|
|
12
5
|
import type { Constructor } from '../../Devices/Constructor.js';
|
|
13
|
-
import type { RelaxTypes } from '../../Devices/MapsTo.js';
|
|
14
|
-
import { ISY, type ISYDevice } from '../../ISY.js';
|
|
15
6
|
import type { DriversOf, ISYNode } from '../../ISYNode.js';
|
|
16
|
-
import { BehaviorMapping
|
|
7
|
+
import { BehaviorMapping } from '../../Model/ClusterMap.js';
|
|
17
8
|
import { ISYBridgedDeviceBehavior } from './ISYBridgedDeviceBehavior.js';
|
|
18
|
-
import { loggers } from 'winston';
|
|
19
9
|
|
|
20
10
|
// #region Type aliases (6)
|
|
21
11
|
|
|
@@ -3,7 +3,7 @@ import { NodeJsEnvironment } from '@project-chip/matter-node.js/environment';
|
|
|
3
3
|
import { StorageBackendDisk } from '@project-chip/matter-node.js/storage';
|
|
4
4
|
import { BridgedDeviceBasicInformationServer } from '@project-chip/matter.js/behaviors/bridged-device-basic-information';
|
|
5
5
|
import { VendorId } from '@project-chip/matter.js/datatype';
|
|
6
|
-
import { logEndpoint } from '@project-chip/matter.js/device';
|
|
6
|
+
import { Device, logEndpoint } from '@project-chip/matter.js/device';
|
|
7
7
|
import { Endpoint, EndpointServer } from '@project-chip/matter.js/endpoint';
|
|
8
8
|
import { DimmableLightDevice, OnOffLightDevice } from '@project-chip/matter.js/endpoint/definitions';
|
|
9
9
|
import type { SupportedBehaviors } from '@project-chip/matter.js/endpoint/properties';
|
|
@@ -11,6 +11,8 @@ import { MutableEndpoint } from '@project-chip/matter.js/endpoint/type';
|
|
|
11
11
|
import { AggregatorEndpoint } from '@project-chip/matter.js/endpoints/AggregatorEndpoint';
|
|
12
12
|
import { StorageService } from '@project-chip/matter.js/environment';
|
|
13
13
|
import { Level, levelFromString, Logger as MatterLogger } from '@project-chip/matter.js/log';
|
|
14
|
+
import { Devices } from '../../Devices/index.js';
|
|
15
|
+
|
|
14
16
|
import { ServerNode } from '@project-chip/matter.js/node';
|
|
15
17
|
//@ts-ignore
|
|
16
18
|
import PackageJson from '@project-chip/matter.js/package.json' with { type: 'json' };
|
|
@@ -18,7 +20,7 @@ import { QrCode } from '@project-chip/matter.js/schema';
|
|
|
18
20
|
import path, { resolve } from 'path';
|
|
19
21
|
import { format, loggers } from 'winston';
|
|
20
22
|
import type { ISYDeviceNode } from '../../Devices/ISYDeviceNode.js';
|
|
21
|
-
import {
|
|
23
|
+
import { ISY } from '../../ISY.js';
|
|
22
24
|
import { ISYBridgedDeviceBehavior } from '../Behaviors/ISYBridgedDeviceBehavior.js';
|
|
23
25
|
import { ISYDimmableBehavior, ISYOnOffBehavior } from '../Behaviors/Insteon/ISYOnOffBehavior.js';
|
|
24
26
|
import '../Mappings/Insteon.js';
|
|
@@ -129,6 +131,7 @@ export async function createMatterServer(isy?: ISY, config?: Config): Promise<Se
|
|
|
129
131
|
productName: config.productName,
|
|
130
132
|
productLabel: config.productName,
|
|
131
133
|
productId: config.productId,
|
|
134
|
+
softwareVersionString: isy.firmwareVersion,
|
|
132
135
|
serialNumber: isy.id,
|
|
133
136
|
uniqueId: config.uniqueId
|
|
134
137
|
}
|
|
@@ -152,24 +155,24 @@ export async function createMatterServer(isy?: ISY, config?: Config): Promise<Se
|
|
|
152
155
|
|
|
153
156
|
logger.info(`Bridge Aggregator Added`);
|
|
154
157
|
|
|
155
|
-
|
|
158
|
+
|
|
156
159
|
|
|
157
160
|
for (const node of isy.nodeMap.values()) {
|
|
158
161
|
let device = node as ISYDeviceNode<any, any, any>;
|
|
159
162
|
let serialNumber = `${device.address.replaceAll(' ', '_').replaceAll('.', '_')}`;
|
|
160
|
-
if (device.enabled
|
|
163
|
+
if (device.enabled) {
|
|
161
164
|
//const name = `OnOff ${isASocket ? "Socket" : "Light"} ${i}`;
|
|
162
165
|
|
|
163
166
|
//@ts-ignore
|
|
164
|
-
let baseBehavior:
|
|
167
|
+
let baseBehavior: any;/*typeof (DimmableLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior, ISYDimmableBehavior)) | typeof (OnOffLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior));*/
|
|
165
168
|
|
|
166
|
-
if (device instanceof
|
|
169
|
+
if (device instanceof Devices.Insteon.Dimmer || device instanceof Devices.Insteon.DimmerSwitch || device instanceof Devices.Insteon.KeypadDimmer) {
|
|
167
170
|
baseBehavior = DimmableLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior, ISYDimmableBehavior);
|
|
168
171
|
// if(device instanceof InsteonSwitchDevice)
|
|
169
172
|
// {
|
|
170
173
|
// baseBehavior = DimmerSwitchDevice.with(BridgedDeviceBasicInformationServer);
|
|
171
174
|
// }
|
|
172
|
-
} else if (device instanceof
|
|
175
|
+
} else if (device instanceof Devices.Insteon.Relay || device instanceof Devices.Insteon.RelaySwitch) {
|
|
173
176
|
baseBehavior = OnOffLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior);
|
|
174
177
|
// if(device instanceof InsteonSwitchDevice)
|
|
175
178
|
// {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
3
|
import { OnOffLightDevice } from '@project-chip/matter.js/devices/OnOffLightDevice';
|
|
4
4
|
import { DriverType } from '../../Definitions/Global/Drivers.js';
|
|
5
5
|
import { Family, type t } from '../../Definitions/Global/Families.js';
|
package/src/Model/ClusterMap.ts
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import { Behavior } from '@project-chip/matter.js/behavior';
|
|
2
1
|
import { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
3
|
-
import type { OnOffBehavior } from '@project-chip/matter.js/behaviors/on-off';
|
|
4
2
|
import * as Clusters from '@project-chip/matter.js/cluster';
|
|
5
|
-
import { type Device, type DeviceTypeDefinition, type OnOffBaseDevice } from '@project-chip/matter.js/device';
|
|
6
3
|
import { OnOffLightDevice } from '@project-chip/matter.js/devices/OnOffLightDevice';
|
|
7
|
-
import * as DeviceTypes from '@project-chip/matter.js/endpoint/definitions';
|
|
8
4
|
import { SupportedBehaviors } from '@project-chip/matter.js/endpoint/properties';
|
|
9
5
|
import type { MutableEndpoint } from '@project-chip/matter.js/endpoint/type';
|
|
10
|
-
import type { Identity } from '@project-chip/matter.js/util';
|
|
11
|
-
import test from 'node:test';
|
|
12
6
|
import type { Converter } from '../Converters.js';
|
|
13
|
-
import {
|
|
14
|
-
import { Devices
|
|
7
|
+
import { DriverType } from '../Definitions/Global/Drivers.js';
|
|
8
|
+
import { Devices } from '../Devices/index.js';
|
|
15
9
|
import { Insteon } from '../Devices/Insteon/index.js';
|
|
16
|
-
|
|
17
|
-
import type { ISYDevice } from '../ISYDevice.js';
|
|
10
|
+
|
|
18
11
|
import type { CommandsOf, DriversOf, ISYNode } from '../ISYNode.js';
|
|
19
|
-
import type { ClusterForBehavior } from '../Matter/Behaviors/ISYClusterBehavior.js';
|
|
20
12
|
import { ClusterType } from './ClusterType.js';
|
|
13
|
+
import type { Family } from '../Definitions/index.js';
|
|
21
14
|
|
|
22
15
|
// #region Type aliases (16)
|
|
23
16
|
|
|
@@ -126,7 +119,7 @@ export type FamilyToClusterMap<T extends Family.Insteon | Family.ZWave | Family.
|
|
|
126
119
|
[Type in keyof Devices.Insteon]?: DeviceToClusterMap<InstanceType<Devices.Insteon[Type]>, any>;
|
|
127
120
|
};
|
|
128
121
|
export type SBAttributeMapping<SB extends SupportedBehaviors, D> = {
|
|
129
|
-
[K in keyof SB]: Partial<Record<
|
|
122
|
+
[K in keyof SB]: Partial<Record<any, DriversOf<D> | { driver: DriversOf<D>; converter?: string }>>;
|
|
130
123
|
};
|
|
131
124
|
export type SBCommandMapping<SB extends SupportedBehaviors, D> = {
|
|
132
125
|
//@ts-expect-error
|
|
@@ -189,7 +182,7 @@ var clusterMap = {
|
|
|
189
182
|
moveToColor: { command: DriverType.CustomControl1, parameters: { colorX: { parameter: 'colorX' }, colorY: { parameter: 'colorY' }, colorTemperature: { parameter: 'colorTemperature' } } }
|
|
190
183
|
}
|
|
191
184
|
};
|
|
192
|
-
const map: EndpointMapping<OnOffLightDevice, InsteonRelayDevice> = {
|
|
185
|
+
/*const map: EndpointMapping<OnOffLightDevice, InsteonRelayDevice> = {
|
|
193
186
|
Identify: {},
|
|
194
187
|
OnOff: {
|
|
195
188
|
attributes: {
|
|
@@ -199,6 +192,6 @@ const map: EndpointMapping<OnOffLightDevice, InsteonRelayDevice> = {
|
|
|
199
192
|
onWithTimedOff: { command: 'DON' }
|
|
200
193
|
}
|
|
201
194
|
}
|
|
202
|
-
}
|
|
195
|
+
};*/
|
|
203
196
|
|
|
204
197
|
// #endregion Variables (3)
|
package/src/Model/NodeDef.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { isArray } from 'util';
|
|
2
2
|
import { Driver } from '../Definitions/Global/Drivers.js'
|
|
3
3
|
import type { MaybeArray } from '../Utils.js';
|
|
4
|
-
|
|
5
|
-
import { ObjectSchema } from '@project-chip/matter.js/tlv';
|
|
4
|
+
|
|
6
5
|
|
|
7
6
|
export interface DriverDef {
|
|
8
7
|
id: Driver.Type;
|
package/src/Model/NodeInfo.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Family } from '../Definitions/index.js';
|
|
2
|
+
|
|
3
|
+
|
|
3
4
|
import type { DriverState } from './DriverState.js';
|
|
4
5
|
|
|
5
6
|
// #region Type aliases (1)
|
|
6
7
|
|
|
7
|
-
export type NodeInfo<T extends Family = Family> = (T extends Family.ZWave ? DynamicNodeInfo : StaticNodeInfo) & { state?: { [x: string]: DriverState } };
|
|
8
|
+
export type NodeInfo<T extends Family = Family> = (T extends Family.ZWave | Family.ZigBee ? DynamicNodeInfo : StaticNodeInfo) & { state?: { [x: string]: DriverState } };
|
|
8
9
|
|
|
9
10
|
// #endregion Type aliases (1)
|
|
10
11
|
|
package/src/Utils.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import axios, { AxiosRequestConfig } from 'axios';
|
|
2
1
|
|
|
3
2
|
import * as log4js from '@log4js-node/log4js-api';
|
|
4
|
-
import winston, { Logger, format } from 'winston';
|
|
3
|
+
import winston, { Logger, format, type LeveledLogMethod, type LogMethod } from 'winston';
|
|
5
4
|
|
|
6
|
-
import { Axios } from 'axios';
|
|
7
5
|
import { EventEmitter as BaseEventEmitter } from 'events';
|
|
8
6
|
import { Category } from './Definitions/Global/Categories.js';
|
|
9
7
|
|
|
10
8
|
//import { get } from 'http';
|
|
11
9
|
import type { PackageJson } from '@npmcli/package-json';
|
|
12
|
-
import type { Identity } from '@project-chip/matter.js/util';
|
|
13
10
|
import { existsSync } from 'fs';
|
|
14
11
|
import { readFile } from 'fs/promises';
|
|
15
12
|
import path from 'path';
|
|
16
|
-
import {
|
|
17
|
-
import { Family, type Driver, type DriverType, type EnumLiteral } from './Definitions/index.js';
|
|
13
|
+
import { Family } from './Definitions/index.js';
|
|
18
14
|
import { EventType } from './Events/EventType.js';
|
|
15
|
+
import type { Axios, AxiosRequestConfig } from 'axios';
|
|
19
16
|
|
|
20
17
|
export type StringKeys<T> = Extract<keyof T, string>;
|
|
21
18
|
|
|
19
|
+
export type PickOfType<T, U> = { [K in keyof T]: T[K] extends U ? (any extends T[K] ? never : K) : undefined }[keyof T];
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
22
23
|
export function getEnumValueByEnumKey<E extends { [index: string]: number }, T extends keyof E>(enumType: E, enumKey: T): E[T] {
|
|
23
24
|
return enumType[enumKey];
|
|
24
25
|
}
|
|
@@ -27,6 +28,8 @@ export function getEnumKeyByEnumValue<E extends { [index: string]: number }, T e
|
|
|
27
28
|
return Object.keys(enumType).find((key) => enumType[key] === enumValue) as unknown as T;
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
|
|
32
|
+
export type LogLevel = PickOfType<winston.Logger, LeveledLogMethod>;
|
|
30
33
|
export type ValuesOf<TEnum extends number | string | boolean | bigint> = `${TEnum}` extends `${infer R extends number}` ? R : `${TEnum}`;
|
|
31
34
|
|
|
32
35
|
type s = ValuesOf<Family>;
|
|
@@ -53,6 +56,10 @@ export function fromArray<T>(...value: T[]): MaybeArray<T> {
|
|
|
53
56
|
return value;
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
export type BaseRequestConfig = Pick<AxiosRequestConfig, 'auth' | 'baseURL' | 'socketPath'>;
|
|
60
|
+
|
|
61
|
+
export type ISYRequestConfig = Omit<AxiosRequestConfig, keyof BaseRequestConfig | 'method'>
|
|
62
|
+
|
|
56
63
|
export function byteToPct(value) {
|
|
57
64
|
return Math.round((value * 100) / 255);
|
|
58
65
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BridgedISYNodeInformationServer = exports.MatterEndpoint = void 0;
|
|
4
|
-
const endpoint_1 = require("@project-chip/matter.js/endpoint");
|
|
5
|
-
const bridged_device_basic_information_1 = require("@project-chip/matter.js/behaviors/bridged-device-basic-information");
|
|
6
|
-
const MatterEndpoint = (base, endpointType) => {
|
|
7
|
-
return class extends base {
|
|
8
|
-
endpointType = endpointType;
|
|
9
|
-
createEndpoint() {
|
|
10
|
-
var p = this.endpointType.with(bridged_device_basic_information_1.BridgedDeviceBasicInformationServer);
|
|
11
|
-
const id = this.address.replaceAll(' ', '_').replaceAll('.', ' ');
|
|
12
|
-
return new endpoint_1.Endpoint(p, { id: id, address: this.address, bridgedDeviceBasicInformation: {
|
|
13
|
-
nodeLabel: this.label.rightWithToken(32, ' '),
|
|
14
|
-
productName: this.productName.rightWithToken(32, ' '),
|
|
15
|
-
productLabel: this.model.leftWithToken(64, ' '),
|
|
16
|
-
serialNumber: id,
|
|
17
|
-
reachable: this.enabled,
|
|
18
|
-
} });
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.MatterEndpoint = MatterEndpoint;
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
const BISY = bridged_device_basic_information_1.BridgedDeviceBasicInformationBehavior.alter({ attributes: { address: { optional: false }, ...bridged_device_basic_information_1.BridgedDeviceBasicInformationServer.cluster.attributes } });
|
|
25
|
-
class BridgedISYNodeInformationServer extends bridged_device_basic_information_1.BridgedDeviceBasicInformationServer {
|
|
26
|
-
async initialize() {
|
|
27
|
-
return super.initialize();
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.BridgedISYNodeInformationServer = BridgedISYNodeInformationServer;
|
|
31
|
-
(function (BridgedISYNodeInformationServer) {
|
|
32
|
-
class State extends bridged_device_basic_information_1.BridgedDeviceBasicInformationServer.State {
|
|
33
|
-
}
|
|
34
|
-
BridgedISYNodeInformationServer.State = State;
|
|
35
|
-
})(BridgedISYNodeInformationServer || (exports.BridgedISYNodeInformationServer = BridgedISYNodeInformationServer = {}));
|
|
36
|
-
//# sourceMappingURL=EndpointFor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EndpointFor.js","sourceRoot":"","sources":["../../../src/Devices/EndpointFor.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAS5D,yHAAgK;AA2BzJ,MAAM,cAAc,GAAE,CAA8F,IAAO,EAAE,YAAe,EAAE,EAAE;IAItJ,OAAO,KAAM,SAAQ,IAAI;QAGxB,YAAY,GAAM,YAAY,CAAC;QAI/B,cAAc;YAEb,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,sEAAmC,CAAC,CAAC;YAEnE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAEnE,OAAO,IAAI,mBAAQ,CAAC,CAAC,EAAC,EAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,6BAA6B,EAAE;oBAEpF,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,EAAC,GAAG,CAAC;oBAChC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,EAAC,GAAG,CAAC;oBACpD,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,EAAC,GAAG,CAAC;oBAC9C,YAAY,EAAE,EAAE;oBAChB,SAAS,EAAE,IAAI,CAAC,OAAO;iBAC1B,EAAC,CAAC,CAAC;QAId,CAAC;KAIF,CAAA;AACD,CAAC,CAAA;AAjCY,QAAA,cAAc,kBAiC1B;AAEA,aAAa;AACX,MAAM,IAAI,GAAG,wEAAqC,CAAC,KAAK,CAAC,EAAC,UAAU,EAAE,EAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,KAAK,EAAC,EAAE,GAAG,sEAAmC,CAAC,OAAO,CAAC,UAAU,EAAC,EAAC,CAAC,CAAC;AAGjK,MAAa,+BAAgC,SAAQ,sEAAmC;IAG7E,KAAK,CAAC,UAAU;QAIrB,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC;IAI9B,CAAC;CACF;AAZD,0EAYC;AAED,WAAiB,+BAA+B;IAC9C,MAAa,KAAM,SAAQ,sEAAmC,CAAC,KAAK;KAGnE;IAHY,qCAAK,QAGjB,CAAA;AACL,CAAC,EALkB,+BAA+B,+CAA/B,+BAA+B,QAKjD"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ISYDimmableBehavior = exports.ISYOnOffBehavior = void 0;
|
|
4
|
-
const DimmableLightDevice_1 = require("@project-chip/matter.js/devices/DimmableLightDevice");
|
|
5
|
-
const OnOffLightDevice_1 = require("@project-chip/matter.js/devices/OnOffLightDevice");
|
|
6
|
-
const InsteonDimmableDevice_js_1 = require("../../Devices/Insteon/InsteonDimmableDevice.js");
|
|
7
|
-
const InsteonRelayDevice_js_1 = require("../../Devices/Insteon/InsteonRelayDevice.js");
|
|
8
|
-
const ISYClusterBehavior_js_1 = require("./ISYClusterBehavior.js");
|
|
9
|
-
const Converters_js_1 = require("../../Converters.js");
|
|
10
|
-
class ISYOnOffBehavior extends (0, ISYClusterBehavior_js_1.ISYClusterBehavior)(OnOffLightDevice_1.OnOffLightRequirements.OnOffServer, InsteonRelayDevice_js_1.InsteonRelayDevice) {
|
|
11
|
-
async initialize(_options) {
|
|
12
|
-
await super.initialize(_options);
|
|
13
|
-
this.state.onOff = (await this.device.status);
|
|
14
|
-
//this.state.onOff = await this.device.state;
|
|
15
|
-
}
|
|
16
|
-
on = async () => {
|
|
17
|
-
await super.on();
|
|
18
|
-
await this.device.on();
|
|
19
|
-
//this.device.commands.DON = true;
|
|
20
|
-
};
|
|
21
|
-
async off() {
|
|
22
|
-
await super.off();
|
|
23
|
-
await this.device.off();
|
|
24
|
-
// this.device.drivers = false;
|
|
25
|
-
}
|
|
26
|
-
toggle = async () => {
|
|
27
|
-
//this.device.state = !(await this.device.state);
|
|
28
|
-
};
|
|
29
|
-
async handlePropertyChange({ driver, newValue, oldValue, formattedValue }) {
|
|
30
|
-
return super.handlePropertyChange({ driver, newValue, oldValue, formattedValue });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.ISYOnOffBehavior = ISYOnOffBehavior;
|
|
34
|
-
class ISYDimmableBehavior extends (0, ISYClusterBehavior_js_1.ISYClusterBehavior)(DimmableLightDevice_1.DimmableLightRequirements.LevelControlServer, InsteonDimmableDevice_js_1.InsteonDimmableDevice) {
|
|
35
|
-
async initialize(_options) {
|
|
36
|
-
await super.initialize(_options);
|
|
37
|
-
/*this.state.onLevel = Converter.get('Level255toZero.LightingLevel').to(this.device.drivers.OL)*/
|
|
38
|
-
//this.state.currentLevel = this.device.drivers.ST.value;
|
|
39
|
-
//this.state.onLevel = this.device.drivers.OL;
|
|
40
|
-
}
|
|
41
|
-
setLevel(level) {
|
|
42
|
-
level = Converters_js_1.Converter.Matter.LevelFrom0To255.LightingLevel.from(level);
|
|
43
|
-
if (level > 0) {
|
|
44
|
-
return this.device.on();
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return this.device.off();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.ISYDimmableBehavior = ISYDimmableBehavior;
|
|
52
|
-
//# sourceMappingURL=ISYOnOffBehavior.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISYOnOffBehavior.js","sourceRoot":"","sources":["../../../../src/Matter/Behaviors/ISYOnOffBehavior.ts"],"names":[],"mappings":";;;AAGA,6FAAgG;AAChG,uFAA0F;AAI1F,6FAAuF;AACvF,uFAAiF;AAEjF,mEAAsG;AAEtG,uDAAgD;AAEhD,MAAa,gBAAiB,SAAQ,IAAA,0CAAkB,EAAC,yCAAsB,CAAC,WAAW,EAAE,0CAAkB,CAAC;IACtG,KAAK,CAAC,UAAU,CAAC,QAAa;QACtC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9C,6CAA6C;IAC9C,CAAC;IAEQ,EAAE,GAAG,KAAK,IAAI,EAAE;QACxB,MAAM,KAAK,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QAEvB,kCAAkC;IACnC,CAAC,CAAC;IAEO,KAAK,CAAC,GAAG;QACjB,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC;QAClB,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAExB,+BAA+B;IAChC,CAAC;IAEQ,MAAM,GAAG,KAAK,IAAI,EAAE;QAC5B,iDAAiD;IAClD,CAAC,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAsC;QAErH,OAAO,KAAK,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IACnF,CAAC;CACD;AA7BD,4CA6BC;AAED,MAAa,mBAAoB,SAAQ,IAAA,0CAAkB,EAAC,+CAAyB,CAAC,kBAAkB,EAAE,gDAAqB,CAAC;IACtH,KAAK,CAAC,UAAU,CAAC,QAAa;QACtC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjC,iGAAiG;QACjG,yDAAyD;QAEzD,8CAA8C;IAC/C,CAAC;IAEQ,QAAQ,CAAC,KAAa;QAC9B,KAAK,GAAG,yBAAS,CAAC,MAAM,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnE,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACzB,CAAC;aAAM,CAAC;YACP,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC;IACF,CAAC;CACD;AAjBD,kDAiBC"}
|
package/dist/cjs/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{ "type": "commonjs" }
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Endpoint } from '@project-chip/matter.js/endpoint';
|
|
2
|
-
import { SupportedBehaviors } from '@project-chip/matter.js/endpoint/properties';
|
|
3
|
-
import { Behavior } from '@project-chip/matter.js/behavior';
|
|
4
|
-
import { MutableEndpoint, EndpointType } from '@project-chip/matter.js/endpoint/type';
|
|
5
|
-
import type { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
6
|
-
import { type ClusterType } from '@project-chip/matter.js/cluster';
|
|
7
|
-
import type { Constructor } from './Constructor.js';
|
|
8
|
-
import type { ISYDeviceNode } from '../Devices/ISYDeviceNode.js';
|
|
9
|
-
import { BridgedDeviceBasicInformationServer } from '@project-chip/matter.js/behaviors/bridged-device-basic-information';
|
|
10
|
-
export type RelaxTypes<V> = V extends number ? number : V extends bigint ? bigint : V extends object ? V extends (...args: any[]) => any ? V : {
|
|
11
|
-
[K in keyof V]: RelaxTypes<V[K]>;
|
|
12
|
-
} : V;
|
|
13
|
-
export type RelaxedClusterType = RelaxTypes<ClusterType>;
|
|
14
|
-
export type EndpointFor<K extends Behavior.Type, K1 extends Behavior.Type = K, K2 extends Behavior.Type = K, K3 extends Behavior.Type = K> = {
|
|
15
|
-
events: SupportedBehaviors.EventsOf<SupportedBehaviors.MapOf<[K, K1, K2, K3]>>;
|
|
16
|
-
} & MutableEndpoint.With<EndpointType.Empty, SupportedBehaviors.MapOf<[K, K1, K2, K3]>>;
|
|
17
|
-
export type BehaviorsOf<K extends ClusterType.Of<ClusterType.Options<{}>>, K1 extends ClusterType = K, K2 extends ClusterType = K, K3 extends ClusterType = K> = [ClusterBehavior.Type<K>, ClusterBehavior.Type<K1>, ClusterBehavior.Type<K2>, ClusterBehavior.Type<K3>];
|
|
18
|
-
export type SupportedBehaviorsOf<K extends ClusterType.Of<ClusterType.Options<{}>>, K1 extends ClusterType = K, K2 extends ClusterType = K, K3 extends ClusterType = K> = SupportedBehaviors.MapOf<BehaviorsOf<K, K1, K2, K3>>;
|
|
19
|
-
export type EndpointForCluster<K extends ClusterType.Of<ClusterType.Options<{}>>, K1 extends ClusterType = K, K2 extends ClusterType = K, K3 extends ClusterType = K> = {
|
|
20
|
-
events: SupportedBehaviors.EventsOf<SupportedBehaviorsOf<K, K1, K2, K3>>;
|
|
21
|
-
set: (values: SupportedBehaviors.StatePatchOf<SupportedBehaviorsOf<K, K1, K2, K3>>) => void;
|
|
22
|
-
};
|
|
23
|
-
export declare const MatterEndpoint: <P extends EndpointType & MutableEndpoint, T extends Constructor<ISYDeviceNode<any, any, any>>>(base: T, endpointType: P) => {
|
|
24
|
-
new (...args: any[]): {
|
|
25
|
-
endpointType: P;
|
|
26
|
-
createEndpoint<K extends SupportedBehaviors>(): Endpoint;
|
|
27
|
-
family: any;
|
|
28
|
-
readonly typeCode: string;
|
|
29
|
-
readonly deviceClass: any;
|
|
30
|
-
readonly category: import("../ISY.js").Categories;
|
|
31
|
-
readonly subCategory: number;
|
|
32
|
-
declare: any;
|
|
33
|
-
_enabled: any;
|
|
34
|
-
productName: string;
|
|
35
|
-
model: string;
|
|
36
|
-
modelNumber: string;
|
|
37
|
-
version: string;
|
|
38
|
-
_parentDevice: import("../ISYDevice.js").ISYDevice<any, any, any, any>;
|
|
39
|
-
children: import("../ISYNode.js").ISYNode<any, any, any, any>[];
|
|
40
|
-
addChild<K extends import("../ISYNode.js").ISYNode<any, any, any, any>>(childDevice: K): void;
|
|
41
|
-
"__#72@#parentNode": import("../ISYNode.js").ISYNode<any, any, any, any>;
|
|
42
|
-
readonly address: string;
|
|
43
|
-
readonly baseLabel: string;
|
|
44
|
-
readonly flag: any;
|
|
45
|
-
readonly isy: import("../ISY.js").ISY;
|
|
46
|
-
readonly nodeDefId: string;
|
|
47
|
-
baseName: any;
|
|
48
|
-
commands: import("../Definitions/index.js").Command.ForAll<any>;
|
|
49
|
-
drivers: import("../Definitions/index.js").Driver.ForAll<any, false>;
|
|
50
|
-
enabled: boolean;
|
|
51
|
-
events: {
|
|
52
|
-
on(eventName: `${any}Changed` & `${any}Triggered`, listener: (driver: string, newValue: any, oldValue: any, formatted: string, uom: any) => void): import("../Definitions/Global/Events.js").Event.NodeEventEmitter<any>;
|
|
53
|
-
} & Omit<import("../Definitions/Global/Events.js").Event.NodeEventEmitter<any>, "on">;
|
|
54
|
-
folder: string;
|
|
55
|
-
hidden: boolean;
|
|
56
|
-
isDimmable: boolean;
|
|
57
|
-
isLoad: boolean;
|
|
58
|
-
label: string;
|
|
59
|
-
lastChanged: Date;
|
|
60
|
-
location: string;
|
|
61
|
-
logger: (msg: any, level?: keyof import("winston/lib/winston/config/index.js").CliConfigSetLevels, ...meta: any[]) => import("winston").Logger;
|
|
62
|
-
name: string;
|
|
63
|
-
nodeType: number;
|
|
64
|
-
parent: any;
|
|
65
|
-
parentAddress: any;
|
|
66
|
-
parentType: import("../ISYConstants.js").NodeType;
|
|
67
|
-
propsInitialized: boolean;
|
|
68
|
-
scenes: import("../ISYScene.js").ISYScene[];
|
|
69
|
-
spokenName: string;
|
|
70
|
-
type: any;
|
|
71
|
-
readonly parentNode: import("../ISYNode.js").ISYNode<any, any, any, any>;
|
|
72
|
-
addLink(isyScene: import("../ISYScene.js").ISYScene): void;
|
|
73
|
-
applyStatus(prop: import("../Model/DriverState.js").DriverState): void;
|
|
74
|
-
convert(value: any, from: import("../Definitions/index.js").UnitOfMeasure, to: import("../Definitions/index.js").UnitOfMeasure): any;
|
|
75
|
-
convertFrom(value: any, uom: import("../Definitions/index.js").UnitOfMeasure, propertyName?: string): any;
|
|
76
|
-
convertTo(value: any, uom: import("../Definitions/index.js").UnitOfMeasure, propertyName?: string): any;
|
|
77
|
-
emit(event: "propertyChanged" | "controlTriggered", propertyName?: string, newValue?: any, oldValue?: any, formattedValue?: string, controlName?: string): void;
|
|
78
|
-
generateLabel(template: string): string;
|
|
79
|
-
getNotes(): Promise<import("../Model/NodeNotes.js").NodeNotes>;
|
|
80
|
-
handleControlTrigger(controlName: string | number | symbol): boolean;
|
|
81
|
-
handleEvent(event: {
|
|
82
|
-
control?: any;
|
|
83
|
-
data?: any;
|
|
84
|
-
node?: any;
|
|
85
|
-
action?: any;
|
|
86
|
-
fmtAct?: any;
|
|
87
|
-
}): boolean;
|
|
88
|
-
handlePropertyChange(propertyName: string, value: any, uom: import("../Definitions/index.js").UnitOfMeasure, prec?: number, formattedValue?: string): boolean;
|
|
89
|
-
parseResult(node: {
|
|
90
|
-
property: import("../Model/DriverState.js").DriverState | import("../Model/DriverState.js").DriverState[];
|
|
91
|
-
}): void;
|
|
92
|
-
readProperties(): Promise<import("../Model/DriverState.js").DriverState[]>;
|
|
93
|
-
readProperty(propertyName: string): Promise<import("../Model/DriverState.js").DriverState>;
|
|
94
|
-
refresh(): Promise<any>;
|
|
95
|
-
refreshNotes(): Promise<void>;
|
|
96
|
-
sendCommand(command: string, parameters?: Record<string | symbol, string | number | undefined> | string | number): Promise<any>;
|
|
97
|
-
updateProperty(propertyName: string, value: any): Promise<any>;
|
|
98
|
-
};
|
|
99
|
-
} & T;
|
|
100
|
-
export declare class BridgedISYNodeInformationServer extends BridgedDeviceBasicInformationServer {
|
|
101
|
-
initialize(): Promise<void>;
|
|
102
|
-
}
|
|
103
|
-
export declare namespace BridgedISYNodeInformationServer {
|
|
104
|
-
class State extends BridgedDeviceBasicInformationServer.State {
|
|
105
|
-
address: string;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=EndpointFor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EndpointFor.d.ts","sourceRoot":"","sources":["../../../../src/Devices/EndpointFor.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { LevelControlInterface, LevelControlServer } from '@project-chip/matter.js/behaviors/level-control';
|
|
2
|
-
import type { OnOffServer } from '@project-chip/matter.js/behaviors/on-off';
|
|
3
|
-
import type { MaybePromise } from '@project-chip/matter.js/util';
|
|
4
|
-
import { InsteonDimmableDevice } from '../../Devices/Insteon/InsteonDimmableDevice.js';
|
|
5
|
-
import { InsteonRelayDevice } from '../../Devices/Insteon/InsteonRelayDevice.js';
|
|
6
|
-
import { type PropertyChange } from './ISYClusterBehavior.js';
|
|
7
|
-
declare const ISYOnOffBehavior_base: import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").OnOff.Cluster, readonly [import("@project-chip/matter.js/cluster").OnOff.Feature.Lighting]>, readonly ["Lighting"]>, typeof OnOffServer, import("@project-chip/matter.js/behaviors/on-off").OnOffInterface> & (new (...args: any[]) => import("./ISYClusterBehavior.js").DeviceBehavior<InsteonRelayDevice, import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").OnOff.Cluster, readonly [import("@project-chip/matter.js/cluster").OnOff.Feature.Lighting]>, readonly ["Lighting"]>, typeof OnOffServer, import("@project-chip/matter.js/behaviors/on-off").OnOffInterface>>);
|
|
8
|
-
export declare class ISYOnOffBehavior extends ISYOnOffBehavior_base {
|
|
9
|
-
initialize(_options?: {}): Promise<void>;
|
|
10
|
-
on: () => Promise<void>;
|
|
11
|
-
off(): Promise<void>;
|
|
12
|
-
toggle: () => Promise<void>;
|
|
13
|
-
handlePropertyChange({ driver, newValue, oldValue, formattedValue }: PropertyChange<InsteonRelayDevice>): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
declare const ISYDimmableBehavior_base: import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ElementModifier.WithAlterations<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").LevelControl.Cluster, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff, import("@project-chip/matter.js/cluster").LevelControl.Feature.Lighting]>, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff]>, readonly ["Lighting", "OnOff"]>, {
|
|
16
|
-
readonly attributes: {
|
|
17
|
-
readonly currentLevel: {
|
|
18
|
-
readonly min: 1;
|
|
19
|
-
readonly max: 254;
|
|
20
|
-
};
|
|
21
|
-
readonly minLevel: {
|
|
22
|
-
readonly default: 1;
|
|
23
|
-
readonly min: 1;
|
|
24
|
-
readonly max: 2;
|
|
25
|
-
};
|
|
26
|
-
readonly maxLevel: {
|
|
27
|
-
readonly default: 254;
|
|
28
|
-
readonly min: 254;
|
|
29
|
-
readonly max: 255;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}>, import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").LevelControl.Cluster, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff, import("@project-chip/matter.js/cluster").LevelControl.Feature.Lighting]>, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff]>, readonly ["Lighting", "OnOff"]>, typeof LevelControlServer, LevelControlInterface>, LevelControlInterface> & (new (...args: any[]) => import("./ISYClusterBehavior.js").DeviceBehavior<InsteonDimmableDevice, import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ElementModifier.WithAlterations<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").LevelControl.Cluster, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff, import("@project-chip/matter.js/cluster").LevelControl.Feature.Lighting]>, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff]>, readonly ["Lighting", "OnOff"]>, {
|
|
33
|
-
readonly attributes: {
|
|
34
|
-
readonly currentLevel: {
|
|
35
|
-
readonly min: 1;
|
|
36
|
-
readonly max: 254;
|
|
37
|
-
};
|
|
38
|
-
readonly minLevel: {
|
|
39
|
-
readonly default: 1;
|
|
40
|
-
readonly min: 1;
|
|
41
|
-
readonly max: 2;
|
|
42
|
-
};
|
|
43
|
-
readonly maxLevel: {
|
|
44
|
-
readonly default: 254;
|
|
45
|
-
readonly min: 254;
|
|
46
|
-
readonly max: 255;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
}>, import("@project-chip/matter.js/dist/cjs/behavior/cluster/ClusterBehavior.js").ClusterBehavior.Type<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").ClusterComposer.WithFeatures<import("@project-chip/matter.js/cluster").LevelControl.Cluster, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff, import("@project-chip/matter.js/cluster").LevelControl.Feature.Lighting]>, readonly [import("@project-chip/matter.js/cluster").LevelControl.Feature.OnOff]>, readonly ["Lighting", "OnOff"]>, typeof LevelControlServer, LevelControlInterface>, LevelControlInterface>>);
|
|
50
|
-
export declare class ISYDimmableBehavior extends ISYDimmableBehavior_base {
|
|
51
|
-
initialize(_options?: {}): Promise<void>;
|
|
52
|
-
setLevel(level: number): MaybePromise<void>;
|
|
53
|
-
}
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=ISYOnOffBehavior.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ISYOnOffBehavior.d.ts","sourceRoot":"","sources":["../../../../../src/Matter/Behaviors/ISYOnOffBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACjH,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAK3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,EAA0C,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;;AAItG,qBAAa,gBAAiB,SAAQ,qBAA0E;IAChG,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;IAM9B,EAAE,sBAKT;IAEa,GAAG;IAOT,MAAM,sBAEb;IAEa,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,cAAc,CAAC,kBAAkB,CAAC;CAItH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,mBAAoB,SAAQ,wBAAuF;IAChH,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE;IAQ9B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC;CAQpD"}
|