isy-nodejs 1.0.4-alpha.0 → 1.0.5-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Devices/EndpointFor.js.map +1 -1
- package/dist/esm/Devices/ISYDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonDeviceFactory.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonDimmableDevice.js +2 -2
- package/dist/esm/Devices/Insteon/InsteonDimmableDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonDimmerOutletDevice.js +2 -2
- package/dist/esm/Devices/Insteon/InsteonDimmerOutletDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/InsteonRelayDevice.js +1 -1
- package/dist/esm/Devices/Insteon/InsteonRelayDevice.js.map +1 -1
- package/dist/esm/Devices/Insteon/index.js +4 -1
- package/dist/esm/Devices/Insteon/index.js.map +1 -1
- package/dist/esm/ISYNode.js +12 -4
- package/dist/esm/ISYNode.js.map +1 -1
- package/dist/esm/Matter/Behaviors/ISYBridgedDeviceBehavior.js.map +1 -1
- package/dist/esm/types/Devices/EndpointFor.d.ts +5 -5
- package/dist/esm/types/Devices/EndpointFor.d.ts.map +1 -1
- package/dist/esm/types/Devices/ISYDevice.d.ts +1 -1
- package/dist/esm/types/Devices/ISYDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts +6 -4
- package/dist/esm/types/Devices/Insteon/InsteonDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDeviceFactory.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDimmableDevice.d.ts +3 -3
- package/dist/esm/types/Devices/Insteon/InsteonDimmableDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonDimmerOutletDevice.d.ts +2 -2
- package/dist/esm/types/Devices/Insteon/InsteonDimmerOutletDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonRelayDevice.d.ts +1 -1
- package/dist/esm/types/Devices/Insteon/InsteonRelayDevice.d.ts.map +1 -1
- package/dist/esm/types/Devices/Insteon/index.d.ts +3 -1
- package/dist/esm/types/Devices/Insteon/index.d.ts.map +1 -1
- package/dist/esm/types/ISYNode.d.ts +5 -3
- 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/Model/EnumDefinition.d.ts +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Devices/EndpointFor.ts +4 -3
- package/src/Devices/ISYDevice.ts +2 -1
- package/src/Devices/Insteon/InsteonDeviceFactory.ts +1 -0
- package/src/Devices/Insteon/InsteonDimmableDevice.ts +6 -9
- package/src/Devices/Insteon/InsteonDimmerOutletDevice.ts +2 -2
- package/src/Devices/Insteon/InsteonRelayDevice.ts +3 -2
- package/src/Devices/Insteon/index.ts +9 -19
- package/src/ISYNode.ts +18 -5
- package/src/Matter/Behaviors/ISYBridgedDeviceBehavior.ts +1 -2
- package/src/Model/NLS.ts +1 -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.5-alpha.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Pradeep Mouli"
|
|
8
8
|
},
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "33a72bbbf3d091f30e5fa0ac72cc671be6119f44"
|
|
77
77
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { Endpoint } from '@project-chip/matter.js/endpoint';
|
|
2
|
-
|
|
1
|
+
import { Endpoint, type EndpointType, type MutableEndpoint } from '@project-chip/matter.js/endpoint';
|
|
2
|
+
|
|
3
3
|
import { Behavior } from '@project-chip/matter.js/behavior';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import type { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
6
6
|
import { type ClusterType } from '@project-chip/matter.js/cluster';
|
|
7
7
|
import type { Constructor } from './Constructor.js';
|
|
8
8
|
import type { ISYDeviceNode } from '../Devices/ISYDeviceNode.js';
|
|
9
9
|
|
|
10
10
|
import { BridgedDeviceBasicInformationBehavior, BridgedDeviceBasicInformationServer } from '@project-chip/matter.js/behaviors/bridged-device-basic-information';
|
|
11
|
+
import type { SupportedBehaviors } from '@matter/node';
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
export type RelaxTypes<V> = V extends number
|
package/src/Devices/ISYDevice.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { SupportedBehaviors } from '@matter/node';
|
|
1
2
|
import { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
2
3
|
import type { Endpoint, EndpointType, MutableEndpoint } from '@project-chip/matter.js/endpoint';
|
|
3
|
-
|
|
4
|
+
|
|
4
5
|
import 'winston';
|
|
5
6
|
|
|
6
7
|
// export const ISYBinaryStateDevice = <K extends Family,D extends DriverSignatures, T extends Constructor<ISYDeviceNode<K,Driver.ToSignatures<'ST'>,any,any>>>(Base: T) => {
|
|
@@ -2,6 +2,7 @@ import { Category } from '../../Definitions/Global/Categories.js';
|
|
|
2
2
|
|
|
3
3
|
import { parseTypeCode } from '../../Utils.js';
|
|
4
4
|
import { NodeInfo } from '../../Model/NodeInfo.js';
|
|
5
|
+
import * as Insteon from './index.js';
|
|
5
6
|
import { InsteonDimmableDevice } from './InsteonDimmableDevice.js';
|
|
6
7
|
import { InsteonDimmerOutletDevice } from './InsteonDimmerOutletDevice.js';
|
|
7
8
|
import { InsteonDimmerSwitchDevice } from './InsteonDimmerSwitchDevice.js';
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { ISY } from '../../ISY.js';
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
import { InsteonRelayDevice } from './InsteonRelayDevice.js';
|
|
6
5
|
//
|
|
7
6
|
import type { DimmableLightRequirements } from '@project-chip/matter.js/devices/DimmableLightDevice';
|
|
8
|
-
import {
|
|
9
|
-
import { OnOffBehavior as OOB, OnOffInterface } from '@project-chip/matter.js/behaviors/on-off';
|
|
10
|
-
import { OnOff, ClusterType } from '@project-chip/matter.js/cluster';
|
|
7
|
+
import { OnOffBehavior as OOB } from '@project-chip/matter.js/behaviors/on-off';
|
|
11
8
|
import 'winston';
|
|
12
|
-
import { UnitOfMeasure } from '../../Definitions/Global/UOM.js';
|
|
13
9
|
import type { NodeInfo } from '../../Model/NodeInfo.js';
|
|
14
|
-
import {
|
|
10
|
+
import { DimmerLampSwitchNode } from './Generated/DimmerLampSwitch.js';
|
|
11
|
+
|
|
15
12
|
|
|
16
13
|
// #region Type aliases (2)
|
|
17
14
|
|
|
@@ -23,7 +20,7 @@ type OnOffBehavior = typeof OOB;
|
|
|
23
20
|
// #region Classes (1)
|
|
24
21
|
|
|
25
22
|
//@ts-ignore
|
|
26
|
-
export class InsteonDimmableDevice extends
|
|
23
|
+
export class InsteonDimmableDevice extends DimmerLampSwitchNode{
|
|
27
24
|
// #region Constructors (1)
|
|
28
25
|
|
|
29
26
|
constructor(isy: ISY, node: NodeInfo) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NodeInfo } from '../../Model/NodeInfo.js';
|
|
2
2
|
import type { ISY } from '../../ISY.js';
|
|
3
|
-
import {
|
|
3
|
+
import { DimmerLampNode } from './Generated/DimmerLamp.js';
|
|
4
4
|
|
|
5
|
-
export class InsteonDimmerOutletDevice extends
|
|
5
|
+
export class InsteonDimmerOutletDevice extends DimmerLampNode {
|
|
6
6
|
constructor (isy: ISY, deviceNode: NodeInfo) {
|
|
7
7
|
super(isy, deviceNode);
|
|
8
8
|
}
|
|
@@ -7,20 +7,21 @@ import { InsteonBaseDevice } from './InsteonBaseDevice.js';
|
|
|
7
7
|
|
|
8
8
|
import type { OnOffBehavior } from '@project-chip/matter.js/behaviors/on-off';
|
|
9
9
|
import 'winston';
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import type { Command } from '../../Definitions/Global/Commands.js';
|
|
12
12
|
import { Driver, DriverType } from '../../Definitions/Global/Drivers.js';
|
|
13
13
|
import { UnitOfMeasure } from '../../Definitions/index.js';
|
|
14
14
|
import { Properties } from '../../ISYConstants.js';
|
|
15
15
|
|
|
16
16
|
import type { DriverState } from '../../Model/DriverState.js';
|
|
17
|
+
import { RelayLampSwitch } from './Generated/RelayLampSwitch.js';
|
|
17
18
|
|
|
18
19
|
export class InsteonRelayDevice extends RelayLampSwitch.Node /*InsteonBaseDevice<Driver.Signatures<'ST' | 'OL' | 'RR' | 'ERR'>, Command.Signatures<'DON' | 'DOF'>>*/ {
|
|
19
20
|
// #region Constructors (1)
|
|
20
21
|
|
|
21
22
|
constructor(isy: ISY, nodeInfo: NodeInfo) {
|
|
22
23
|
super(isy, nodeInfo);
|
|
23
|
-
|
|
24
|
+
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
// #endregion Constructors (1)
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//import Base from "./InsteonBaseDevice.js"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { InsteonRelayDevice } from "./InsteonRelayDevice.js";
|
|
6
|
-
import { InsteonDimmableDevice } from "./InsteonDimmableDevice.js";
|
|
7
|
-
import { InsteonKeypadDimmerDevice } from "./InsteonKeypadDimmerDevice.js";
|
|
8
|
-
import { InsteonMotionSensorDevice } from "./InsteonMotionSensorDevice.js";
|
|
9
|
-
import { InsteonDimmerSwitchDevice } from "./InsteonDimmerSwitchDevice.js";
|
|
10
|
-
import { InsteonSmokeSensorDevice } from "./InsteonSmokeSensorDevice.js";
|
|
11
|
-
import { InsteonDimmerOutletDevice } from "./InsteonDimmerOutletDevice.js";
|
|
12
|
-
import { InsteonRelaySwitchDevice } from "./InsteonRelaySwitchDevice.js";
|
|
13
|
-
import { InsteonThermostatDevice } from "./InsteonThermostatDevice.js";
|
|
14
|
-
import { InsteonDoorWindowSensorDevice } from './InsteonDoorWindowSensorDevice.js';
|
|
15
|
-
|
|
16
|
-
import { ISYNode } from '../../ISYNode.js';
|
|
17
|
-
import type * as GeneratedTypes from "./Generated/index.js";
|
|
3
|
+
|
|
4
|
+
|
|
18
5
|
|
|
19
6
|
export {InsteonBaseDevice as Base} from "./InsteonBaseDevice.js";
|
|
20
7
|
|
|
8
|
+
export * from './Generated/index.js';
|
|
9
|
+
|
|
10
|
+
export {InsteonDimmableDevice as Dimmable} from "./InsteonDimmableDevice.js";
|
|
11
|
+
|
|
12
|
+
export {InsteonRelayDevice as Relay} from "./InsteonRelayDevice.js";
|
|
13
|
+
|
|
21
14
|
export {InsteonLeakSensorDevice as LeakSensor} from "./InsteonLeakSensorDevice.js";
|
|
22
15
|
|
|
23
16
|
export {InsteonMotionSensorDevice as MotionSensor} from "./InsteonMotionSensorDevice.js";
|
|
@@ -38,6 +31,3 @@ export {InsteonDimmerOutletDevice as DimmerOutlet} from "./InsteonDimmerOutletDe
|
|
|
38
31
|
Lock: InsteonLockDevice,
|
|
39
32
|
Fan: InsteonFanDevice,
|
|
40
33
|
...Generated */
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export * from './Generated/index.js';
|
package/src/ISYNode.ts
CHANGED
|
@@ -352,12 +352,25 @@ export class ISYNode<
|
|
|
352
352
|
}
|
|
353
353
|
public async sendCommand(command: StringKeys<C>): Promise<any>;
|
|
354
354
|
public async sendCommand(command: StringKeys<C>, value: string | number, parameters: Record<string | symbol, string | number | undefined>);
|
|
355
|
-
public async sendCommand(command: StringKeys<C>,
|
|
356
|
-
async sendCommand(command: StringKeys<C>,
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
public async sendCommand(command: StringKeys<C>, value: string | number): Promise<any>;
|
|
356
|
+
public async sendCommand(command: StringKeys<C>, parameters: Record<string | symbol, string | number | undefined>): Promise<any>;
|
|
357
|
+
async sendCommand(command: StringKeys<C>, valueOrParameters?: string | number | Record<string | symbol, string | number | undefined>, parameters?: Record<string | symbol, string | number | undefined>): Promise<any> {
|
|
358
|
+
if (valueOrParameters === null || valueOrParameters === undefined) {
|
|
359
|
+
return this.isy.sendNodeCommand(this, command);
|
|
359
360
|
}
|
|
360
|
-
|
|
361
|
+
|
|
362
|
+
if(parameters === null || parameters === undefined) {
|
|
363
|
+
return this.isy.sendNodeCommand(this, command, valueOrParameters);
|
|
364
|
+
}
|
|
365
|
+
if(typeof valueOrParameters === 'object') {
|
|
366
|
+
return this.isy.sendNodeCommand(this, command, {...valueOrParameters,...parameters});
|
|
367
|
+
}
|
|
368
|
+
if(typeof valueOrParameters === 'string' || typeof valueOrParameters === 'number') {
|
|
369
|
+
return this.isy.sendNodeCommand(this, command, { default: valueOrParameters, ...parameters });
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
361
374
|
}
|
|
362
375
|
|
|
363
376
|
public async updateProperty(propertyName: string, value: any): Promise<any> {
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/ import { Behavior } from '@project-chip/matter.js/behavior';
|
|
6
6
|
import { ClusterBehavior } from '@project-chip/matter.js/behavior/cluster';
|
|
7
|
-
|
|
8
|
-
import { Internal } from '@project-chip/matter.js/behavior/state/managed';
|
|
7
|
+
|
|
9
8
|
import { EventEmitter, Observable } from '@project-chip/matter.js/util';
|
|
10
9
|
import internal from 'stream';
|
|
11
10
|
import type { Driver } from '../../Definitions/Global/Drivers.js';
|
package/src/Model/NLS.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { merge } from 'moderndash';
|
|
|
2
2
|
import type { DriverType } from "../Definitions/Global/Drivers.js";
|
|
3
3
|
import { Family } from "../Definitions/Global/Families.js";
|
|
4
4
|
import "../Utils.js";
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
|
|
7
7
|
export enum NLSRecordType {
|
|
8
8
|
Generic = "GEN",
|