@matterbridge/core 3.10.12-dev-20261002-6a30fb3 → 3.10.12-dev-20261002-857fd9b
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.
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { ServiceAreaServer } from '@matter/node/behaviors/service-area';
|
|
2
2
|
import { ServiceArea } from '@matter/types/clusters/service-area';
|
|
3
3
|
import type { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
4
|
-
|
|
4
|
+
declare const MatterbridgeServiceAreaServer_base: import("@matter/node").ClusterBehavior.Type<typeof ServiceAreaServer, import("@matter/types").ClusterType.WithSupportedFeatures<import("@matter/types").ClusterType.WithSupportedFeatures<import("@matter/types").ClusterType.WithSupportedFeatures<ServiceArea, {
|
|
5
|
+
maps: true;
|
|
6
|
+
progressReporting: true;
|
|
7
|
+
selectWhileRunning: false;
|
|
8
|
+
}>, {
|
|
9
|
+
maps: false;
|
|
10
|
+
progressReporting: false;
|
|
11
|
+
selectWhileRunning: false;
|
|
12
|
+
}>, {
|
|
13
|
+
maps: false;
|
|
14
|
+
progressReporting: true;
|
|
15
|
+
selectWhileRunning: false;
|
|
16
|
+
}>, import("@matter/types").ClusterType.Concrete, new () => {}, "serviceArea">;
|
|
17
|
+
export declare class MatterbridgeServiceAreaServer extends MatterbridgeServiceAreaServer_base {
|
|
5
18
|
readonly endpoint: MatterbridgeEndpoint;
|
|
6
19
|
selectAreas(request: ServiceArea.SelectAreasRequest): Promise<ServiceArea.SelectAreasResponse>;
|
|
20
|
+
skipArea(request: ServiceArea.SkipAreaRequest): Promise<ServiceArea.SkipAreaResponse>;
|
|
7
21
|
}
|
|
22
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServiceAreaServer } from '@matter/node/behaviors/service-area';
|
|
2
2
|
import { ServiceArea } from '@matter/types/clusters/service-area';
|
|
3
3
|
import { MatterbridgeServer } from './matterbridgeServer.js';
|
|
4
|
-
export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
4
|
+
export class MatterbridgeServiceAreaServer extends ServiceAreaServer.with(ServiceArea.Feature.ProgressReporting) {
|
|
5
5
|
async selectAreas(request) {
|
|
6
6
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
7
7
|
device.log.info(`MatterbridgeServiceAreaServer: selecting areas [${request.newAreas.join(', ')}] (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
@@ -19,4 +19,24 @@ export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
|
19
19
|
this.endpoint.emitCommand(ServiceArea, 'selectAreas', request, this.context);
|
|
20
20
|
return response;
|
|
21
21
|
}
|
|
22
|
+
async skipArea(request) {
|
|
23
|
+
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
24
|
+
device.log.info(`MatterbridgeServiceAreaServer: skipping area ${request.skippedArea} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
25
|
+
await device.commandHandler.executeHandler('ServiceArea.skipArea', {
|
|
26
|
+
command: 'skipArea',
|
|
27
|
+
request,
|
|
28
|
+
cluster: ServiceAreaServer.id,
|
|
29
|
+
attributes: this.state,
|
|
30
|
+
endpoint: this.endpoint,
|
|
31
|
+
context: this.context,
|
|
32
|
+
});
|
|
33
|
+
device.log.debug(`MatterbridgeServiceAreaServer: skipArea called with ${request.skippedArea} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
34
|
+
const response = this.assertSkipServiceArea(request);
|
|
35
|
+
if (response.status === ServiceArea.SkipAreaStatus.Success && this.state.progress !== undefined) {
|
|
36
|
+
this.state.progress = this.state.progress.map((area) => area.areaId === request.skippedArea
|
|
37
|
+
? { areaId: area.areaId, status: ServiceArea.OperationalStatus.Skipped, totalOperationalTime: area.totalOperationalTime, estimatedTime: area.estimatedTime }
|
|
38
|
+
: area);
|
|
39
|
+
}
|
|
40
|
+
return response;
|
|
41
|
+
}
|
|
22
42
|
}
|
|
@@ -28,13 +28,14 @@ export interface RoboticVacuumCleanerOptions {
|
|
|
28
28
|
selectedAreas?: number[];
|
|
29
29
|
currentArea?: number | null;
|
|
30
30
|
supportedMaps?: ServiceArea.Map[];
|
|
31
|
+
progress?: ServiceArea.Progress[];
|
|
31
32
|
}
|
|
32
33
|
export declare class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
33
34
|
constructor(name: string, serial: string, options?: RoboticVacuumCleanerOptions);
|
|
34
35
|
constructor(name: string, serial: string, mode?: 'server' | 'matter', currentRunMode?: number, supportedRunModes?: RvcRunMode.ModeOption[], currentCleanMode?: number, supportedCleanModes?: RvcCleanMode.ModeOption[], currentPhase?: number | null, phaseList?: string[] | null, operationalState?: RvcOperationalState.OperationalState, operationalStateList?: RvcOperationalState.OperationalStateStruct[], supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number | null, supportedMaps?: ServiceArea.Map[]);
|
|
35
36
|
createDefaultRvcRunModeClusterServer(currentMode?: number, supportedModes?: RvcRunMode.ModeOption[]): this;
|
|
36
37
|
createDefaultRvcCleanModeClusterServer(currentMode?: number, supportedModes?: RvcCleanMode.ModeOption[]): this;
|
|
37
|
-
createDefaultServiceAreaClusterServer(supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number | null, supportedMaps?: ServiceArea.Map[]): this;
|
|
38
|
+
createDefaultServiceAreaClusterServer(supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number | null, supportedMaps?: ServiceArea.Map[], progress?: ServiceArea.Progress[]): this;
|
|
38
39
|
createDefaultRvcOperationalStateClusterServer(phaseList?: string[] | null, currentPhase?: number | null, operationalStateList?: RvcOperationalState.OperationalStateStruct[], operationalState?: RvcOperationalState.OperationalState, operationalError?: RvcOperationalState.ErrorStateStruct): this;
|
|
39
40
|
}
|
|
40
41
|
export declare class MatterbridgeRvcRunModeServer extends RvcRunModeServer {
|
|
@@ -48,7 +48,7 @@ export class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
|
48
48
|
.createDefaultRvcRunModeClusterServer(options.currentRunMode, options.supportedRunModes)
|
|
49
49
|
.createDefaultRvcCleanModeClusterServer(options.currentCleanMode, options.supportedCleanModes)
|
|
50
50
|
.createDefaultRvcOperationalStateClusterServer(options.phaseList, options.currentPhase, options.operationalStateList, options.operationalState)
|
|
51
|
-
.createDefaultServiceAreaClusterServer(options.supportedAreas, options.selectedAreas, options.currentArea, options.supportedMaps);
|
|
51
|
+
.createDefaultServiceAreaClusterServer(options.supportedAreas, options.selectedAreas, options.currentArea, options.supportedMaps, options.progress);
|
|
52
52
|
}
|
|
53
53
|
createDefaultRvcRunModeClusterServer(currentMode, supportedModes) {
|
|
54
54
|
this.behaviors.require(MatterbridgeRvcRunModeServer, {
|
|
@@ -73,8 +73,8 @@ export class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
|
73
73
|
});
|
|
74
74
|
return this;
|
|
75
75
|
}
|
|
76
|
-
createDefaultServiceAreaClusterServer(supportedAreas, selectedAreas, currentArea, supportedMaps) {
|
|
77
|
-
this.behaviors.require(MatterbridgeServiceAreaServer.with(ServiceArea.Feature.Maps), {
|
|
76
|
+
createDefaultServiceAreaClusterServer(supportedAreas, selectedAreas, currentArea, supportedMaps, progress) {
|
|
77
|
+
this.behaviors.require(MatterbridgeServiceAreaServer.with(ServiceArea.Feature.Maps, ...(progress !== undefined ? [ServiceArea.Feature.ProgressReporting] : [])), {
|
|
78
78
|
supportedAreas: supportedAreas ?? [
|
|
79
79
|
{
|
|
80
80
|
areaId: 1,
|
|
@@ -101,6 +101,7 @@ export class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
|
101
101
|
currentArea: currentArea !== undefined ? currentArea : 1,
|
|
102
102
|
supportedMaps: supportedMaps ?? [],
|
|
103
103
|
estimatedEndTime: null,
|
|
104
|
+
progress,
|
|
104
105
|
});
|
|
105
106
|
return this;
|
|
106
107
|
}
|
|
@@ -854,6 +854,7 @@ export type CommandHandlerDataMap = {
|
|
|
854
854
|
endpoint: MatterbridgeEndpoint;
|
|
855
855
|
};
|
|
856
856
|
'selectAreas': CommandHandlerData<'ServiceArea.selectAreas'>;
|
|
857
|
+
'skipArea': CommandHandlerData<'ServiceArea.skipArea'>;
|
|
857
858
|
'ServiceArea.selectAreas': {
|
|
858
859
|
command: 'selectAreas';
|
|
859
860
|
request: ServiceArea.SelectAreasRequest;
|
|
@@ -861,6 +862,13 @@ export type CommandHandlerDataMap = {
|
|
|
861
862
|
attributes: ClusterAttributeValues<(typeof ServiceArea)['attributes']>;
|
|
862
863
|
endpoint: MatterbridgeEndpoint;
|
|
863
864
|
};
|
|
865
|
+
'ServiceArea.skipArea': {
|
|
866
|
+
command: 'skipArea';
|
|
867
|
+
request: ServiceArea.SkipAreaRequest;
|
|
868
|
+
cluster: 'serviceArea';
|
|
869
|
+
attributes: ClusterAttributeValues<(typeof ServiceArea)['attributes']>;
|
|
870
|
+
endpoint: MatterbridgeEndpoint;
|
|
871
|
+
};
|
|
864
872
|
'boost': CommandHandlerData<'WaterHeaterManagement.boost'>;
|
|
865
873
|
'cancelBoost': CommandHandlerData<'WaterHeaterManagement.cancelBoost'>;
|
|
866
874
|
'WaterHeaterManagement.boost': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.10.12-dev-20261002-
|
|
3
|
+
"version": "3.10.12-dev-20261002-857fd9b",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -136,10 +136,10 @@
|
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
138
|
"@matter/main": "0.17.9",
|
|
139
|
-
"@matterbridge/dgram": "3.10.12-dev-20261002-
|
|
140
|
-
"@matterbridge/thread": "3.10.12-dev-20261002-
|
|
141
|
-
"@matterbridge/types": "3.10.12-dev-20261002-
|
|
142
|
-
"@matterbridge/utils": "3.10.12-dev-20261002-
|
|
139
|
+
"@matterbridge/dgram": "3.10.12-dev-20261002-857fd9b",
|
|
140
|
+
"@matterbridge/thread": "3.10.12-dev-20261002-857fd9b",
|
|
141
|
+
"@matterbridge/types": "3.10.12-dev-20261002-857fd9b",
|
|
142
|
+
"@matterbridge/utils": "3.10.12-dev-20261002-857fd9b",
|
|
143
143
|
"escape-html": "1.0.3",
|
|
144
144
|
"express": "5.2.1",
|
|
145
145
|
"express-rate-limit": "8.7.0",
|