@matterbridge/core 3.10.1-dev-20260719-5fc5a0c → 3.10.1-dev-20260720-a3c94f3
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.
|
@@ -2,6 +2,7 @@ import { ClosureControlServer } from '@matter/node/behaviors/closure-control';
|
|
|
2
2
|
import { ClosureControl } from '@matter/types/clusters/closure-control';
|
|
3
3
|
import type { Semtag } from '@matter/types/globals';
|
|
4
4
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
5
|
+
import { type ClosurePanelOptions } from './closurePanel.js';
|
|
5
6
|
declare const MatterbridgeClosureControlServer_base: import("@matter/node").ClusterBehavior.Type<typeof ClosureControlServer, import("@matter/types").ClusterType.WithSupportedFeatures<ClosureControl, {
|
|
6
7
|
calibration: false;
|
|
7
8
|
instantaneous: false;
|
|
@@ -29,5 +30,6 @@ export interface ClosureOptions {
|
|
|
29
30
|
export declare class Closure extends MatterbridgeEndpoint {
|
|
30
31
|
constructor(name: string, serial: string, options?: ClosureOptions);
|
|
31
32
|
getMainState(): ClosureControl.MainState | undefined;
|
|
33
|
+
addPanel(name: string, tagList: Semtag[], options?: Pick<ClosurePanelOptions, 'currentState' | 'targetState' | 'resolution' | 'stepValue' | 'latchControlModes'>): MatterbridgeEndpoint;
|
|
32
34
|
}
|
|
33
35
|
export {};
|
package/dist/devices/closure.js
CHANGED
|
@@ -2,8 +2,9 @@ import { ClosureControlServer } from '@matter/node/behaviors/closure-control';
|
|
|
2
2
|
import { ClosureControl } from '@matter/types/clusters/closure-control';
|
|
3
3
|
import { ThreeLevelAuto } from '@matter/types/globals';
|
|
4
4
|
import { MatterbridgeServer } from '../behaviors/matterbridgeServer.js';
|
|
5
|
-
import { closure } from '../matterbridgeDeviceTypes.js';
|
|
5
|
+
import { closure, closurePanel } from '../matterbridgeDeviceTypes.js';
|
|
6
6
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
7
|
+
import { MatterbridgeClosureDimensionServer } from './closurePanel.js';
|
|
7
8
|
export class MatterbridgeClosureControlServer extends ClosureControlServer.with(ClosureControl.Feature.Positioning, ClosureControl.Feature.MotionLatching, ClosureControl.Feature.Speed) {
|
|
8
9
|
moveTo = async (request) => {
|
|
9
10
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
@@ -64,4 +65,15 @@ export class Closure extends MatterbridgeEndpoint {
|
|
|
64
65
|
getMainState() {
|
|
65
66
|
return this.getAttribute(ClosureControlServer, 'mainState');
|
|
66
67
|
}
|
|
68
|
+
addPanel(name, tagList, options = {}) {
|
|
69
|
+
const panel = this.addChildDeviceType(name, closurePanel, { tagList });
|
|
70
|
+
panel.behaviors.require(MatterbridgeClosureDimensionServer, {
|
|
71
|
+
currentState: options.currentState ?? { position: 0, latch: true, speed: ThreeLevelAuto.Auto },
|
|
72
|
+
targetState: options.targetState ?? { position: 0, latch: true, speed: ThreeLevelAuto.Auto },
|
|
73
|
+
resolution: options.resolution ?? 1,
|
|
74
|
+
stepValue: options.stepValue ?? 1,
|
|
75
|
+
latchControlModes: options.latchControlModes ?? { remoteLatching: true, remoteUnlatching: true },
|
|
76
|
+
});
|
|
77
|
+
return panel;
|
|
78
|
+
}
|
|
67
79
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClosureDimensionServer } from '@matter/node/behaviors/closure-dimension';
|
|
2
2
|
import { ClosureDimension } from '@matter/types/clusters/closure-dimension';
|
|
3
|
+
import type { Semtag } from '@matter/types/globals';
|
|
3
4
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
4
5
|
declare const MatterbridgeClosureDimensionServer_base: import("@matter/node").ClusterBehavior.Type<typeof ClosureDimensionServer, import("@matter/types").ClusterType.WithSupportedFeatures<ClosureDimension, {
|
|
5
6
|
limitation: false;
|
|
@@ -16,8 +17,12 @@ export declare class MatterbridgeClosureDimensionServer extends MatterbridgeClos
|
|
|
16
17
|
step: (request: ClosureDimension.StepRequest) => Promise<void>;
|
|
17
18
|
}
|
|
18
19
|
export interface ClosurePanelOptions {
|
|
20
|
+
currentState?: ClosureDimension.DimensionState;
|
|
21
|
+
targetState?: ClosureDimension.DimensionState;
|
|
19
22
|
resolution?: number;
|
|
20
23
|
stepValue?: number;
|
|
24
|
+
latchControlModes?: ClosureDimension.LatchControlModes;
|
|
25
|
+
tagList?: Semtag[];
|
|
21
26
|
}
|
|
22
27
|
export declare class ClosurePanel extends MatterbridgeEndpoint {
|
|
23
28
|
constructor(name: string, serial: string, options?: ClosurePanelOptions);
|
|
@@ -54,13 +54,14 @@ export class MatterbridgeClosureDimensionServer extends ClosureDimensionServer.w
|
|
|
54
54
|
}
|
|
55
55
|
export class ClosurePanel extends MatterbridgeEndpoint {
|
|
56
56
|
constructor(name, serial, options = {}) {
|
|
57
|
-
super([closurePanel], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}
|
|
57
|
+
super([closurePanel], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}`, tagList: options.tagList });
|
|
58
58
|
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Matterbridge Closure Panel');
|
|
59
59
|
this.behaviors.require(MatterbridgeClosureDimensionServer, {
|
|
60
|
-
currentState:
|
|
61
|
-
targetState:
|
|
60
|
+
currentState: options.currentState ?? { position: 0, latch: true, speed: ThreeLevelAuto.Auto },
|
|
61
|
+
targetState: options.targetState ?? { position: 0, latch: true, speed: ThreeLevelAuto.Auto },
|
|
62
62
|
resolution: options.resolution ?? 1,
|
|
63
63
|
stepValue: options.stepValue ?? 1,
|
|
64
|
+
latchControlModes: options.latchControlModes ?? { remoteLatching: true, remoteUnlatching: true },
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.10.1-dev-
|
|
3
|
+
"version": "3.10.1-dev-20260720-a3c94f3",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@matter/main": "0.17.6",
|
|
135
|
-
"@matterbridge/dgram": "3.10.1-dev-
|
|
136
|
-
"@matterbridge/thread": "3.10.1-dev-
|
|
137
|
-
"@matterbridge/types": "3.10.1-dev-
|
|
138
|
-
"@matterbridge/utils": "3.10.1-dev-
|
|
135
|
+
"@matterbridge/dgram": "3.10.1-dev-20260720-a3c94f3",
|
|
136
|
+
"@matterbridge/thread": "3.10.1-dev-20260720-a3c94f3",
|
|
137
|
+
"@matterbridge/types": "3.10.1-dev-20260720-a3c94f3",
|
|
138
|
+
"@matterbridge/utils": "3.10.1-dev-20260720-a3c94f3",
|
|
139
139
|
"escape-html": "1.0.3",
|
|
140
140
|
"express": "5.2.1",
|
|
141
141
|
"express-rate-limit": "8.6.0",
|