isy-nodejs 1.0.1-alpha.28 → 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/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/Insteon/InsteonRelayDevice.js +0 -16
- package/dist/cjs/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
- package/dist/cjs/Devices/MapsTo.js +11 -0
- package/dist/cjs/Devices/MapsTo.js.map +1 -1
- package/dist/cjs/ISYNode.js.map +1 -1
- package/dist/cjs/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/cjs/Matter/Bridge/Server.js +2 -1
- 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.map +1 -1
- package/dist/cjs/Model/NodeDef.js.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/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 +2 -2
- 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/MapsTo.d.ts +0 -9
- package/dist/cjs/types/Devices/MapsTo.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/ISYNode.d.ts +2 -2
- package/dist/cjs/types/ISYNode.d.ts.map +1 -1
- package/dist/cjs/types/Matter/Behaviors/ISYBridgedDeviceBehavior.d.ts +2 -7
- package/dist/cjs/types/Matter/Behaviors/ISYBridgedDeviceBehavior.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 +1 -2
- package/dist/cjs/types/Model/ClusterMap.d.ts.map +1 -1
- package/dist/cjs/types/Model/NodeDef.d.ts.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/Insteon/InsteonRelayDevice.js +0 -16
- package/dist/esm/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
- package/dist/esm/Devices/MapsTo.js +11 -0
- package/dist/esm/Devices/MapsTo.js.map +1 -1
- package/dist/esm/ISYNode.js.map +1 -1
- package/dist/esm/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/esm/Matter/Bridge/Server.js +2 -1
- 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.map +1 -1
- package/dist/esm/Model/NodeDef.js.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/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 +2 -2
- 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/MapsTo.d.ts +0 -9
- package/dist/esm/types/Devices/MapsTo.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/ISYNode.d.ts +2 -2
- package/dist/esm/types/ISYNode.d.ts.map +1 -1
- package/dist/esm/types/Matter/Behaviors/ISYBridgedDeviceBehavior.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 +1 -2
- package/dist/esm/types/Model/ClusterMap.d.ts.map +1 -1
- package/dist/esm/types/Model/NodeDef.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/Definitions/Global/Commands.ts +1 -3
- package/src/Definitions/Global/Drivers.ts +7 -16
- package/src/Definitions/Global/Events.ts +1 -1
- package/src/Devices/EndpointFor.ts +3 -2
- package/src/Devices/ISYDevice.ts +3 -6
- package/src/Devices/Insteon/InsteonBaseDevice.ts +2 -2
- package/src/Devices/Insteon/InsteonDimmableDevice.ts +2 -2
- package/src/Devices/Insteon/InsteonRelayDevice.ts +3 -18
- package/src/Devices/MapsTo.ts +3 -3
- package/src/Devices/ZWave/ZWaveBaseDevice.ts +1 -1
- package/src/ISYNode.ts +2 -1
- package/src/Matter/Behaviors/ISYBridgedDeviceBehavior.ts +1 -1
- package/src/Matter/Bridge/Server.ts +2 -1
- package/src/Matter/Mappings/Insteon.ts +2 -2
- package/src/Model/ClassDefinition.ts +1 -1
- package/src/Model/ClusterMap.ts +3 -11
- package/src/Model/NodeDef.ts +1 -2
- 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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "isy-nodejs",
|
|
3
3
|
"description": "Node.js wrapper for ISY interface including websockets for change notifications. Fork of isy-js by Rod Toll. Designed to be used in a node.js application.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.0.1-alpha.
|
|
5
|
+
"version": "1.0.1-alpha.29",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Pradeep Mouli"
|
|
8
8
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rimraf ./dist/*",
|
|
14
14
|
"build:esm": "tsc -p ./tsconfig.esm.json",
|
|
15
15
|
"build:cjs": "tsc -p ./tsconfig.cjs.json && cp ./package.cjs.json ./dist/cjs/package.json",
|
|
16
|
-
"build": "npm run build:esm
|
|
16
|
+
"build": "npm run build:esm",
|
|
17
17
|
"build:esm:watch": "tsc -p ./tsconfig.esm.json --watch"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
@@ -52,15 +52,16 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@log4js-node/log4js-api": "^1.0.2",
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
55
|
+
"@matter/general": "^0.11.4",
|
|
56
|
+
"@matter/types": "^0.11.4",
|
|
57
|
+
"@project-chip/matter-node.js": "^0.11.4",
|
|
58
|
+
"@project-chip/matter.js": "^0.11.4",
|
|
57
59
|
"axios": "^1.7.7",
|
|
58
60
|
"fast-xml-parser": "^4.5.0",
|
|
59
61
|
"faye-websocket": "^0.11.4",
|
|
60
|
-
"
|
|
61
|
-
"mocha": "^10.7.3",
|
|
62
|
+
"mocha": "^10.8.2",
|
|
62
63
|
"p-queue": "^8.0.1",
|
|
63
|
-
"winston": "^3.
|
|
64
|
+
"winston": "^3.17.0",
|
|
64
65
|
"xml2js": "^0.6.2"
|
|
65
66
|
},
|
|
66
67
|
"bugs": {
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "772a37165997c5b675f4916b4d260b8209b2e739"
|
|
73
74
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Identity, Merge, UnionToIntersection } from '@project-chip/matter.js/util';
|
|
3
|
-
import type { Sign } from 'crypto';
|
|
1
|
+
|
|
4
2
|
import type { UnitOfMeasure } from './UOM.js';
|
|
5
3
|
|
|
6
4
|
/*export class Command<T extends string> extends Function {
|
|
@@ -3,11 +3,7 @@ import { isBoxedPrimitive } from 'util/types';
|
|
|
3
3
|
import type { ISYNode } from '../../ISYNode.js';
|
|
4
4
|
import { UnitOfMeasure } from './UOM.js';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import type { TlvNumberSchema } from '@project-chip/matter.js/tlv';
|
|
8
|
-
import type { Identity, MaybePromise, UnionToIntersection } from '@project-chip/matter.js/util';
|
|
9
|
-
import exp from 'constants';
|
|
10
|
-
import { init } from 'homebridge';
|
|
6
|
+
import type { Identity, MaybePromise, UnionToIntersection } from '@matter/general';
|
|
11
7
|
import { server } from 'typescript';
|
|
12
8
|
import { Converter } from '../../Converters.js';
|
|
13
9
|
import type { ISYDeviceNode } from '../../Devices/ISYDeviceNode.js';
|
|
@@ -297,7 +293,7 @@ export interface Driver<
|
|
|
297
293
|
patch(value: T, formattedValue: string, uom: UnitOfMeasure, prec: number, notify?: boolean): boolean;
|
|
298
294
|
|
|
299
295
|
// #endregion Public Methods (2)
|
|
300
|
-
//override on('change', listener: (value: any) => void): this;
|
|
296
|
+
//override on('change', listener: (value: any) => void): this;
|
|
301
297
|
}
|
|
302
298
|
|
|
303
299
|
export interface StatelessDriver<
|
|
@@ -327,7 +323,7 @@ export interface StatelessDriver<
|
|
|
327
323
|
uom: U;
|
|
328
324
|
|
|
329
325
|
// #endregion Properties (9)
|
|
330
|
-
//override on('change', listener: (value: any) => void): this;
|
|
326
|
+
//override on('change', listener: (value: any) => void): this;
|
|
331
327
|
}
|
|
332
328
|
|
|
333
329
|
export function isStateless(x: any): x is StatelessDriver<any, any, any> {
|
|
@@ -384,7 +380,7 @@ export namespace Driver {
|
|
|
384
380
|
type StatelessOrStateful<D extends string, U extends UnitOfMeasure, T = number, N = string, L = string, S extends boolean = false> =
|
|
385
381
|
S extends true ? StatelessDriver<D, U, T, U, N, L> : Driver<D, U, T, U, N, L>;
|
|
386
382
|
|
|
387
|
-
export function create<D extends Literal, U extends UnitOfMeasure, T = number,
|
|
383
|
+
export function create<D extends Literal, U extends UnitOfMeasure, T = number, N extends string = string, L extends string = string, S extends boolean = false>(
|
|
388
384
|
driver: EnumWithLiteral<D>,
|
|
389
385
|
|
|
390
386
|
node?: ISYNode<Family, any, any, any>,
|
|
@@ -462,20 +458,15 @@ export namespace Driver {
|
|
|
462
458
|
if (uom != this.uom) {
|
|
463
459
|
this.serverUom == uom;
|
|
464
460
|
this.state.value = converter ? converter.from(this.state.rawValue) : Converter.convert(uom, this.uom, this.state.rawValue);
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
else if(converter)
|
|
468
|
-
{
|
|
461
|
+
} else if (converter) {
|
|
469
462
|
this.state.value = converter.from(value);
|
|
470
|
-
}
|
|
471
|
-
else
|
|
472
|
-
{
|
|
463
|
+
} else {
|
|
473
464
|
this.state.value = value;
|
|
474
465
|
}
|
|
475
466
|
if (previousValue == this.state.value) {
|
|
476
467
|
return false;
|
|
477
468
|
}
|
|
478
|
-
if (notify) node.events.emit(`${this.name}Changed`, driver as D, this.state.value,
|
|
469
|
+
if (notify) node.events.emit(`${this.name}Changed`, driver as D, this.state.value, previousValue, formattedValue);
|
|
479
470
|
return true;
|
|
480
471
|
},
|
|
481
472
|
get value() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UnionToIntersection } from '@
|
|
1
|
+
import type { UnionToIntersection } from '@matter/general';
|
|
2
2
|
import type { AnyMxRecord } from 'dns';
|
|
3
3
|
import EventEmitter, { on } from 'events';
|
|
4
4
|
import type { EventType } from '../../Events/EventType.js';
|
|
@@ -23,12 +23,12 @@ export type RelaxTypes<V> = V extends number
|
|
|
23
23
|
: V;
|
|
24
24
|
|
|
25
25
|
export type RelaxedClusterType = RelaxTypes<ClusterType>
|
|
26
|
-
|
|
26
|
+
//@ts-ignore
|
|
27
27
|
export type EndpointFor<K extends Behavior.Type, K1 extends Behavior.Type = K, K2 extends Behavior.Type = K, K3 extends Behavior.Type = K> = { events: SupportedBehaviors.EventsOf<SupportedBehaviors.MapOf<[K, K1, K2, K3]>>} & MutableEndpoint.With<EndpointType.Empty, SupportedBehaviors.MapOf<[K, K1, K2, K3]>>
|
|
28
28
|
|
|
29
29
|
/*set: (values: SupportedBehaviors.StatePatchOf<SupportedBehaviors.MapOf<[K, K1, K2]>>) => void; }*/
|
|
30
30
|
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>]
|
|
31
|
-
|
|
31
|
+
//@ts-ignore
|
|
32
32
|
export type SupportedBehaviorsOf <K extends ClusterType.Of<ClusterType.Options<{}>>, K1 extends ClusterType = K, K2 extends ClusterType = K, K3 extends ClusterType = K> =
|
|
33
33
|
SupportedBehaviors.MapOf<BehaviorsOf<K, K1,K2,K3>>
|
|
34
34
|
|
|
@@ -47,6 +47,7 @@ export const MatterEndpoint= <P extends EndpointType & MutableEndpoint, T extend
|
|
|
47
47
|
|
|
48
48
|
createEndpoint<K extends SupportedBehaviors>() : Endpoint {
|
|
49
49
|
|
|
50
|
+
//@ts-ignore
|
|
50
51
|
var p = this.endpointType.with(BridgedDeviceBasicInformationServer);
|
|
51
52
|
|
|
52
53
|
const id = this.address.replaceAll(' ', '_').replaceAll('.', ' ');
|
package/src/Devices/ISYDevice.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { Commands, States } from '../ISYConstants.js';
|
|
3
|
-
import { EndpointType, MutableEndpoint } from '@project-chip/matter.js/endpoint/type';
|
|
4
|
-
import { Endpoint } from '@project-chip/matter.js/endpoint';
|
|
5
|
-
import { BridgedDeviceBasicInformationServer } from '@project-chip/matter.js/behaviors/bridged-device-basic-information';
|
|
6
|
-
import { SupportedBehaviors } from '@project-chip/matter.js/endpoint/properties';
|
|
7
2
|
import { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
3
|
+
import type { Endpoint, EndpointType, MutableEndpoint } from '@project-chip/matter.js/endpoint';
|
|
4
|
+
import type { SupportedBehaviors } from '@project-chip/matter.js/endpoint/properties';
|
|
8
5
|
import 'winston'
|
|
9
6
|
|
|
10
7
|
|
|
@@ -100,7 +97,7 @@ export interface MapsToEndpointType<T extends EndpointType> {
|
|
|
100
97
|
type BehaviorList<T extends ClusterBehavior> = SupportedBehaviors & T;
|
|
101
98
|
|
|
102
99
|
export interface MapsToEndpoint<T extends ClusterBehavior>
|
|
103
|
-
{
|
|
100
|
+
{//@ts-ignore
|
|
104
101
|
initialize<K extends MutableEndpoint.With<EndpointType.Empty,BehaviorList<T>>>(endpoint: Endpoint<K>): void;
|
|
105
102
|
|
|
106
103
|
}
|
|
@@ -10,7 +10,7 @@ import { NodeInfo } from '../../Model/NodeInfo.js';
|
|
|
10
10
|
import { byteToDegree, byteToPct, pctToByte, type StringKeys } from '../../Utils.js';
|
|
11
11
|
import { ISYDeviceNode } from '../ISYDeviceNode.js';
|
|
12
12
|
|
|
13
|
-
import type { Merge } from '@
|
|
13
|
+
import type { Merge } from '@matter/general';
|
|
14
14
|
import type { DriverState } from '../../Model/DriverState.js';
|
|
15
15
|
|
|
16
16
|
// import { InsteonNLS } from './insteonfam.js'
|
|
@@ -20,7 +20,7 @@ export class InsteonBaseDevice<D extends ISYNode.DriverSignatures = {}, C extend
|
|
|
20
20
|
C
|
|
21
21
|
> {
|
|
22
22
|
// #region Constructors (1)
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
constructor(isy: ISY, deviceNode: NodeInfo) {
|
|
25
25
|
super(isy, deviceNode);
|
|
26
26
|
this.family = Family.Insteon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Identity } from '@project-chip/matter.js/util';
|
|
2
2
|
import { ISY } from '../../ISY.js';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
|
|
5
5
|
import { InsteonRelayDevice } from './InsteonRelayDevice.js';
|
|
6
6
|
//
|
|
7
7
|
import type { DimmableLightRequirements } from '@project-chip/matter.js/devices/DimmableLightDevice';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ISY } from '../../ISY.js';
|
|
2
2
|
|
|
3
3
|
import { NodeInfo } from '../../Model/NodeInfo.js';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
import { InsteonBaseDevice } from './InsteonBaseDevice.js';
|
|
7
7
|
|
|
8
8
|
import type { OnOffBehavior } from '@project-chip/matter.js/behaviors/on-off';
|
|
@@ -26,22 +26,7 @@ export class InsteonRelayDevice extends RelayLampSwitch.Node /*InsteonBaseDevice
|
|
|
26
26
|
|
|
27
27
|
// #region Public Methods (2)
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
/*endpoint.events.onOff.onOff$Changed.on((value) => {
|
|
31
|
-
this.commands.DON(value);
|
|
32
|
-
this.drivers.ST;
|
|
33
|
-
});
|
|
34
|
-
//endpoint.defaults.onOff.onOff = await this.isOn;
|
|
35
|
-
endpoint.set({ onOff: { onOff: (await this.drivers.ST.value) > 0 } });
|
|
36
|
-
const that = this;
|
|
37
|
-
|
|
38
|
-
this.events.on('StatusChanged', (propertyName, newValue, _oldValue, formattedValue) => {
|
|
39
|
-
if (propertyName === 'ST') {
|
|
40
|
-
endpoint.set({ onOff: { onOff: newValue > 0 } });
|
|
41
|
-
//endpoint.setSt onOff: newValue });
|
|
42
|
-
}
|
|
43
|
-
});*/
|
|
44
|
-
}
|
|
29
|
+
|
|
45
30
|
|
|
46
31
|
/*
|
|
47
32
|
public async updateIsOn(isOn: boolean): Promise<any> {
|
package/src/Devices/MapsTo.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Behavior } from '@project-chip/matter.js/behavior';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import type { Cluster, ClusterType, MutableCluster } from '@project-chip/matter.js/cluster';
|
|
4
4
|
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ export type RelaxTypes<V> = V extends number
|
|
|
15
15
|
}
|
|
16
16
|
: V;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
/*
|
|
19
19
|
|
|
20
20
|
export interface MapsTo<T extends Behavior.Type, T1 extends Behavior.Type = T, T2 extends Behavior.Type = T, T3 extends Behavior.Type = T> {
|
|
21
21
|
initialize(endpoint: EndpointFor<T, T1, T2, T3>): void | Promise<void>;
|
|
@@ -25,4 +25,4 @@ export interface MapsTo<T extends Behavior.Type, T1 extends Behavior.Type = T, T
|
|
|
25
25
|
export interface MapsToCluster<T extends ClusterType.Of<ClusterType.Options<{}>>, T1 extends ClusterType = T, T2 extends ClusterType = T, T3 extends ClusterType = T> {
|
|
26
26
|
initialize(endpoint: EndpointForCluster<T,T1, T2, T3>): void;
|
|
27
27
|
|
|
28
|
-
}
|
|
28
|
+
}*/
|
|
@@ -6,7 +6,7 @@ import { ISYDeviceNode } from '../ISYDeviceNode.js';
|
|
|
6
6
|
import { ISYNode } from '../../ISYNode.js';
|
|
7
7
|
import 'winston';
|
|
8
8
|
import type { Driver } from '../../Definitions/Global/Drivers.js';
|
|
9
|
-
import type { Merge } from '@
|
|
9
|
+
import type { Merge } from '@matter/general';
|
|
10
10
|
|
|
11
11
|
// import { InsteonNLS } from './insteonfam'
|
|
12
12
|
export class ZWaveBaseDevice<D extends ISYNode.DriverSignatures = {}, C extends ISYNode.CommandSignatures = {}> extends ISYDeviceNode<Family.ZWave,Merge<D,Driver.Signatures<'ST'>>,C> {
|
package/src/ISYNode.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
@@ -16,6 +16,7 @@ import type { NodeNotes } from './Model/NodeNotes.js';
|
|
|
16
16
|
import { type StringKeys } from './Utils.js';
|
|
17
17
|
import { NodeType } from './ISYConstants.js';
|
|
18
18
|
import type { ISYScene } from './ISYScene.js';
|
|
19
|
+
import type { UnionToIntersection } from '@matter/general';
|
|
19
20
|
|
|
20
21
|
//type DriverValues<DK extends string | number | symbol,V = any> = {[x in DK]?:V};
|
|
21
22
|
|
|
@@ -6,7 +6,7 @@
|
|
|
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
12
|
import { ISY } from '../../ISY.js';
|
|
@@ -131,6 +131,7 @@ export async function createMatterServer(isy?: ISY, config?: Config): Promise<Se
|
|
|
131
131
|
productName: config.productName,
|
|
132
132
|
productLabel: config.productName,
|
|
133
133
|
productId: config.productId,
|
|
134
|
+
softwareVersionString: isy.firmwareVersion,
|
|
134
135
|
serialNumber: isy.id,
|
|
135
136
|
uniqueId: config.uniqueId
|
|
136
137
|
}
|
|
@@ -163,7 +164,7 @@ export async function createMatterServer(isy?: ISY, config?: Config): Promise<Se
|
|
|
163
164
|
//const name = `OnOff ${isASocket ? "Socket" : "Light"} ${i}`;
|
|
164
165
|
|
|
165
166
|
//@ts-ignore
|
|
166
|
-
let baseBehavior:
|
|
167
|
+
let baseBehavior: any;/*typeof (DimmableLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior, ISYDimmableBehavior)) | typeof (OnOffLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior));*/
|
|
167
168
|
|
|
168
169
|
if (device instanceof Devices.Insteon.Dimmer || device instanceof Devices.Insteon.DimmerSwitch || device instanceof Devices.Insteon.KeypadDimmer) {
|
|
169
170
|
baseBehavior = DimmableLightDevice.with(BridgedDeviceBasicInformationServer, ISYBridgedDeviceBehavior, ISYOnOffBehavior, ISYDimmableBehavior);
|
|
@@ -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,22 +1,14 @@
|
|
|
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
10
|
|
|
17
|
-
import type { ISYDevice } from '../ISYDevice.js';
|
|
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';
|
|
21
13
|
import type { Family } from '../Definitions/index.js';
|
|
22
14
|
|
|
@@ -127,7 +119,7 @@ export type FamilyToClusterMap<T extends Family.Insteon | Family.ZWave | Family.
|
|
|
127
119
|
[Type in keyof Devices.Insteon]?: DeviceToClusterMap<InstanceType<Devices.Insteon[Type]>, any>;
|
|
128
120
|
};
|
|
129
121
|
export type SBAttributeMapping<SB extends SupportedBehaviors, D> = {
|
|
130
|
-
[K in keyof SB]: Partial<Record<
|
|
122
|
+
[K in keyof SB]: Partial<Record<any, DriversOf<D> | { driver: DriversOf<D>; converter?: string }>>;
|
|
131
123
|
};
|
|
132
124
|
export type SBCommandMapping<SB extends SupportedBehaviors, D> = {
|
|
133
125
|
//@ts-expect-error
|
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/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;A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AAe,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("../Definitions/index.js").Category;
|
|
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
|
-
//#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