@matterbridge/core 3.10.1-dev-20260719-5fc5a0c → 3.10.1-dev-20260723-402f56c
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/dist/matterbridge.js
CHANGED
|
@@ -463,7 +463,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
463
463
|
const lastStartupAt = await this.nodeContext.get('lastStartupAt', 0);
|
|
464
464
|
const lastShutdownAt = await this.nodeContext.get('lastShutdownAt', 0);
|
|
465
465
|
if (lastStartupAt && lastShutdownAt && lastShutdownAt < lastStartupAt) {
|
|
466
|
-
this.log.warn(`Matterbridge was not shut down properly. Last started at ${CYAN}${new Date(lastStartupAt).toLocaleString()}${
|
|
466
|
+
this.log.warn(`Matterbridge was not shut down properly. Last started at ${CYAN}${new Date(lastStartupAt).toLocaleString()}${wr}, last shut down at ${CYAN}${new Date(lastShutdownAt).toLocaleString()}${wr}`);
|
|
467
467
|
}
|
|
468
468
|
this.startupAt = Date.now();
|
|
469
469
|
this.runningTimes = (await this.nodeContext.get('runningTimes', 0)) + 1;
|
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-20260723-402f56c",
|
|
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-20260723-402f56c",
|
|
136
|
+
"@matterbridge/thread": "3.10.1-dev-20260723-402f56c",
|
|
137
|
+
"@matterbridge/types": "3.10.1-dev-20260723-402f56c",
|
|
138
|
+
"@matterbridge/utils": "3.10.1-dev-20260723-402f56c",
|
|
139
139
|
"escape-html": "1.0.3",
|
|
140
140
|
"express": "5.2.1",
|
|
141
141
|
"express-rate-limit": "8.6.0",
|