@matterbridge/core 3.10.7-dev-20260828-fc43d09 → 3.10.7
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/behaviors/activatedCarbonFilterMonitoringServer.d.ts +2 -2
- package/dist/behaviors/activatedCarbonFilterMonitoringServer.js +4 -3
- package/dist/behaviors/hepaFilterMonitoringServer.d.ts +2 -2
- package/dist/behaviors/hepaFilterMonitoringServer.js +4 -3
- package/dist/behaviors/operationalStateServer.js +16 -16
- package/dist/chipTests.js +427 -62
- package/dist/demoDevices.js +91 -1
- package/dist/devices/batteryStorage.d.ts +18 -0
- package/dist/devices/batteryStorage.js +14 -9
- package/dist/devices/electricalUtilityMeter.d.ts +18 -4
- package/dist/devices/electricalUtilityMeter.js +77 -21
- package/dist/devices/evse.d.ts +36 -4
- package/dist/devices/evse.js +185 -30
- package/dist/devices/heatPump.d.ts +15 -0
- package/dist/devices/heatPump.js +11 -6
- package/dist/devices/solarPower.d.ts +14 -0
- package/dist/devices/solarPower.js +12 -7
- package/dist/devices/waterHeater.d.ts +29 -7
- package/dist/devices/waterHeater.js +30 -14
- package/dist/matterbridgeEndpoint.d.ts +2 -1
- package/dist/matterbridgeEndpoint.js +16 -2
- package/dist/matterbridgeEndpointCommandHandler.d.ts +30 -0
- package/package.json +5 -5
|
@@ -2,8 +2,8 @@ import { ActivatedCarbonFilterMonitoringServer } from '@matter/node/behaviors/ac
|
|
|
2
2
|
import type { ActivatedCarbonFilterMonitoring } from '@matter/types/clusters/activated-carbon-filter-monitoring';
|
|
3
3
|
declare const MatterbridgeActivatedCarbonFilterMonitoringServer_base: import("@matter/node").ClusterBehavior.Type<typeof ActivatedCarbonFilterMonitoringServer, import("@matter/types").ClusterType.WithSupportedFeatures<ActivatedCarbonFilterMonitoring, {
|
|
4
4
|
condition: true;
|
|
5
|
-
replacementProductList:
|
|
6
|
-
warning:
|
|
5
|
+
replacementProductList: true;
|
|
6
|
+
warning: true;
|
|
7
7
|
}>, import("@matter/types").ClusterType.Concrete, new () => {}, "activatedCarbonFilterMonitoring">;
|
|
8
8
|
export declare class MatterbridgeActivatedCarbonFilterMonitoringServer extends MatterbridgeActivatedCarbonFilterMonitoringServer_base {
|
|
9
9
|
resetCondition(): Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ActivatedCarbonFilterMonitoringServer } from '@matter/node/behaviors/activated-carbon-filter-monitoring';
|
|
2
2
|
import { ResourceMonitoring } from '@matter/types/clusters/resource-monitoring';
|
|
3
3
|
import { MatterbridgeServer } from './matterbridgeServer.js';
|
|
4
|
-
export class MatterbridgeActivatedCarbonFilterMonitoringServer extends ActivatedCarbonFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition) {
|
|
4
|
+
export class MatterbridgeActivatedCarbonFilterMonitoringServer extends ActivatedCarbonFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.Warning, ResourceMonitoring.Feature.ReplacementProductList) {
|
|
5
5
|
async resetCondition() {
|
|
6
6
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
7
|
-
device.log.info(`
|
|
7
|
+
device.log.info(`MatterbridgeActivatedCarbonFilterMonitoringServer: resetting condition (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
8
8
|
await device.commandHandler.executeHandler('ActivatedCarbonFilterMonitoring.resetCondition', {
|
|
9
9
|
command: 'resetCondition',
|
|
10
10
|
request: {},
|
|
@@ -14,7 +14,8 @@ export class MatterbridgeActivatedCarbonFilterMonitoringServer extends Activated
|
|
|
14
14
|
context: this.context,
|
|
15
15
|
});
|
|
16
16
|
this.state.condition = 100;
|
|
17
|
+
this.state.changeIndication = ResourceMonitoring.ChangeIndication.Ok;
|
|
17
18
|
this.state.lastChangedTime = Math.floor(new Date().getTime() / 1000);
|
|
18
|
-
device.log.debug(`MatterbridgeActivatedCarbonFilterMonitoringServer: resetCondition called`);
|
|
19
|
+
device.log.debug(`MatterbridgeActivatedCarbonFilterMonitoringServer: resetCondition called (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -2,8 +2,8 @@ import { HepaFilterMonitoringServer } from '@matter/node/behaviors/hepa-filter-m
|
|
|
2
2
|
import type { HepaFilterMonitoring } from '@matter/types/clusters/hepa-filter-monitoring';
|
|
3
3
|
declare const MatterbridgeHepaFilterMonitoringServer_base: import("@matter/node").ClusterBehavior.Type<typeof HepaFilterMonitoringServer, import("@matter/types").ClusterType.WithSupportedFeatures<HepaFilterMonitoring, {
|
|
4
4
|
condition: true;
|
|
5
|
-
replacementProductList:
|
|
6
|
-
warning:
|
|
5
|
+
replacementProductList: true;
|
|
6
|
+
warning: true;
|
|
7
7
|
}>, import("@matter/types").ClusterType.Concrete, new () => {}, "hepaFilterMonitoring">;
|
|
8
8
|
export declare class MatterbridgeHepaFilterMonitoringServer extends MatterbridgeHepaFilterMonitoringServer_base {
|
|
9
9
|
resetCondition(): Promise<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HepaFilterMonitoringServer } from '@matter/node/behaviors/hepa-filter-monitoring';
|
|
2
2
|
import { ResourceMonitoring } from '@matter/types/clusters/resource-monitoring';
|
|
3
3
|
import { MatterbridgeServer } from './matterbridgeServer.js';
|
|
4
|
-
export class MatterbridgeHepaFilterMonitoringServer extends HepaFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition) {
|
|
4
|
+
export class MatterbridgeHepaFilterMonitoringServer extends HepaFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.Warning, ResourceMonitoring.Feature.ReplacementProductList) {
|
|
5
5
|
async resetCondition() {
|
|
6
6
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
7
|
-
device.log.info(`
|
|
7
|
+
device.log.info(`MatterbridgeHepaFilterMonitoringServer: resetting condition (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
8
8
|
await device.commandHandler.executeHandler('HepaFilterMonitoring.resetCondition', {
|
|
9
9
|
command: 'resetCondition',
|
|
10
10
|
request: {},
|
|
@@ -14,7 +14,8 @@ export class MatterbridgeHepaFilterMonitoringServer extends HepaFilterMonitoring
|
|
|
14
14
|
context: this.context,
|
|
15
15
|
});
|
|
16
16
|
this.state.condition = 100;
|
|
17
|
+
this.state.changeIndication = ResourceMonitoring.ChangeIndication.Ok;
|
|
17
18
|
this.state.lastChangedTime = Math.floor(new Date().getTime() / 1000);
|
|
18
|
-
device.log.debug(`MatterbridgeHepaFilterMonitoringServer: resetCondition called`);
|
|
19
|
+
device.log.debug(`MatterbridgeHepaFilterMonitoringServer: resetCondition called (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
@@ -5,14 +5,14 @@ const MatterbridgeOperationalStateServerBase = OperationalStateServer.enable({ e
|
|
|
5
5
|
export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalStateServerBase {
|
|
6
6
|
initialize() {
|
|
7
7
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
8
|
-
device.log.debug(
|
|
8
|
+
device.log.debug(`MatterbridgeOperationalStateServer: initialized, setting operational state to Stopped (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
9
9
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
|
10
10
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateDetails: 'Fully operational' };
|
|
11
11
|
super.initialize();
|
|
12
12
|
}
|
|
13
13
|
async pause() {
|
|
14
14
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
15
|
-
device.log.info(`
|
|
15
|
+
device.log.info(`MatterbridgeOperationalStateServer: pause (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
16
16
|
await device.commandHandler.executeHandler('OperationalState.pause', {
|
|
17
17
|
command: 'pause',
|
|
18
18
|
request: {},
|
|
@@ -22,18 +22,18 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
22
22
|
context: this.context,
|
|
23
23
|
});
|
|
24
24
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Paused) {
|
|
25
|
-
device.log.debug(
|
|
25
|
+
device.log.debug(`MatterbridgeOperationalStateServer: pause received while already Paused, taking no further action (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
26
26
|
return {
|
|
27
27
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateDetails: 'Already paused' },
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
if (this.state.operationalState !== OperationalState.OperationalStateEnum.Running) {
|
|
31
|
-
device.log.debug(`MatterbridgeOperationalStateServer: pause received in state ${this.state.operationalState} which is not Pause-compatible`);
|
|
31
|
+
device.log.debug(`MatterbridgeOperationalStateServer: pause received in state ${this.state.operationalState} which is not Pause-compatible (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
32
32
|
return {
|
|
33
33
|
commandResponseState: { errorStateId: OperationalState.ErrorState.CommandInvalidInState, errorStateDetails: 'Not Pause-compatible in the current operational state' },
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
device.log.debug(
|
|
36
|
+
device.log.debug(`MatterbridgeOperationalStateServer: pause called setting operational state to Paused (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
37
37
|
this.internal.operationalStateBeforePause = this.state.operationalState;
|
|
38
38
|
this.internal.pausedSinceMs = Date.now();
|
|
39
39
|
this.state.operationalState = OperationalState.OperationalStateEnum.Paused;
|
|
@@ -44,7 +44,7 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
44
44
|
}
|
|
45
45
|
async stop() {
|
|
46
46
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
47
|
-
device.log.info(`
|
|
47
|
+
device.log.info(`MatterbridgeOperationalStateServer: stop (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
48
48
|
await device.commandHandler.executeHandler('OperationalState.stop', {
|
|
49
49
|
command: 'stop',
|
|
50
50
|
request: {},
|
|
@@ -54,12 +54,12 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
54
54
|
context: this.context,
|
|
55
55
|
});
|
|
56
56
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Stopped) {
|
|
57
|
-
device.log.debug(
|
|
57
|
+
device.log.debug(`MatterbridgeOperationalStateServer: stop received while already Stopped, taking no further action (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
58
58
|
return {
|
|
59
59
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateDetails: 'Already stopped' },
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
device.log.debug(
|
|
62
|
+
device.log.debug(`MatterbridgeOperationalStateServer: stop called setting operational state to Stopped (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
63
63
|
if (this.internal.pausedSinceMs !== undefined) {
|
|
64
64
|
this.internal.pausedAccumulatedMs += Date.now() - this.internal.pausedSinceMs;
|
|
65
65
|
this.internal.pausedSinceMs = undefined;
|
|
@@ -77,7 +77,7 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
77
77
|
}
|
|
78
78
|
async start() {
|
|
79
79
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
80
|
-
device.log.info(`
|
|
80
|
+
device.log.info(`MatterbridgeOperationalStateServer: start (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
81
81
|
await device.commandHandler.executeHandler('OperationalState.start', {
|
|
82
82
|
command: 'start',
|
|
83
83
|
request: {},
|
|
@@ -87,18 +87,18 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
87
87
|
context: this.context,
|
|
88
88
|
});
|
|
89
89
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Running) {
|
|
90
|
-
device.log.debug(
|
|
90
|
+
device.log.debug(`MatterbridgeOperationalStateServer: start received while already Running, taking no further action (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
91
91
|
return {
|
|
92
92
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateDetails: 'Already running' },
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Error) {
|
|
96
|
-
device.log.debug(
|
|
96
|
+
device.log.debug(`MatterbridgeOperationalStateServer: start received while in the Error state, unable to honor (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
97
97
|
return {
|
|
98
98
|
commandResponseState: { errorStateId: OperationalState.ErrorState.UnableToStartOrResume, errorStateDetails: 'Unable to start while in the Error state' },
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
device.log.debug(
|
|
101
|
+
device.log.debug(`MatterbridgeOperationalStateServer: start called setting operational state to Running (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
102
102
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Paused && this.internal.pausedSinceMs !== undefined) {
|
|
103
103
|
this.internal.pausedAccumulatedMs += Date.now() - this.internal.pausedSinceMs;
|
|
104
104
|
this.internal.pausedSinceMs = undefined;
|
|
@@ -115,7 +115,7 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
115
115
|
}
|
|
116
116
|
async resume() {
|
|
117
117
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
118
|
-
device.log.info(`
|
|
118
|
+
device.log.info(`MatterbridgeOperationalStateServer: resume (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
119
119
|
await device.commandHandler.executeHandler('OperationalState.resume', {
|
|
120
120
|
command: 'resume',
|
|
121
121
|
request: {},
|
|
@@ -125,18 +125,18 @@ export class MatterbridgeOperationalStateServer extends MatterbridgeOperationalS
|
|
|
125
125
|
context: this.context,
|
|
126
126
|
});
|
|
127
127
|
if (this.state.operationalState === OperationalState.OperationalStateEnum.Running) {
|
|
128
|
-
device.log.debug(
|
|
128
|
+
device.log.debug(`MatterbridgeOperationalStateServer: resume received while already Running, taking no further action (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
129
129
|
return {
|
|
130
130
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateDetails: 'Already running' },
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
if (this.state.operationalState !== OperationalState.OperationalStateEnum.Paused) {
|
|
134
|
-
device.log.debug(`MatterbridgeOperationalStateServer: resume received in state ${this.state.operationalState} which is not Resume-compatible`);
|
|
134
|
+
device.log.debug(`MatterbridgeOperationalStateServer: resume received in state ${this.state.operationalState} which is not Resume-compatible (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
135
135
|
return {
|
|
136
136
|
commandResponseState: { errorStateId: OperationalState.ErrorState.CommandInvalidInState, errorStateDetails: 'Not Resume-compatible in the current operational state' },
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
device.log.debug(
|
|
139
|
+
device.log.debug(`MatterbridgeOperationalStateServer: resume called setting operational state to Running (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
140
140
|
if (this.internal.pausedSinceMs !== undefined) {
|
|
141
141
|
this.internal.pausedAccumulatedMs += Date.now() - this.internal.pausedSinceMs;
|
|
142
142
|
this.internal.pausedSinceMs = undefined;
|