matterbridge 3.0.6-dev-20250611-48af719 → 3.0.6-dev-20250612-6b6e953
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/CHANGELOG.md +10 -0
- package/README.md +2 -0
- package/dist/evse.js +3 -4
- package/dist/laundryWasher.js +3 -4
- package/dist/matterbridgeBehaviors.js +49 -40
- package/dist/matterbridgeEndpoint.js +23 -14
- package/dist/roboticVacuumCleaner.js +5 -5
- package/dist/waterHeater.js +3 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,10 +13,20 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
15
|
- [tests] Update Jest test coverage on addBridgedEndpoint and removeBridgedEndpoint.
|
|
16
|
+
- [fan]: Added createMultiSpeedFanControlClusterServer claster helper with MultiSpeed feature.
|
|
17
|
+
- [fan]: Added all parameters to the fan cluster helpers.
|
|
18
|
+
- [valve]: Added logic in MatterbridgeValveConfigurationAndControlServer.
|
|
19
|
+
- [command]: Added cluster property to commandHandler data object.
|
|
16
20
|
|
|
17
21
|
### Changed
|
|
18
22
|
|
|
19
23
|
- [package]: Updated dependencies.
|
|
24
|
+
- [fan]: The default fan has no more the MultiSpeed feature.
|
|
25
|
+
- [behaviors]: Bump Matterbridge Behaviors to 1.3.0
|
|
26
|
+
- [evse]: Updated class and behavior to 1.1.0.
|
|
27
|
+
- [waterHeater]: Updated class and behavior to 1.1.0.
|
|
28
|
+
- [rvc]: Updated class and behavior to 1.1.0.
|
|
29
|
+
- [laundryWasher]: Updated class and behavior to 1.1.0.
|
|
20
30
|
|
|
21
31
|
### Fixed
|
|
22
32
|
|
package/README.md
CHANGED
|
@@ -324,6 +324,8 @@ It exposes 38 devices:
|
|
|
324
324
|
- a microwave Oven device (supported by SmartThings, Alexa and Home Assistant)
|
|
325
325
|
- an extractor Hood device (supported by SmartThings, Alexa and Home Assistant)
|
|
326
326
|
- a cooktop device (supported by SmartThings, Alexa and Home Assistant)
|
|
327
|
+
- a water heater device (supported by SmartThings and Home Assistant)
|
|
328
|
+
- a car charger device (supported by Home Assistant)
|
|
327
329
|
|
|
328
330
|
All these virtual devices continuously change state and position. The plugin also shows how to use all the command handlers (you can control all the devices).
|
|
329
331
|
|
package/dist/evse.js
CHANGED
|
@@ -51,7 +51,7 @@ export class MatterbridgeEnergyEvseServer extends EnergyEvseServer {
|
|
|
51
51
|
disable() {
|
|
52
52
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
53
53
|
device.log.info(`Disable charging (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
54
|
-
device.commandHandler.executeHandler('disable', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
54
|
+
device.commandHandler.executeHandler('disable', { request: {}, cluster: EnergyEvseServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
55
55
|
device.log.debug(`MatterbridgeEnergyEvseServer disable called`);
|
|
56
56
|
this.state.supplyState = EnergyEvse.SupplyState.Disabled;
|
|
57
57
|
if (this.state.state === EnergyEvse.State.PluggedInCharging) {
|
|
@@ -62,7 +62,7 @@ export class MatterbridgeEnergyEvseServer extends EnergyEvseServer {
|
|
|
62
62
|
enableCharging(request) {
|
|
63
63
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
64
64
|
device.log.info(`EnableCharging (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
65
|
-
device.commandHandler.executeHandler('enableCharging', { request, attributes: this.state, endpoint: this.endpoint });
|
|
65
|
+
device.commandHandler.executeHandler('enableCharging', { request, cluster: EnergyEvseServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
66
66
|
device.log.debug(`MatterbridgeEnergyEvseServer enableCharging called`);
|
|
67
67
|
this.state.supplyState = EnergyEvse.SupplyState.ChargingEnabled;
|
|
68
68
|
if (this.state.state === EnergyEvse.State.PluggedInDemand) {
|
|
@@ -77,13 +77,12 @@ export class MatterbridgeEnergyEvseModeServer extends EnergyEvseModeServer {
|
|
|
77
77
|
changeToMode(request) {
|
|
78
78
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
79
79
|
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
80
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
80
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: EnergyEvseModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
81
81
|
const supported = this.state.supportedModes.find((mode) => mode.mode === request.newMode);
|
|
82
82
|
if (!supported) {
|
|
83
83
|
device.log.error(`MatterbridgeEnergyEvseModeServer changeToMode called with unsupported newMode: ${request.newMode}`);
|
|
84
84
|
return { status: ModeBase.ModeChangeStatus.UnsupportedMode, statusText: 'Unsupported mode' };
|
|
85
85
|
}
|
|
86
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
87
86
|
this.state.currentMode = request.newMode;
|
|
88
87
|
device.log.debug(`MatterbridgeEnergyEvseModeServer changeToMode called with newMode ${request.newMode} => ${supported.label}`);
|
|
89
88
|
return { status: ModeBase.ModeChangeStatus.Success, statusText: 'Success' };
|
package/dist/laundryWasher.js
CHANGED
|
@@ -71,7 +71,7 @@ export class MatterbridgeLevelTemperatureControlServer extends TemperatureContro
|
|
|
71
71
|
setTemperature(request) {
|
|
72
72
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
73
73
|
device.log.info(`SetTemperature (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
74
|
-
device.commandHandler.executeHandler('setTemperature', { request, attributes: this.state, endpoint: this.endpoint });
|
|
74
|
+
device.commandHandler.executeHandler('setTemperature', { request, cluster: TemperatureControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
75
75
|
if (request.targetTemperatureLevel !== undefined && request.targetTemperatureLevel >= 0 && request.targetTemperatureLevel < this.state.supportedTemperatureLevels.length) {
|
|
76
76
|
device.log.debug(`MatterbridgeLevelTemperatureControlServer: setTemperature called setting selectedTemperatureLevel to ${request.targetTemperatureLevel}: ${this.state.supportedTemperatureLevels[request.targetTemperatureLevel]}`);
|
|
77
77
|
this.state.selectedTemperatureLevel = request.targetTemperatureLevel;
|
|
@@ -89,7 +89,7 @@ export class MatterbridgeNumberTemperatureControlServer extends TemperatureContr
|
|
|
89
89
|
setTemperature(request) {
|
|
90
90
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
91
91
|
device.log.info(`SetTemperature (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
92
|
-
device.commandHandler.executeHandler('setTemperature', { request, attributes: this.state, endpoint: this.endpoint });
|
|
92
|
+
device.commandHandler.executeHandler('setTemperature', { request, cluster: TemperatureControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
93
93
|
if (request.targetTemperature !== undefined && request.targetTemperature >= this.state.minTemperature && request.targetTemperature <= this.state.maxTemperature) {
|
|
94
94
|
device.log.debug(`MatterbridgeNumberTemperatureControlServer: setTemperature called setting temperatureSetpoint to ${request.targetTemperature}`);
|
|
95
95
|
this.state.temperatureSetpoint = request.targetTemperature;
|
|
@@ -116,10 +116,9 @@ export class MatterbridgeLaundryWasherModeServer extends LaundryWasherModeServer
|
|
|
116
116
|
changeToMode(request) {
|
|
117
117
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
118
118
|
device.log.info(`ChangeToMode (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
119
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
119
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: LaundryWasherModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
120
120
|
const supportedMode = this.state.supportedModes.find((supportedMode) => supportedMode.mode === request.newMode);
|
|
121
121
|
if (supportedMode) {
|
|
122
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
123
122
|
device.log.debug(`MatterbridgeLaundryWasherModeServer: changeToMode called with mode ${supportedMode.mode} => ${supportedMode.label}`);
|
|
124
123
|
this.state.currentMode = request.newMode;
|
|
125
124
|
return { status: ModeBase.ModeChangeStatus.Success, statusText: 'Success' };
|
|
@@ -43,14 +43,14 @@ export class MatterbridgeIdentifyServer extends IdentifyServer {
|
|
|
43
43
|
identify(request) {
|
|
44
44
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
45
45
|
device.log.info(`Identifying device for ${request.identifyTime} seconds (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
46
|
-
device.commandHandler.executeHandler('identify', { request, attributes: this.state, endpoint: this.endpoint });
|
|
46
|
+
device.commandHandler.executeHandler('identify', { request, cluster: IdentifyServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
47
47
|
device.log.debug(`MatterbridgeIdentifyServer: identify called`);
|
|
48
48
|
super.identify(request);
|
|
49
49
|
}
|
|
50
50
|
triggerEffect(request) {
|
|
51
51
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
52
52
|
device.log.info(`Triggering effect ${request.effectIdentifier} variant ${request.effectVariant} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
53
|
-
device.commandHandler.executeHandler('triggerEffect', { request, attributes: this.state, endpoint: this.endpoint });
|
|
53
|
+
device.commandHandler.executeHandler('triggerEffect', { request, cluster: IdentifyServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
54
54
|
device.log.debug(`MatterbridgeIdentifyServer: triggerEffect called`);
|
|
55
55
|
super.triggerEffect(request);
|
|
56
56
|
}
|
|
@@ -59,21 +59,21 @@ export class MatterbridgeOnOffServer extends OnOffServer {
|
|
|
59
59
|
on() {
|
|
60
60
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
61
61
|
device.log.info(`Switching device on (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
62
|
-
device.commandHandler.executeHandler('on', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
62
|
+
device.commandHandler.executeHandler('on', { request: {}, cluster: OnOffServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
63
63
|
device.log.debug(`MatterbridgeOnOffServer: on called`);
|
|
64
64
|
super.on();
|
|
65
65
|
}
|
|
66
66
|
off() {
|
|
67
67
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
68
68
|
device.log.info(`Switching device off (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
69
|
-
device.commandHandler.executeHandler('off', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
69
|
+
device.commandHandler.executeHandler('off', { request: {}, cluster: OnOffServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
70
70
|
device.log.debug(`MatterbridgeOnOffServer: off called`);
|
|
71
71
|
super.off();
|
|
72
72
|
}
|
|
73
73
|
toggle() {
|
|
74
74
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
75
75
|
device.log.info(`Toggle device on/off (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
76
|
-
device.commandHandler.executeHandler('toggle', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
76
|
+
device.commandHandler.executeHandler('toggle', { request: {}, cluster: OnOffServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
77
77
|
device.log.debug(`MatterbridgeOnOffServer: toggle called`);
|
|
78
78
|
super.toggle();
|
|
79
79
|
}
|
|
@@ -82,14 +82,14 @@ export class MatterbridgeLevelControlServer extends LevelControlServer {
|
|
|
82
82
|
moveToLevel(request) {
|
|
83
83
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
84
84
|
device.log.info(`Setting level to ${request.level} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
85
|
-
device.commandHandler.executeHandler('moveToLevel', { request, attributes: this.state, endpoint: this.endpoint });
|
|
85
|
+
device.commandHandler.executeHandler('moveToLevel', { request, cluster: LevelControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
86
86
|
device.log.debug(`MatterbridgeLevelControlServer: moveToLevel called`);
|
|
87
87
|
super.moveToLevel(request);
|
|
88
88
|
}
|
|
89
89
|
moveToLevelWithOnOff(request) {
|
|
90
90
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
91
91
|
device.log.info(`Setting level to ${request.level} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
92
|
-
device.commandHandler.executeHandler('moveToLevelWithOnOff', { request, attributes: this.state, endpoint: this.endpoint });
|
|
92
|
+
device.commandHandler.executeHandler('moveToLevelWithOnOff', { request, cluster: LevelControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
93
93
|
device.log.debug(`MatterbridgeLevelControlServer: moveToLevelWithOnOff called`);
|
|
94
94
|
super.moveToLevelWithOnOff(request);
|
|
95
95
|
}
|
|
@@ -98,35 +98,35 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
|
|
|
98
98
|
moveToHue(request) {
|
|
99
99
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
100
100
|
device.log.info(`Setting hue to ${request.hue} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
101
|
-
device.commandHandler.executeHandler('moveToHue', { request, attributes: this.state, endpoint: this.endpoint });
|
|
101
|
+
device.commandHandler.executeHandler('moveToHue', { request, cluster: ColorControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
102
102
|
device.log.debug(`MatterbridgeColorControlServer: moveToHue called`);
|
|
103
103
|
super.moveToHue(request);
|
|
104
104
|
}
|
|
105
105
|
moveToSaturation(request) {
|
|
106
106
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
107
107
|
device.log.info(`Setting saturation to ${request.saturation} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
108
|
-
device.commandHandler.executeHandler('moveToSaturation', { request, attributes: this.state, endpoint: this.endpoint });
|
|
108
|
+
device.commandHandler.executeHandler('moveToSaturation', { request, cluster: ColorControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
109
109
|
device.log.debug(`MatterbridgeColorControlServer: moveToSaturation called`);
|
|
110
110
|
super.moveToSaturation(request);
|
|
111
111
|
}
|
|
112
112
|
moveToHueAndSaturation(request) {
|
|
113
113
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
114
114
|
device.log.info(`Setting hue to ${request.hue} and saturation to ${request.saturation} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
115
|
-
device.commandHandler.executeHandler('moveToHueAndSaturation', { request, attributes: this.state, endpoint: this.endpoint });
|
|
115
|
+
device.commandHandler.executeHandler('moveToHueAndSaturation', { request, cluster: ColorControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
116
116
|
device.log.debug(`MatterbridgeColorControlServer: moveToHueAndSaturation called`);
|
|
117
117
|
super.moveToHueAndSaturation(request);
|
|
118
118
|
}
|
|
119
119
|
moveToColor(request) {
|
|
120
120
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
121
121
|
device.log.info(`Setting color to ${request.colorX}, ${request.colorY} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
122
|
-
device.commandHandler.executeHandler('moveToColor', { request, attributes: this.state, endpoint: this.endpoint });
|
|
122
|
+
device.commandHandler.executeHandler('moveToColor', { request, cluster: ColorControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
123
123
|
device.log.debug(`MatterbridgeColorControlServer: moveToColor called`);
|
|
124
124
|
super.moveToColor(request);
|
|
125
125
|
}
|
|
126
126
|
moveToColorTemperature(request) {
|
|
127
127
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
128
128
|
device.log.info(`Setting color temperature to ${request.colorTemperatureMireds} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
129
|
-
device.commandHandler.executeHandler('moveToColorTemperature', { request, attributes: this.state, endpoint: this.endpoint });
|
|
129
|
+
device.commandHandler.executeHandler('moveToColorTemperature', { request, cluster: ColorControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
130
130
|
device.log.debug(`MatterbridgeColorControlServer: moveToColorTemperature called`);
|
|
131
131
|
super.moveToColorTemperature(request);
|
|
132
132
|
}
|
|
@@ -135,28 +135,28 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
|
|
|
135
135
|
upOrOpen() {
|
|
136
136
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
137
137
|
device.log.info(`Opening cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
138
|
-
device.commandHandler.executeHandler(`upOrOpen`, { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
138
|
+
device.commandHandler.executeHandler(`upOrOpen`, { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
139
139
|
device.log.debug(`MatterbridgeWindowCoveringServer: upOrOpen called`);
|
|
140
140
|
super.upOrOpen();
|
|
141
141
|
}
|
|
142
142
|
downOrClose() {
|
|
143
143
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
144
144
|
device.log.info(`Closing cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
145
|
-
device.commandHandler.executeHandler(`downOrClose`, { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
145
|
+
device.commandHandler.executeHandler(`downOrClose`, { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
146
146
|
device.log.debug(`MatterbridgeWindowCoveringServer: downOrClose called`);
|
|
147
147
|
super.downOrClose();
|
|
148
148
|
}
|
|
149
149
|
stopMotion() {
|
|
150
150
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
151
151
|
device.log.info(`Stopping cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
152
|
-
device.commandHandler.executeHandler('stopMotion', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
152
|
+
device.commandHandler.executeHandler('stopMotion', { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
153
153
|
device.log.debug(`MatterbridgeWindowCoveringServer: stopMotion called`);
|
|
154
154
|
super.stopMotion();
|
|
155
155
|
}
|
|
156
156
|
goToLiftPercentage(request) {
|
|
157
157
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
158
158
|
device.log.info(`Setting cover lift percentage to ${request.liftPercent100thsValue} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
159
|
-
device.commandHandler.executeHandler('goToLiftPercentage', { request, attributes: this.state, endpoint: this.endpoint });
|
|
159
|
+
device.commandHandler.executeHandler('goToLiftPercentage', { request, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
160
160
|
device.log.debug(`MatterbridgeWindowCoveringServer: goToLiftPercentage with ${request.liftPercent100thsValue}`);
|
|
161
161
|
super.goToLiftPercentage(request);
|
|
162
162
|
}
|
|
@@ -167,35 +167,35 @@ export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServ
|
|
|
167
167
|
upOrOpen() {
|
|
168
168
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
169
169
|
device.log.info(`Opening cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
170
|
-
device.commandHandler.executeHandler(`upOrOpen`, { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
170
|
+
device.commandHandler.executeHandler(`upOrOpen`, { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
171
171
|
device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: upOrOpen called`);
|
|
172
172
|
super.upOrOpen();
|
|
173
173
|
}
|
|
174
174
|
downOrClose() {
|
|
175
175
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
176
176
|
device.log.info(`Closing cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
177
|
-
device.commandHandler.executeHandler(`downOrClose`, { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
177
|
+
device.commandHandler.executeHandler(`downOrClose`, { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
178
178
|
device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: downOrClose called`);
|
|
179
179
|
super.downOrClose();
|
|
180
180
|
}
|
|
181
181
|
stopMotion() {
|
|
182
182
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
183
183
|
device.log.info(`Stopping cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
184
|
-
device.commandHandler.executeHandler('stopMotion', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
184
|
+
device.commandHandler.executeHandler('stopMotion', { request: {}, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
185
185
|
device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: stopMotion called`);
|
|
186
186
|
super.stopMotion();
|
|
187
187
|
}
|
|
188
188
|
goToLiftPercentage(request) {
|
|
189
189
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
190
190
|
device.log.info(`Setting cover lift percentage to ${request.liftPercent100thsValue} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
191
|
-
device.commandHandler.executeHandler('goToLiftPercentage', { request, attributes: this.state, endpoint: this.endpoint });
|
|
191
|
+
device.commandHandler.executeHandler('goToLiftPercentage', { request, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
192
192
|
device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToLiftPercentage with ${request.liftPercent100thsValue}`);
|
|
193
193
|
super.goToLiftPercentage(request);
|
|
194
194
|
}
|
|
195
195
|
goToTiltPercentage(request) {
|
|
196
196
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
197
197
|
device.log.info(`Setting cover tilt percentage to ${request.tiltPercent100thsValue} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
198
|
-
device.commandHandler.executeHandler('goToTiltPercentage', { request, attributes: this.state, endpoint: this.endpoint });
|
|
198
|
+
device.commandHandler.executeHandler('goToTiltPercentage', { request, cluster: WindowCoveringServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
199
199
|
device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToTiltPercentage with ${request.tiltPercent100thsValue}`);
|
|
200
200
|
super.goToTiltPercentage(request);
|
|
201
201
|
}
|
|
@@ -206,23 +206,23 @@ export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
|
206
206
|
lockDoor() {
|
|
207
207
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
208
208
|
device.log.info(`Locking door (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
209
|
-
device.commandHandler.executeHandler('lockDoor', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
209
|
+
device.commandHandler.executeHandler('lockDoor', { request: {}, cluster: DoorLockServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
210
210
|
device.log.debug(`MatterbridgeDoorLockServer: lockDoor called`);
|
|
211
211
|
super.lockDoor();
|
|
212
212
|
}
|
|
213
213
|
unlockDoor() {
|
|
214
214
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
215
215
|
device.log.info(`Unlocking door (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
216
|
-
device.commandHandler.executeHandler('unlockDoor', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
216
|
+
device.commandHandler.executeHandler('unlockDoor', { request: {}, cluster: DoorLockServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
217
217
|
device.log.debug(`MatterbridgeDoorLockServer: unlockDoor called`);
|
|
218
218
|
super.unlockDoor();
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
export class MatterbridgeFanControlServer extends FanControlServer.with(FanControl.Feature.
|
|
221
|
+
export class MatterbridgeFanControlServer extends FanControlServer.with(FanControl.Feature.Auto, FanControl.Feature.Step) {
|
|
222
222
|
step(request) {
|
|
223
223
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
224
224
|
device.log.info(`Stepping fan with direction ${request.direction} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
225
|
-
device.commandHandler.executeHandler('step', { request, attributes: this.state, endpoint: this.endpoint });
|
|
225
|
+
device.commandHandler.executeHandler('step', { request, cluster: FanControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
226
226
|
const lookupStepDirection = ['Increase', 'Decrease'];
|
|
227
227
|
device.log.debug(`MatterbridgeFanControlServer: step called with direction: ${lookupStepDirection[request.direction]} wrap: ${request.wrap} lowestOff: ${request.lowestOff}`);
|
|
228
228
|
device.log.debug(`- current percentCurrent: ${this.state.percentCurrent}`);
|
|
@@ -247,7 +247,7 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
|
|
|
247
247
|
setpointRaiseLower(request) {
|
|
248
248
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
249
249
|
device.log.info(`Setting setpoint by ${request.amount} in mode ${request.mode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
250
|
-
device.commandHandler.executeHandler('setpointRaiseLower', { request, attributes: this.state, endpoint: this.endpoint });
|
|
250
|
+
device.commandHandler.executeHandler('setpointRaiseLower', { request, cluster: ThermostatServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
251
251
|
const lookupSetpointAdjustMode = ['Heat', 'Cool', 'Both'];
|
|
252
252
|
device.log.debug(`MatterbridgeThermostatServer: setpointRaiseLower called with mode: ${lookupSetpointAdjustMode[request.mode]} amount: ${request.amount / 10}`);
|
|
253
253
|
if (this.state.occupiedHeatingSetpoint !== undefined)
|
|
@@ -269,26 +269,35 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
|
|
|
269
269
|
export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigurationAndControlServer.with(ValveConfigurationAndControl.Feature.Level) {
|
|
270
270
|
open(request) {
|
|
271
271
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
272
|
-
device.log.info(`Opening valve to ${request.targetLevel
|
|
273
|
-
device.commandHandler.executeHandler('open', { request, attributes: this.state, endpoint: this.endpoint });
|
|
272
|
+
device.log.info(`Opening valve to ${request.targetLevel ? request.targetLevel + '%' : 'fully opened'} ${request.openDuration ? 'for ' + request.openDuration + 's' : 'until closed'} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
273
|
+
device.commandHandler.executeHandler('open', { request, cluster: ValveConfigurationAndControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
274
274
|
device.log.debug(`MatterbridgeValveConfigurationAndControlServer: open called with openDuration: ${request.openDuration} targetLevel: ${request.targetLevel}`);
|
|
275
|
+
this.state.targetState = ValveConfigurationAndControl.ValveState.Open;
|
|
276
|
+
this.state.currentState = ValveConfigurationAndControl.ValveState.Open;
|
|
275
277
|
this.state.targetLevel = request.targetLevel ?? 100;
|
|
276
278
|
this.state.currentLevel = request.targetLevel ?? 100;
|
|
279
|
+
this.state.openDuration = request.openDuration ?? this.state.defaultOpenDuration;
|
|
280
|
+
if (this.state.openDuration === null)
|
|
281
|
+
this.state.remainingDuration = null;
|
|
277
282
|
}
|
|
278
283
|
close() {
|
|
279
284
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
280
285
|
device.log.info(`Closing valve (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
281
|
-
device.commandHandler.executeHandler('close', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
286
|
+
device.commandHandler.executeHandler('close', { request: {}, cluster: ValveConfigurationAndControlServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
282
287
|
device.log.debug(`MatterbridgeValveConfigurationAndControlServer: close called`);
|
|
288
|
+
this.state.targetState = ValveConfigurationAndControl.ValveState.Closed;
|
|
289
|
+
this.state.currentState = ValveConfigurationAndControl.ValveState.Closed;
|
|
283
290
|
this.state.targetLevel = 0;
|
|
284
291
|
this.state.currentLevel = 0;
|
|
292
|
+
this.state.openDuration = null;
|
|
293
|
+
this.state.remainingDuration = null;
|
|
285
294
|
}
|
|
286
295
|
}
|
|
287
296
|
export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(SmokeCoAlarm.Feature.SmokeAlarm, SmokeCoAlarm.Feature.CoAlarm) {
|
|
288
297
|
selfTestRequest() {
|
|
289
298
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
290
299
|
device.log.info(`Testing SmokeCOAlarm (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
291
|
-
device.commandHandler.executeHandler('selfTestRequest', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
300
|
+
device.commandHandler.executeHandler('selfTestRequest', { request: {}, cluster: SmokeCoAlarmServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
292
301
|
device.log.debug(`MatterbridgeSmokeCoAlarmServer: selfTestRequest called`);
|
|
293
302
|
}
|
|
294
303
|
}
|
|
@@ -296,7 +305,7 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
|
|
|
296
305
|
enableDisableAlarm(request) {
|
|
297
306
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
298
307
|
device.log.info(`Enabling/disabling alarm ${request.alarmsToEnableDisable} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
299
|
-
device.commandHandler.executeHandler('enableDisableAlarm', { request, attributes: this.state, endpoint: this.endpoint });
|
|
308
|
+
device.commandHandler.executeHandler('enableDisableAlarm', { request, cluster: BooleanStateConfigurationServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
300
309
|
device.log.debug(`MatterbridgeBooleanStateConfigurationServer: enableDisableAlarm called`);
|
|
301
310
|
}
|
|
302
311
|
}
|
|
@@ -315,7 +324,7 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
315
324
|
pause() {
|
|
316
325
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
317
326
|
device.log.info(`Pause (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
318
|
-
device.commandHandler.executeHandler('pause', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
327
|
+
device.commandHandler.executeHandler('pause', { request: {}, cluster: OperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
319
328
|
device.log.debug('MatterbridgeOperationalStateServer: pause called setting operational state to Paused');
|
|
320
329
|
this.state.operationalState = OperationalState.OperationalStateEnum.Paused;
|
|
321
330
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
@@ -326,7 +335,7 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
326
335
|
stop() {
|
|
327
336
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
328
337
|
device.log.info(`Stop (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
329
|
-
device.commandHandler.executeHandler('stop', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
338
|
+
device.commandHandler.executeHandler('stop', { request: {}, cluster: OperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
330
339
|
device.log.debug('MatterbridgeOperationalStateServer: stop called setting operational state to Stopped');
|
|
331
340
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
|
332
341
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
@@ -337,7 +346,7 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
337
346
|
start() {
|
|
338
347
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
339
348
|
device.log.info(`Start (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
340
|
-
device.commandHandler.executeHandler('start', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
349
|
+
device.commandHandler.executeHandler('start', { request: {}, cluster: OperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
341
350
|
device.log.debug('MatterbridgeOperationalStateServer: start called setting operational state to Running');
|
|
342
351
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
|
343
352
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
@@ -348,7 +357,7 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
348
357
|
resume() {
|
|
349
358
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
350
359
|
device.log.info(`Resume (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
351
|
-
device.commandHandler.executeHandler('resume', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
360
|
+
device.commandHandler.executeHandler('resume', { request: {}, cluster: OperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
352
361
|
device.log.debug('MatterbridgeOperationalStateServer: resume called setting operational state to Running');
|
|
353
362
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
|
354
363
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
@@ -360,6 +369,8 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
360
369
|
export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
361
370
|
selectAreas(request) {
|
|
362
371
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
372
|
+
device.log.info(`Selecting areas ${request.newAreas} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
373
|
+
device.commandHandler.executeHandler('selectAreas', { request, cluster: ServiceAreaServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
363
374
|
for (const area of request.newAreas) {
|
|
364
375
|
const supportedArea = this.state.supportedAreas.find((supportedArea) => supportedArea.areaId === area);
|
|
365
376
|
if (!supportedArea) {
|
|
@@ -367,8 +378,6 @@ export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
|
367
378
|
return { status: ServiceArea.SelectAreasStatus.UnsupportedArea, statusText: 'Unsupported areas' };
|
|
368
379
|
}
|
|
369
380
|
}
|
|
370
|
-
device.log.info(`Selecting areas ${request.newAreas} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
371
|
-
device.commandHandler.executeHandler('selectAreas', { request, attributes: this.state, endpoint: this.endpoint });
|
|
372
381
|
this.state.selectedAreas = request.newAreas;
|
|
373
382
|
device.log.debug(`MatterbridgeServiceAreaServer selectAreas called with: ${request.newAreas.map((area) => area.toString()).join(', ')}`);
|
|
374
383
|
return super.selectAreas(request);
|
|
@@ -378,7 +387,7 @@ export class MatterbridgeModeSelectServer extends ModeSelectServer {
|
|
|
378
387
|
changeToMode(request) {
|
|
379
388
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
380
389
|
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
381
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
390
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: ModeSelectServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
382
391
|
device.log.debug(`MatterbridgeModeSelectServer: changeToMode called with mode: ${request.newMode}`);
|
|
383
392
|
super.changeToMode(request);
|
|
384
393
|
}
|
|
@@ -386,13 +395,13 @@ export class MatterbridgeModeSelectServer extends ModeSelectServer {
|
|
|
386
395
|
export class MatterbridgeDeviceEnergyManagementModeServer extends DeviceEnergyManagementModeServer {
|
|
387
396
|
changeToMode(request) {
|
|
388
397
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
398
|
+
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
399
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: DeviceEnergyManagementModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
389
400
|
const supported = this.state.supportedModes.find((mode) => mode.mode === request.newMode);
|
|
390
401
|
if (!supported) {
|
|
391
402
|
device.log.error(`MatterbridgeDeviceEnergyManagementModeServer changeToMode called with unsupported newMode: ${request.newMode}`);
|
|
392
403
|
return { status: ModeBase.ModeChangeStatus.UnsupportedMode, statusText: 'Unsupported mode' };
|
|
393
404
|
}
|
|
394
|
-
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
395
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
396
405
|
this.state.currentMode = request.newMode;
|
|
397
406
|
device.log.debug(`MatterbridgeDeviceEnergyManagementModeServer changeToMode called with newMode ${request.newMode} => ${supported.label}`);
|
|
398
407
|
return super.changeToMode(request);
|
|
@@ -803,24 +803,33 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
803
803
|
});
|
|
804
804
|
return this;
|
|
805
805
|
}
|
|
806
|
-
createDefaultFanControlClusterServer(fanMode = FanControl.FanMode.Off) {
|
|
806
|
+
createDefaultFanControlClusterServer(fanMode = FanControl.FanMode.Off, fanModeSequence = FanControl.FanModeSequence.OffLowMedHighAuto, percentSetting = 0, percentCurrent = 0) {
|
|
807
|
+
this.behaviors.require(MatterbridgeFanControlServer.with(FanControl.Feature.Auto, FanControl.Feature.Step), {
|
|
808
|
+
fanMode,
|
|
809
|
+
fanModeSequence,
|
|
810
|
+
percentSetting,
|
|
811
|
+
percentCurrent,
|
|
812
|
+
});
|
|
813
|
+
return this;
|
|
814
|
+
}
|
|
815
|
+
createMultiSpeedFanControlClusterServer(fanMode = FanControl.FanMode.Off, fanModeSequence = FanControl.FanModeSequence.OffLowMedHighAuto, percentSetting = 0, percentCurrent = 0, speedMax = 10, speedSetting = 0, speedCurrent = 0) {
|
|
807
816
|
this.behaviors.require(MatterbridgeFanControlServer.with(FanControl.Feature.MultiSpeed, FanControl.Feature.Auto, FanControl.Feature.Step), {
|
|
808
817
|
fanMode,
|
|
809
|
-
fanModeSequence
|
|
810
|
-
percentSetting
|
|
811
|
-
percentCurrent
|
|
812
|
-
speedMax
|
|
813
|
-
speedSetting
|
|
814
|
-
speedCurrent
|
|
818
|
+
fanModeSequence,
|
|
819
|
+
percentSetting,
|
|
820
|
+
percentCurrent,
|
|
821
|
+
speedMax,
|
|
822
|
+
speedSetting,
|
|
823
|
+
speedCurrent,
|
|
815
824
|
});
|
|
816
825
|
return this;
|
|
817
826
|
}
|
|
818
|
-
createBaseFanControlClusterServer(fanMode = FanControl.FanMode.Off) {
|
|
827
|
+
createBaseFanControlClusterServer(fanMode = FanControl.FanMode.Off, fanModeSequence = FanControl.FanModeSequence.OffLowMedHigh, percentSetting = 0, percentCurrent = 0) {
|
|
819
828
|
this.behaviors.require(FanControlServer, {
|
|
820
829
|
fanMode,
|
|
821
|
-
fanModeSequence
|
|
822
|
-
percentSetting
|
|
823
|
-
percentCurrent
|
|
830
|
+
fanModeSequence,
|
|
831
|
+
percentSetting,
|
|
832
|
+
percentCurrent,
|
|
824
833
|
});
|
|
825
834
|
return this;
|
|
826
835
|
}
|
|
@@ -871,13 +880,13 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
871
880
|
this.behaviors.require(MatterbridgeValveConfigurationAndControlServer.with(ValveConfigurationAndControl.Feature.Level), {
|
|
872
881
|
currentState: valveState,
|
|
873
882
|
targetState: valveState,
|
|
874
|
-
currentLevel: valveLevel,
|
|
875
|
-
targetLevel: valveLevel,
|
|
876
883
|
openDuration: null,
|
|
877
884
|
defaultOpenDuration: null,
|
|
878
885
|
remainingDuration: null,
|
|
879
|
-
defaultOpenLevel: 100,
|
|
880
886
|
valveFault: { generalFault: false, blocked: false, leaking: false, notConnected: false, shortCircuit: false, currentExceeded: false },
|
|
887
|
+
currentLevel: valveLevel,
|
|
888
|
+
targetLevel: valveLevel,
|
|
889
|
+
defaultOpenLevel: 100,
|
|
881
890
|
levelStep: 1,
|
|
882
891
|
});
|
|
883
892
|
return this;
|
|
@@ -97,7 +97,7 @@ export class MatterbridgeRvcRunModeServer extends RvcRunModeServer {
|
|
|
97
97
|
changeToMode(request) {
|
|
98
98
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
99
99
|
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
100
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
100
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: RvcRunModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
101
101
|
const supported = this.state.supportedModes.find((mode) => mode.mode === request.newMode);
|
|
102
102
|
if (!supported) {
|
|
103
103
|
device.log.error(`MatterbridgeRvcRunModeServer changeToMode called with unsupported newMode: ${request.newMode}`);
|
|
@@ -123,7 +123,7 @@ export class MatterbridgeRvcCleanModeServer extends RvcCleanModeServer {
|
|
|
123
123
|
changeToMode(request) {
|
|
124
124
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
125
125
|
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
126
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
126
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: RvcCleanModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
127
127
|
const supported = this.state.supportedModes.find((mode) => mode.mode === request.newMode);
|
|
128
128
|
if (!supported) {
|
|
129
129
|
device.log.error(`MatterbridgeRvcCleanModeServer changeToMode called with unsupported newMode: ${request.newMode}`);
|
|
@@ -138,7 +138,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
138
138
|
pause() {
|
|
139
139
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
140
140
|
device.log.info(`Pause (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
141
|
-
device.commandHandler.executeHandler('pause', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
141
|
+
device.commandHandler.executeHandler('pause', { request: {}, cluster: RvcOperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
142
142
|
device.log.debug('MatterbridgeRvcOperationalStateServer: pause called setting operational state to Paused and currentMode to Idle');
|
|
143
143
|
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
144
144
|
this.state.operationalState = RvcOperationalState.OperationalState.Paused;
|
|
@@ -150,7 +150,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
150
150
|
resume() {
|
|
151
151
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
152
152
|
device.log.info(`Resume (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
153
|
-
device.commandHandler.executeHandler('resume', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
153
|
+
device.commandHandler.executeHandler('resume', { request: {}, cluster: RvcOperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
154
154
|
device.log.debug('MatterbridgeRvcOperationalStateServer: resume called setting operational state to Running and currentMode to Cleaning');
|
|
155
155
|
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
|
|
156
156
|
this.state.operationalState = RvcOperationalState.OperationalState.Running;
|
|
@@ -162,7 +162,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
162
162
|
goHome() {
|
|
163
163
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
164
164
|
device.log.info(`GoHome (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
165
|
-
device.commandHandler.executeHandler('goHome', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
165
|
+
device.commandHandler.executeHandler('goHome', { request: {}, cluster: RvcOperationalStateServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
166
166
|
device.log.debug('MatterbridgeRvcOperationalStateServer: goHome called setting operational state to Docked and currentMode to Idle');
|
|
167
167
|
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
168
168
|
this.state.operationalState = RvcOperationalState.OperationalState.Docked;
|
package/dist/waterHeater.js
CHANGED
|
@@ -51,14 +51,14 @@ export class MatterbridgeWaterHeaterManagementServer extends WaterHeaterManageme
|
|
|
51
51
|
boost(request) {
|
|
52
52
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
53
53
|
device.log.info(`Boost (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
54
|
-
device.commandHandler.executeHandler('boost', { request, attributes: this.state, endpoint: this.endpoint });
|
|
54
|
+
device.commandHandler.executeHandler('boost', { request, cluster: WaterHeaterManagementServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
55
55
|
device.log.debug(`MatterbridgeWaterHeaterManagementServer boost called with: ${JSON.stringify(request)}`);
|
|
56
56
|
this.state.boostState = WaterHeaterManagement.BoostState.Active;
|
|
57
57
|
}
|
|
58
58
|
cancelBoost() {
|
|
59
59
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
60
60
|
device.log.info(`Cancel boost (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
61
|
-
device.commandHandler.executeHandler('cancelBoost', { request: {}, attributes: this.state, endpoint: this.endpoint });
|
|
61
|
+
device.commandHandler.executeHandler('cancelBoost', { request: {}, cluster: WaterHeaterManagementServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
62
62
|
device.log.debug(`MatterbridgeWaterHeaterManagementServer cancelBoost called`);
|
|
63
63
|
this.state.boostState = WaterHeaterManagement.BoostState.Inactive;
|
|
64
64
|
}
|
|
@@ -67,13 +67,12 @@ export class MatterbridgeWaterHeaterModeServer extends WaterHeaterModeServer {
|
|
|
67
67
|
changeToMode(request) {
|
|
68
68
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
69
69
|
device.log.info(`Changing mode to ${request.newMode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
70
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
70
|
+
device.commandHandler.executeHandler('changeToMode', { request, cluster: WaterHeaterModeServer.id, attributes: this.state, endpoint: this.endpoint });
|
|
71
71
|
const supported = this.state.supportedModes.find((mode) => mode.mode === request.newMode);
|
|
72
72
|
if (!supported) {
|
|
73
73
|
device.log.error(`MatterbridgeWaterHeaterModeServer changeToMode called with unsupported newMode: ${request.newMode}`);
|
|
74
74
|
return { status: ModeBase.ModeChangeStatus.UnsupportedMode, statusText: 'Unsupported mode' };
|
|
75
75
|
}
|
|
76
|
-
device.commandHandler.executeHandler('changeToMode', { request, attributes: this.state, endpoint: this.endpoint });
|
|
77
76
|
this.state.currentMode = request.newMode;
|
|
78
77
|
device.log.debug(`MatterbridgeWaterHeaterModeServer changeToMode called with newMode ${request.newMode} => ${supported.label}`);
|
|
79
78
|
return { status: ModeBase.ModeChangeStatus.Success, statusText: 'Success' };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.0.6-dev-
|
|
3
|
+
"version": "3.0.6-dev-20250612-6b6e953",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.0.6-dev-
|
|
9
|
+
"version": "3.0.6-dev-20250612-6b6e953",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.14.0",
|
package/package.json
CHANGED