isy-nodejs 1.0.8-alpha.0 → 1.0.9-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Devices/Insteon/InsteonFanDevice.js +1 -3
- package/dist/esm/Devices/Insteon/InsteonFanDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonOnOffOutletDevice.js +11 -0
- package/dist/esm/Devices/Insteon/InsteonOnOffOutletDevice.js.map +1 -1
- package/dist/esm/ISY.js +1 -1
- package/dist/esm/ISY.js.map +1 -1
- package/dist/esm/Matter/Behaviors/ISYBridgedDeviceBehavior.js +1 -1
- package/dist/esm/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/esm/Matter/Behaviors/index.js +6 -0
- package/dist/esm/Matter/Behaviors/index.js.map +1 -0
- package/dist/esm/Matter/Bridge/Server.js +2 -1
- package/dist/esm/Matter/Bridge/Server.js.map +1 -1
- package/dist/esm/Matter/Mappings/index.js +1 -0
- package/dist/esm/Matter/Mappings/index.js.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonFanDevice.d.ts +1 -2
- package/dist/esm/types/Devices/Insteon/InsteonFanDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonOnOffOutletDevice.d.ts +6 -0
- package/dist/esm/types/Devices/Insteon/InsteonOnOffOutletDevice.d.ts.map +1 -1
- package/dist/esm/types/Matter/Behaviors/Insteon/DimmerLevelControlBehavior.d.ts +4 -4
- package/dist/esm/types/Matter/Behaviors/Insteon/RelayOnOffBehavior.d.ts +4 -4
- package/dist/esm/types/Matter/Behaviors/index.d.ts +6 -0
- package/dist/esm/types/Matter/Behaviors/index.d.ts.map +1 -0
- package/dist/esm/types/Matter/Bridge/Server.d.ts +1 -0
- package/dist/esm/types/Matter/Bridge/Server.d.ts.map +1 -1
- package/dist/esm/types/Matter/Mappings/MappingRegistry.d.ts +64 -64
- package/dist/esm/types/Matter/Mappings/index.d.ts +1 -0
- package/dist/esm/types/Matter/Mappings/index.d.ts.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Devices/Insteon/InsteonFanDevice.ts +1 -1
- package/src/Devices/Insteon/InsteonOnOffOutletDevice.ts +13 -0
- package/src/ISY.ts +1 -1
- package/src/Matter/Behaviors/ISYBridgedDeviceBehavior.ts +1 -1
- package/src/Matter/Behaviors/index.ts +6 -0
- package/src/Matter/Bridge/Server.ts +2 -1
- package/src/Matter/Mappings/index.ts +3 -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.
|
|
5
|
+
"version": "1.0.9-alpha.1",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Pradeep Mouli"
|
|
8
8
|
},
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "9521cb43ec9bffaa16e91234351abd5981c2037e"
|
|
78
78
|
}
|
|
@@ -4,9 +4,22 @@ import type { NodeInfo } from '../../Model/NodeInfo.js';
|
|
|
4
4
|
import { RelayLamp } from './Generated/RelayLamp.js';
|
|
5
5
|
import { InsteonRelayDevice } from './InsteonRelayDevice.js';
|
|
6
6
|
import { CompositeDevice, CompositeOf } from '../CompositeDevice.js';
|
|
7
|
+
import type { ISYDevice } from '../../ISYDevice.js';
|
|
7
8
|
|
|
8
9
|
export class OnOffOutlet extends CompositeDevice.of({ top: RelayLamp.Node, bottom: RelayLamp.Node }, {top: 1, bottom: 2}) {
|
|
9
10
|
constructor(isy: ISY, deviceNode: NodeInfo) {
|
|
10
11
|
super(isy, deviceNode);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
export namespace OnOffOutlet {
|
|
16
|
+
export function is(node: ISYDevice<any, any, any, any>): node is OnOffOutlet {
|
|
17
|
+
return node instanceof OnOffOutlet;
|
|
18
|
+
}
|
|
19
|
+
export function create(isy: ISY, node: NodeInfo) {
|
|
20
|
+
return new OnOffOutlet(isy, node);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const Device = OnOffOutlet;
|
|
24
|
+
|
|
25
|
+
}
|
package/src/ISY.ts
CHANGED
|
@@ -831,7 +831,7 @@ export class ISY extends EventEmitter implements Disposable {
|
|
|
831
831
|
parent.addNode(node);
|
|
832
832
|
|
|
833
833
|
}
|
|
834
|
-
else
|
|
834
|
+
else if(!this.deviceList.has(node.address))
|
|
835
835
|
{
|
|
836
836
|
this.deviceList.set(node.address, node as unknown as ISYDevice<any, any, any, any>);
|
|
837
837
|
}
|
|
@@ -59,7 +59,7 @@ export class ISYBridgedDeviceBehavior<N extends ISYNode<any, D, any, any>, D ext
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
mapForBehavior<B extends ClusterBehavior>(behavior: B): ClusterMapping<B, typeof this.internal.device> {
|
|
62
|
-
return this.map.mapping[behavior.cluster.name];
|
|
62
|
+
return this.map.mapping[behavior.cluster.name] ?? {attributes: {}, commands: {}};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
handlePropertyChange(driver: string, newValue: any, oldValue: any, formattedValue: string) {
|
|
@@ -12,6 +12,7 @@ import { ISY } from '../../ISY.js';
|
|
|
12
12
|
import type { ISYNode } from '../../ISYNode.js';
|
|
13
13
|
|
|
14
14
|
import '../Mappings/index.js';
|
|
15
|
+
import '../Behaviors/Insteon/index.js';
|
|
15
16
|
import { MappingRegistry } from '../Mappings/MappingRegistry.js';
|
|
16
17
|
import { DimmerLevelControlBehavior } from '../Behaviors/Insteon/DimmerLevelControlBehavior.js';
|
|
17
18
|
import { RelayOnOffBehavior } from '../Behaviors/Insteon/index.js';
|
|
@@ -237,7 +238,7 @@ export async function createMatterServer(isy?: ISY, config?: Config): Promise<Se
|
|
|
237
238
|
let b = BehaviorRegistry.get(device,behavior.cluster.name);
|
|
238
239
|
if(b)
|
|
239
240
|
{
|
|
240
|
-
baseBehavior =
|
|
241
|
+
baseBehavior = baseBehavior.with(b);
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
}
|