@matterbridge/core 3.7.1-dev-20260323-0a65511 → 3.7.1-dev-20260324-7b86640
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/devices/roboticVacuumCleaner.d.ts +2 -2
- package/dist/devices/roboticVacuumCleaner.js +1 -1
- package/dist/matterbridge.js +26 -4
- package/dist/matterbridgeBehaviorsServer.d.ts +7 -13
- package/dist/matterbridgeBehaviorsServer.js +10 -98
- package/dist/matterbridgeEndpoint.js +3 -3
- package/package.json +6 -6
|
@@ -9,10 +9,10 @@ import { RvcRunMode } from '@matter/types/clusters/rvc-run-mode';
|
|
|
9
9
|
import { ServiceArea } from '@matter/types/clusters/service-area';
|
|
10
10
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
11
11
|
export declare class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
12
|
-
constructor(name: string, serial: string, mode?: 'server' | 'matter' | undefined, 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, supportedMaps?: ServiceArea.Map[]);
|
|
12
|
+
constructor(name: string, serial: string, mode?: 'server' | 'matter' | undefined, 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[]);
|
|
13
13
|
createDefaultRvcRunModeClusterServer(currentMode?: number, supportedModes?: RvcRunMode.ModeOption[]): this;
|
|
14
14
|
createDefaultRvcCleanModeClusterServer(currentMode?: number, supportedModes?: RvcCleanMode.ModeOption[]): this;
|
|
15
|
-
createDefaultServiceAreaClusterServer(supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number, supportedMaps?: ServiceArea.Map[]): this;
|
|
15
|
+
createDefaultServiceAreaClusterServer(supportedAreas?: ServiceArea.Area[], selectedAreas?: number[], currentArea?: number | null, supportedMaps?: ServiceArea.Map[]): this;
|
|
16
16
|
createDefaultRvcOperationalStateClusterServer(phaseList?: string[] | null, currentPhase?: number | null, operationalStateList?: RvcOperationalState.OperationalStateStruct[], operationalState?: RvcOperationalState.OperationalState, operationalError?: RvcOperationalState.ErrorStateStruct): this;
|
|
17
17
|
}
|
|
18
18
|
export declare class MatterbridgeRvcRunModeServer extends RvcRunModeServer {
|
|
@@ -71,7 +71,7 @@ export class RoboticVacuumCleaner extends MatterbridgeEndpoint {
|
|
|
71
71
|
},
|
|
72
72
|
],
|
|
73
73
|
selectedAreas: selectedAreas ?? [],
|
|
74
|
-
currentArea: currentArea
|
|
74
|
+
currentArea: currentArea !== undefined ? currentArea : 1,
|
|
75
75
|
supportedMaps: supportedMaps ?? [],
|
|
76
76
|
estimatedEndTime: null,
|
|
77
77
|
});
|
package/dist/matterbridge.js
CHANGED
|
@@ -1197,11 +1197,33 @@ export class Matterbridge extends EventEmitter {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
if (message === 'shutting down with reset...') {
|
|
1199
1199
|
this.log.info('Resetting Matterbridge commissioning information...');
|
|
1200
|
-
await this.matterStorageManager?.createContext('events')?.clearAll();
|
|
1201
|
-
await this.matterStorageManager?.createContext('fabrics')?.clearAll();
|
|
1202
|
-
await this.matterStorageManager?.createContext('root')?.clearAll();
|
|
1203
|
-
await this.matterStorageManager?.createContext('sessions')?.clearAll();
|
|
1204
1200
|
await this.matterbridgeContext?.clearAll();
|
|
1201
|
+
if (this.bridgeMode === 'bridge') {
|
|
1202
|
+
await this.matterStorageManager?.createContext('events')?.clearAll();
|
|
1203
|
+
await this.matterStorageManager?.createContext('fabrics')?.clearAll();
|
|
1204
|
+
await this.matterStorageManager?.createContext('root')?.clearAll();
|
|
1205
|
+
await this.matterStorageManager?.createContext('sessions')?.clearAll();
|
|
1206
|
+
}
|
|
1207
|
+
else if (this.bridgeMode === 'childbridge') {
|
|
1208
|
+
for (const plugin of this.plugins.array()) {
|
|
1209
|
+
plugin.storageContext?.clearAll();
|
|
1210
|
+
const storageManager = await this.matterStorageService?.open(plugin.name);
|
|
1211
|
+
await storageManager?.createContext('events')?.clearAll();
|
|
1212
|
+
await storageManager?.createContext('fabrics')?.clearAll();
|
|
1213
|
+
await storageManager?.createContext('root')?.clearAll();
|
|
1214
|
+
await storageManager?.createContext('sessions')?.clearAll();
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
for (const device of this.devices.array()) {
|
|
1218
|
+
if (device.mode === 'server' && device.deviceName) {
|
|
1219
|
+
const storageManager = await this.matterStorageService?.open(device.deviceName.replaceAll(' ', ''));
|
|
1220
|
+
await storageManager?.createContext('persist')?.clearAll();
|
|
1221
|
+
await storageManager?.createContext('events')?.clearAll();
|
|
1222
|
+
await storageManager?.createContext('fabrics')?.clearAll();
|
|
1223
|
+
await storageManager?.createContext('root')?.clearAll();
|
|
1224
|
+
await storageManager?.createContext('sessions')?.clearAll();
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1205
1227
|
this.log.info('Matter storage reset done! Remove the bridge from the controller.');
|
|
1206
1228
|
}
|
|
1207
1229
|
if (message === 'unregistered all devices and shutting down...') {
|
|
@@ -452,15 +452,17 @@ declare const MatterbridgeColorControlServer_base: import("@matter/node").Cluste
|
|
|
452
452
|
};
|
|
453
453
|
readonly component: false;
|
|
454
454
|
}];
|
|
455
|
-
}>, readonly [ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature]>, typeof ColorControlServer, import("@matter/node/behaviors/color-control").ColorControlInterface>;
|
|
455
|
+
}>, readonly [ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature, ColorControl.Feature.EnhancedHue]>, typeof ColorControlServer, import("@matter/node/behaviors/color-control").ColorControlInterface>;
|
|
456
456
|
export declare class MatterbridgeColorControlServer extends MatterbridgeColorControlServer_base {
|
|
457
457
|
moveToHue(request: ColorControl.MoveToHueRequest): Promise<void>;
|
|
458
|
+
enhancedMoveToHue(request: ColorControl.EnhancedMoveToHueRequest): Promise<void>;
|
|
458
459
|
moveToSaturation(request: ColorControl.MoveToSaturationRequest): Promise<void>;
|
|
459
460
|
moveToHueAndSaturation(request: ColorControl.MoveToHueAndSaturationRequest): Promise<void>;
|
|
461
|
+
enhancedMoveToHueAndSaturation(request: ColorControl.EnhancedMoveToHueAndSaturationRequest): Promise<void>;
|
|
460
462
|
moveToColor(request: ColorControl.MoveToColorRequest): Promise<void>;
|
|
461
463
|
moveToColorTemperature(request: ColorControl.MoveToColorTemperatureRequest): Promise<void>;
|
|
462
464
|
}
|
|
463
|
-
declare const MatterbridgeEnhancedColorControlServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
465
|
+
declare const MatterbridgeEnhancedColorControlServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
464
466
|
readonly id: 768;
|
|
465
467
|
readonly name: "ColorControl";
|
|
466
468
|
readonly revision: 7;
|
|
@@ -846,15 +848,8 @@ declare const MatterbridgeEnhancedColorControlServer_base: import("@matter/node"
|
|
|
846
848
|
};
|
|
847
849
|
readonly component: false;
|
|
848
850
|
}];
|
|
849
|
-
}>, readonly [ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature]>, typeof
|
|
851
|
+
}>, readonly [ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature, ColorControl.Feature.EnhancedHue]>, readonly [ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature]>, typeof MatterbridgeColorControlServer, import("@matter/node/behaviors/color-control").ColorControlInterface>;
|
|
850
852
|
export declare class MatterbridgeEnhancedColorControlServer extends MatterbridgeEnhancedColorControlServer_base {
|
|
851
|
-
moveToHue(request: ColorControl.MoveToHueRequest): Promise<void>;
|
|
852
|
-
enhancedMoveToHue(request: ColorControl.EnhancedMoveToHueRequest): Promise<void>;
|
|
853
|
-
moveToSaturation(request: ColorControl.MoveToSaturationRequest): Promise<void>;
|
|
854
|
-
moveToHueAndSaturation(request: ColorControl.MoveToHueAndSaturationRequest): Promise<void>;
|
|
855
|
-
enhancedMoveToHueAndSaturation(request: ColorControl.EnhancedMoveToHueAndSaturationRequest): Promise<void>;
|
|
856
|
-
moveToColor(request: ColorControl.MoveToColorRequest): Promise<void>;
|
|
857
|
-
moveToColorTemperature(request: ColorControl.MoveToColorTemperatureRequest): Promise<void>;
|
|
858
853
|
}
|
|
859
854
|
declare const MatterbridgeWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
860
855
|
readonly id: 258;
|
|
@@ -1803,10 +1798,11 @@ declare const MatterbridgeThermostatServer_base: import("@matter/node").ClusterB
|
|
|
1803
1798
|
};
|
|
1804
1799
|
readonly component: false;
|
|
1805
1800
|
}];
|
|
1806
|
-
}>, readonly [Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode]>, typeof ThermostatServer, import("@matter/node/behaviors/thermostat").ThermostatInterface>;
|
|
1801
|
+
}>, readonly [Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode, Thermostat.Feature.Presets]>, typeof ThermostatServer, import("@matter/node/behaviors/thermostat").ThermostatInterface>;
|
|
1807
1802
|
export declare class MatterbridgeThermostatServer extends MatterbridgeThermostatServer_base {
|
|
1808
1803
|
initialize(): Promise<void>;
|
|
1809
1804
|
setpointRaiseLower(request: Thermostat.SetpointRaiseLowerRequest): Promise<void>;
|
|
1805
|
+
setActivePresetRequest(request: Thermostat.SetActivePresetRequest): Promise<void>;
|
|
1810
1806
|
}
|
|
1811
1807
|
declare const MatterbridgePresetThermostatServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
1812
1808
|
readonly id: 513;
|
|
@@ -2170,8 +2166,6 @@ declare const MatterbridgePresetThermostatServer_base: import("@matter/node").Cl
|
|
|
2170
2166
|
}];
|
|
2171
2167
|
}>, readonly [Thermostat.Feature.Presets, Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode]>, typeof ThermostatServer, import("@matter/node/behaviors/thermostat").ThermostatInterface>;
|
|
2172
2168
|
export declare class MatterbridgePresetThermostatServer extends MatterbridgePresetThermostatServer_base {
|
|
2173
|
-
setpointRaiseLower(request: Thermostat.SetpointRaiseLowerRequest): Promise<void>;
|
|
2174
|
-
setActivePresetRequest(request: Thermostat.SetActivePresetRequest): Promise<void>;
|
|
2175
2169
|
}
|
|
2176
2170
|
declare const MatterbridgeValveConfigurationAndControlServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<ValveConfigurationAndControl.Cluster, readonly [ValveConfigurationAndControl.Feature.Level]>, typeof ValveConfigurationAndControlServer, import("@matter/node/behaviors/valve-configuration-and-control").ValveConfigurationAndControlInterface>;
|
|
2177
2171
|
export declare class MatterbridgeValveConfigurationAndControlServer extends MatterbridgeValveConfigurationAndControlServer_base {
|
|
@@ -27,7 +27,6 @@ import { FanControl } from '@matter/types/clusters/fan-control';
|
|
|
27
27
|
import { ModeBase } from '@matter/types/clusters/mode-base';
|
|
28
28
|
import { OperationalState } from '@matter/types/clusters/operational-state';
|
|
29
29
|
import { ResourceMonitoring } from '@matter/types/clusters/resource-monitoring';
|
|
30
|
-
import { ServiceArea } from '@matter/types/clusters/service-area';
|
|
31
30
|
import { SmokeCoAlarm } from '@matter/types/clusters/smoke-co-alarm';
|
|
32
31
|
import { Thermostat } from '@matter/types/clusters/thermostat';
|
|
33
32
|
import { ValveConfigurationAndControl } from '@matter/types/clusters/valve-configuration-and-control';
|
|
@@ -162,74 +161,7 @@ export class MatterbridgeLevelControlServer extends LevelControlServer {
|
|
|
162
161
|
await super.moveToLevelWithOnOff(request);
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
|
-
export class MatterbridgeColorControlServer extends ColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
|
|
166
|
-
async moveToHue(request) {
|
|
167
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
168
|
-
device.log.info(`Setting hue to ${request.hue} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
169
|
-
await device.commandHandler.executeHandler('ColorControl.moveToHue', {
|
|
170
|
-
command: 'moveToHue',
|
|
171
|
-
request,
|
|
172
|
-
cluster: ColorControlServer.id,
|
|
173
|
-
attributes: this.state,
|
|
174
|
-
endpoint: this.endpoint,
|
|
175
|
-
});
|
|
176
|
-
device.log.debug(`MatterbridgeColorControlServer: moveToHue called`);
|
|
177
|
-
await super.moveToHue(request);
|
|
178
|
-
}
|
|
179
|
-
async moveToSaturation(request) {
|
|
180
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
181
|
-
device.log.info(`Setting saturation to ${request.saturation} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
182
|
-
await device.commandHandler.executeHandler('ColorControl.moveToSaturation', {
|
|
183
|
-
command: 'moveToSaturation',
|
|
184
|
-
request,
|
|
185
|
-
cluster: ColorControlServer.id,
|
|
186
|
-
attributes: this.state,
|
|
187
|
-
endpoint: this.endpoint,
|
|
188
|
-
});
|
|
189
|
-
device.log.debug(`MatterbridgeColorControlServer: moveToSaturation called`);
|
|
190
|
-
await super.moveToSaturation(request);
|
|
191
|
-
}
|
|
192
|
-
async moveToHueAndSaturation(request) {
|
|
193
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
194
|
-
device.log.info(`Setting hue to ${request.hue} and saturation to ${request.saturation} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
195
|
-
await device.commandHandler.executeHandler('ColorControl.moveToHueAndSaturation', {
|
|
196
|
-
command: 'moveToHueAndSaturation',
|
|
197
|
-
request,
|
|
198
|
-
cluster: ColorControlServer.id,
|
|
199
|
-
attributes: this.state,
|
|
200
|
-
endpoint: this.endpoint,
|
|
201
|
-
});
|
|
202
|
-
device.log.debug(`MatterbridgeColorControlServer: moveToHueAndSaturation called`);
|
|
203
|
-
await super.moveToHueAndSaturation(request);
|
|
204
|
-
}
|
|
205
|
-
async moveToColor(request) {
|
|
206
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
207
|
-
device.log.info(`Setting color to ${request.colorX}, ${request.colorY} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
208
|
-
await device.commandHandler.executeHandler('ColorControl.moveToColor', {
|
|
209
|
-
command: 'moveToColor',
|
|
210
|
-
request,
|
|
211
|
-
cluster: ColorControlServer.id,
|
|
212
|
-
attributes: this.state,
|
|
213
|
-
endpoint: this.endpoint,
|
|
214
|
-
});
|
|
215
|
-
device.log.debug(`MatterbridgeColorControlServer: moveToColor called`);
|
|
216
|
-
await super.moveToColor(request);
|
|
217
|
-
}
|
|
218
|
-
async moveToColorTemperature(request) {
|
|
219
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
220
|
-
device.log.info(`Setting color temperature to ${request.colorTemperatureMireds} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
221
|
-
await device.commandHandler.executeHandler('ColorControl.moveToColorTemperature', {
|
|
222
|
-
command: 'moveToColorTemperature',
|
|
223
|
-
request,
|
|
224
|
-
cluster: ColorControlServer.id,
|
|
225
|
-
attributes: this.state,
|
|
226
|
-
endpoint: this.endpoint,
|
|
227
|
-
});
|
|
228
|
-
device.log.debug(`MatterbridgeColorControlServer: moveToColorTemperature called`);
|
|
229
|
-
await super.moveToColorTemperature(request);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
|
|
164
|
+
export class MatterbridgeColorControlServer extends ColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature, ColorControl.Feature.EnhancedHue) {
|
|
233
165
|
async moveToHue(request) {
|
|
234
166
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
235
167
|
device.log.info(`Setting hue to ${request.hue} with transitionTime ${request.transitionTime} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
@@ -322,6 +254,8 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
|
|
|
322
254
|
await super.moveToColorTemperature(request);
|
|
323
255
|
}
|
|
324
256
|
}
|
|
257
|
+
export class MatterbridgeEnhancedColorControlServer extends MatterbridgeColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
|
|
258
|
+
}
|
|
325
259
|
export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
|
|
326
260
|
lookupMovementStatus = ['Stopped', 'Opening', 'Closing', 'Unknown'];
|
|
327
261
|
async initialize() {
|
|
@@ -466,7 +400,7 @@ export class MatterbridgeFanControlServer extends FanControlServer.with(FanContr
|
|
|
466
400
|
device.log.debug('Set percentCurrent to:', this.state.percentCurrent);
|
|
467
401
|
}
|
|
468
402
|
}
|
|
469
|
-
export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
|
|
403
|
+
export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode, Thermostat.Feature.Presets) {
|
|
470
404
|
async initialize() {
|
|
471
405
|
await super.initialize();
|
|
472
406
|
this.endpoint.construction.onSuccess(async () => {
|
|
@@ -492,22 +426,6 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
|
|
|
492
426
|
device.log.debug(`MatterbridgeThermostatServer: setpointRaiseLower called with mode: ${lookupSetpointAdjustMode[request.mode]} amount: ${request.amount / 10}`);
|
|
493
427
|
await super.setpointRaiseLower(request);
|
|
494
428
|
}
|
|
495
|
-
}
|
|
496
|
-
export class MatterbridgePresetThermostatServer extends ThermostatServer.with(Thermostat.Feature.Presets, Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
|
|
497
|
-
async setpointRaiseLower(request) {
|
|
498
|
-
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
499
|
-
device.log.info(`Setting setpoint by ${request.amount} in mode ${request.mode} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
500
|
-
await device.commandHandler.executeHandler('Thermostat.setpointRaiseLower', {
|
|
501
|
-
command: 'setpointRaiseLower',
|
|
502
|
-
request,
|
|
503
|
-
cluster: ThermostatServer.id,
|
|
504
|
-
attributes: this.state,
|
|
505
|
-
endpoint: this.endpoint,
|
|
506
|
-
});
|
|
507
|
-
const lookupSetpointAdjustMode = ['Heat', 'Cool', 'Both'];
|
|
508
|
-
device.log.debug(`MatterbridgePresetThermostatServer: setpointRaiseLower called with mode: ${lookupSetpointAdjustMode[request.mode]} amount: ${request.amount / 10}`);
|
|
509
|
-
await super.setpointRaiseLower(request);
|
|
510
|
-
}
|
|
511
429
|
async setActivePresetRequest(request) {
|
|
512
430
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
513
431
|
const presetHandle = request.presetHandle ? `0x${Buffer.from(request.presetHandle).toString('hex')}` : 'null';
|
|
@@ -519,12 +437,14 @@ export class MatterbridgePresetThermostatServer extends ThermostatServer.with(Th
|
|
|
519
437
|
attributes: this.state,
|
|
520
438
|
endpoint: this.endpoint,
|
|
521
439
|
});
|
|
522
|
-
device.log.debug(`
|
|
440
|
+
device.log.debug(`MatterbridgeThermostatServer: setActivePresetRequest called with presetHandle: ${presetHandle}`);
|
|
523
441
|
await super.setActivePresetRequest(request);
|
|
524
442
|
const activePresetHandle = this.state.activePresetHandle ? `0x${Buffer.from(this.state.activePresetHandle).toString('hex')}` : 'null';
|
|
525
|
-
device.log.debug(`
|
|
443
|
+
device.log.debug(`MatterbridgeThermostatServer: setActivePresetRequest completed with activePresetHandle: ${activePresetHandle} occupiedHeatingSetpoint: ${this.state.occupiedHeatingSetpoint} occupiedCoolingSetpoint: ${this.state.occupiedCoolingSetpoint}`);
|
|
526
444
|
}
|
|
527
445
|
}
|
|
446
|
+
export class MatterbridgePresetThermostatServer extends ThermostatServer.with(Thermostat.Feature.Presets, Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
|
|
447
|
+
}
|
|
528
448
|
export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigurationAndControlServer.with(ValveConfigurationAndControl.Feature.Level) {
|
|
529
449
|
async open(request) {
|
|
530
450
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
@@ -676,7 +596,7 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
676
596
|
export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
677
597
|
async selectAreas(request) {
|
|
678
598
|
const device = this.endpoint.stateOf(MatterbridgeServer);
|
|
679
|
-
device.log.info(`Selecting areas ${request.newAreas} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
599
|
+
device.log.info(`Selecting areas [${request.newAreas.join(', ')}] (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
|
|
680
600
|
await device.commandHandler.executeHandler('ServiceArea.selectAreas', {
|
|
681
601
|
command: 'selectAreas',
|
|
682
602
|
request,
|
|
@@ -684,15 +604,7 @@ export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
|
684
604
|
attributes: this.state,
|
|
685
605
|
endpoint: this.endpoint,
|
|
686
606
|
});
|
|
687
|
-
|
|
688
|
-
const supportedArea = this.state.supportedAreas.find((supportedArea) => supportedArea.areaId === area);
|
|
689
|
-
if (!supportedArea) {
|
|
690
|
-
device.log.error(`MatterbridgeServiceAreaServer selectAreas called with unsupported area: ${area}`);
|
|
691
|
-
return { status: ServiceArea.SelectAreasStatus.UnsupportedArea, statusText: 'Unsupported areas' };
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
this.state.selectedAreas = request.newAreas;
|
|
695
|
-
device.log.debug(`MatterbridgeServiceAreaServer selectAreas called with: ${request.newAreas.map((area) => area.toString()).join(', ')}`);
|
|
607
|
+
device.log.debug(`MatterbridgeServiceAreaServer selectAreas called with: [${request.newAreas.join(', ')}]`);
|
|
696
608
|
return await super.selectAreas(request);
|
|
697
609
|
}
|
|
698
610
|
}
|
|
@@ -62,7 +62,7 @@ import { VendorId } from '@matter/types/datatype';
|
|
|
62
62
|
import { inspectError } from '@matterbridge/utils/error';
|
|
63
63
|
import { isValidNumber, isValidObject, isValidString } from '@matterbridge/utils/validate';
|
|
64
64
|
import { AnsiLogger, CYAN, db, debugStringify, hk, or, YELLOW, zb } from 'node-ansi-logger';
|
|
65
|
-
import { MatterbridgeActivatedCarbonFilterMonitoringServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeColorControlServer, MatterbridgeDeviceEnergyManagementModeServer, MatterbridgeDeviceEnergyManagementServer, MatterbridgeDoorLockServer,
|
|
65
|
+
import { MatterbridgeActivatedCarbonFilterMonitoringServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeColorControlServer, MatterbridgeDeviceEnergyManagementModeServer, MatterbridgeDeviceEnergyManagementServer, MatterbridgeDoorLockServer, MatterbridgeFanControlServer, MatterbridgeHepaFilterMonitoringServer, MatterbridgeIdentifyServer, MatterbridgeLevelControlServer, MatterbridgeModeSelectServer, MatterbridgeOnOffServer, MatterbridgeOperationalStateServer, MatterbridgePowerSourceServer, MatterbridgeServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeSwitchServer, MatterbridgeThermostatServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeWindowCoveringServer, } from './matterbridgeBehaviorsServer.js';
|
|
66
66
|
import { CommandHandler } from './matterbridgeEndpointCommandHandler.js';
|
|
67
67
|
import { addClusterServers, addFixedLabel, addOptionalClusterServers, addRequiredClusterServers, addUserLabel, checkNotLatinCharacters, createUniqueId, featuresFor, generateUniqueId, getApparentElectricalPowerMeasurementClusterServer, getAttribute, getAttributeId, getBehavior, getBehaviourTypesFromClusterClientIds, getBehaviourTypesFromClusterServerIds, getCluster, getClusterId, getDefaultDeviceEnergyManagementClusterServer, getDefaultDeviceEnergyManagementModeClusterServer, getDefaultElectricalEnergyMeasurementClusterServer, getDefaultElectricalPowerMeasurementClusterServer, getDefaultFlowMeasurementClusterServer, getDefaultIlluminanceMeasurementClusterServer, getDefaultOccupancySensingClusterServer, getDefaultOperationalStateClusterServer, getDefaultPowerSourceBatteryClusterServer, getDefaultPowerSourceRechargeableBatteryClusterServer, getDefaultPowerSourceReplaceableBatteryClusterServer, getDefaultPowerSourceWiredClusterServer, getDefaultPressureMeasurementClusterServer, getDefaultRelativeHumidityMeasurementClusterServer, getDefaultTemperatureMeasurementClusterServer, invokeBehaviorCommand, lowercaseFirstLetter, setAttribute, setCluster, subscribeAttribute, triggerEvent, updateAttribute, } from './matterbridgeEndpointHelpers.js';
|
|
68
68
|
const MATTERBRIDGE_ENDPOINT_BRAND = Symbol('MatterbridgeEndpoint.brand');
|
|
@@ -639,7 +639,7 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
639
639
|
return this;
|
|
640
640
|
}
|
|
641
641
|
createEnhancedColorControlClusterServer(currentX = 0, currentY = 0, enhancedCurrentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
|
|
642
|
-
this.behaviors.require(
|
|
642
|
+
this.behaviors.require(MatterbridgeColorControlServer.with(ColorControl.Feature.Xy, ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.ColorTemperature), {
|
|
643
643
|
colorMode: ColorControl.ColorMode.CurrentHueAndCurrentSaturation,
|
|
644
644
|
enhancedColorMode: ColorControl.EnhancedColorMode.EnhancedCurrentHueAndCurrentSaturation,
|
|
645
645
|
colorCapabilities: { xy: true, hueSaturation: true, colorLoop: false, enhancedHue: true, colorTemperature: true },
|
|
@@ -893,7 +893,7 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
893
893
|
return this;
|
|
894
894
|
}
|
|
895
895
|
createDefaultPresetsThermostatClusterServer(localTemperature = 23, occupiedHeatingSetpoint = 21, occupiedCoolingSetpoint = 25, minSetpointDeadBand = 0, minHeatSetpointLimit = 0, maxHeatSetpointLimit = 50, minCoolSetpointLimit = 0, maxCoolSetpointLimit = 50, unoccupiedHeatingSetpoint = undefined, unoccupiedCoolingSetpoint = undefined, occupied = undefined, outdoorTemperature = undefined, activePresetHandle = null, presetsList = undefined, presetTypes = undefined) {
|
|
896
|
-
this.behaviors.require(
|
|
896
|
+
this.behaviors.require(MatterbridgeThermostatServer.with(Thermostat.Feature.Heating, Thermostat.Feature.Cooling, Thermostat.Feature.AutoMode, ...(occupied !== undefined ? [Thermostat.Feature.Occupancy] : []), Thermostat.Feature.Presets), {
|
|
897
897
|
localTemperature: localTemperature * 100,
|
|
898
898
|
externalMeasuredIndoorTemperature: localTemperature * 100,
|
|
899
899
|
...(outdoorTemperature !== undefined ? { outdoorTemperature: outdoorTemperature !== null ? outdoorTemperature * 100 : outdoorTemperature } : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.7.1-dev-
|
|
3
|
+
"version": "3.7.1-dev-20260324-7b86640",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -122,14 +122,14 @@
|
|
|
122
122
|
],
|
|
123
123
|
"dependencies": {
|
|
124
124
|
"@matter/main": "0.16.10",
|
|
125
|
-
"@matterbridge/dgram": "3.7.1-dev-
|
|
126
|
-
"@matterbridge/thread": "3.7.1-dev-
|
|
127
|
-
"@matterbridge/types": "3.7.1-dev-
|
|
128
|
-
"@matterbridge/utils": "3.7.1-dev-
|
|
125
|
+
"@matterbridge/dgram": "3.7.1-dev-20260324-7b86640",
|
|
126
|
+
"@matterbridge/thread": "3.7.1-dev-20260324-7b86640",
|
|
127
|
+
"@matterbridge/types": "3.7.1-dev-20260324-7b86640",
|
|
128
|
+
"@matterbridge/utils": "3.7.1-dev-20260324-7b86640",
|
|
129
129
|
"express": "5.2.1",
|
|
130
130
|
"multer": "2.1.1",
|
|
131
131
|
"node-ansi-logger": "3.2.0",
|
|
132
132
|
"node-persist-manager": "2.0.1",
|
|
133
|
-
"ws": "8.
|
|
133
|
+
"ws": "8.20.0"
|
|
134
134
|
}
|
|
135
135
|
}
|