@matterbridge/core 3.7.0-dev-20260318-1de8eae → 3.7.0-dev-20260319-27468a0

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.
@@ -1219,7 +1219,7 @@ export class Matterbridge extends EventEmitter {
1219
1219
  catch {
1220
1220
  }
1221
1221
  }
1222
- if (hasParameter('reset-sessions') || !hasParameter('no-reset-sessions')) {
1222
+ if (hasParameter('reset-sessions')) {
1223
1223
  this.log.debug(`Cleaning matter storage context for ${GREEN}Matterbridge${db}...`);
1224
1224
  unlinkSafe(path.join(this.matterbridgeDirectory, MATTER_STORAGE_NAME, 'Matterbridge', 'sessions.resumptionRecords'), this.log);
1225
1225
  unlinkSafe(path.join(this.matterbridgeDirectory, MATTER_STORAGE_NAME, 'Matterbridge', 'root.subscriptions.subscriptions'), this.log);
@@ -19,7 +19,7 @@ import { SmokeCoAlarmServer } from '@matter/node/behaviors/smoke-co-alarm';
19
19
  import { SwitchServer } from '@matter/node/behaviors/switch';
20
20
  import { ThermostatServer } from '@matter/node/behaviors/thermostat';
21
21
  import { ValveConfigurationAndControlServer } from '@matter/node/behaviors/valve-configuration-and-control';
22
- import { MovementDirection, MovementType, WindowCoveringServer } from '@matter/node/behaviors/window-covering';
22
+ import { MovementDirection, MovementType, WindowCoveringBaseServer, WindowCoveringServer } from '@matter/node/behaviors/window-covering';
23
23
  import { ActivatedCarbonFilterMonitoring } from '@matter/types/clusters/activated-carbon-filter-monitoring';
24
24
  import { BooleanStateConfiguration } from '@matter/types/clusters/boolean-state-configuration';
25
25
  import { ColorControl } from '@matter/types/clusters/color-control';
@@ -856,7 +856,7 @@ export declare class MatterbridgeEnhancedColorControlServer extends Matterbridge
856
856
  moveToColor(request: ColorControl.MoveToColorRequest): Promise<void>;
857
857
  moveToColorTemperature(request: ColorControl.MoveToColorTemperatureRequest): Promise<void>;
858
858
  }
859
- declare const MatterbridgeLiftWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
859
+ declare const MatterbridgeWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
860
860
  readonly id: 258;
861
861
  readonly name: "WindowCovering";
862
862
  readonly revision: 6;
@@ -1043,15 +1043,19 @@ declare const MatterbridgeLiftWindowCoveringServer_base: import("@matter/node").
1043
1043
  };
1044
1044
  readonly component: false;
1045
1045
  }];
1046
- }>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift]>, typeof WindowCoveringServer, import("@matter/node/behaviors/window-covering").WindowCoveringInterface>;
1047
- export declare class MatterbridgeLiftWindowCoveringServer extends MatterbridgeLiftWindowCoveringServer_base {
1046
+ }>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt]>, typeof WindowCoveringServer, import("@matter/node/behaviors/window-covering").WindowCoveringInterface>;
1047
+ export declare class MatterbridgeWindowCoveringServer extends MatterbridgeWindowCoveringServer_base {
1048
+ protected internal: WindowCoveringBaseServer.Internal;
1049
+ lookupMovementStatus: string[];
1050
+ initialize(): Promise<void>;
1048
1051
  upOrOpen(): Promise<void>;
1049
1052
  downOrClose(): Promise<void>;
1050
1053
  stopMotion(): Promise<void>;
1051
1054
  goToLiftPercentage(request: WindowCovering.GoToLiftPercentageRequest): Promise<void>;
1055
+ goToTiltPercentage(request: WindowCovering.GoToTiltPercentageRequest): Promise<void>;
1052
1056
  handleMovement(type: MovementType, reversed: boolean, direction: MovementDirection, targetPercent100ths?: number): Promise<void>;
1053
1057
  }
1054
- declare const MatterbridgeLiftTiltWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
1058
+ declare const MatterbridgeLiftWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
1055
1059
  readonly id: 258;
1056
1060
  readonly name: "WindowCovering";
1057
1061
  readonly revision: 6;
@@ -1238,14 +1242,198 @@ declare const MatterbridgeLiftTiltWindowCoveringServer_base: import("@matter/nod
1238
1242
  };
1239
1243
  readonly component: false;
1240
1244
  }];
1241
- }>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt]>, typeof WindowCoveringServer, import("@matter/node/behaviors/window-covering").WindowCoveringInterface>;
1245
+ }>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt]>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift]>, typeof MatterbridgeWindowCoveringServer, import("@matter/node/behaviors/window-covering").WindowCoveringInterface>;
1246
+ export declare class MatterbridgeLiftWindowCoveringServer extends MatterbridgeLiftWindowCoveringServer_base {
1247
+ }
1248
+ declare const MatterbridgeLiftTiltWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
1249
+ readonly id: 258;
1250
+ readonly name: "WindowCovering";
1251
+ readonly revision: 6;
1252
+ readonly features: {
1253
+ readonly lift: import("@matter/types").BitFlag;
1254
+ readonly tilt: import("@matter/types").BitFlag;
1255
+ readonly positionAwareLift: import("@matter/types").BitFlag;
1256
+ readonly absolutePosition: import("@matter/types").BitFlag;
1257
+ readonly positionAwareTilt: import("@matter/types").BitFlag;
1258
+ };
1259
+ readonly attributes: {
1260
+ readonly type: import("@matter/types").FixedAttribute<WindowCovering.WindowCoveringType, any>;
1261
+ readonly configStatus: import("@matter/types").Attribute<import("@matter/types").TypeFromPartialBitSchema<{
1262
+ operational: import("@matter/types").BitFlag;
1263
+ onlineReserved: import("@matter/types").BitFlag;
1264
+ liftMovementReversed: import("@matter/types").BitFlag;
1265
+ liftPositionAware: import("@matter/types").BitFlag;
1266
+ tiltPositionAware: import("@matter/types").BitFlag;
1267
+ liftEncoderControlled: import("@matter/types").BitFlag;
1268
+ tiltEncoderControlled: import("@matter/types").BitFlag;
1269
+ }>, any>;
1270
+ readonly operationalStatus: import("@matter/types").Attribute<import("@matter/types").TypeFromPartialBitSchema<{
1271
+ global: import("@matter/types").BitFieldEnum<WindowCovering.MovementStatus>;
1272
+ lift: import("@matter/types").BitFieldEnum<WindowCovering.MovementStatus>;
1273
+ tilt: import("@matter/types").BitFieldEnum<WindowCovering.MovementStatus>;
1274
+ }>, any>;
1275
+ readonly endProductType: import("@matter/types").FixedAttribute<WindowCovering.EndProductType, any>;
1276
+ readonly mode: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
1277
+ motorDirectionReversed: import("@matter/types").BitFlag;
1278
+ calibrationMode: import("@matter/types").BitFlag;
1279
+ maintenanceMode: import("@matter/types").BitFlag;
1280
+ ledFeedback: import("@matter/types").BitFlag;
1281
+ }>, any>;
1282
+ readonly safetyStatus: import("@matter/types").OptionalAttribute<import("@matter/types").TypeFromPartialBitSchema<{
1283
+ remoteLockout: import("@matter/types").BitFlag;
1284
+ tamperDetection: import("@matter/types").BitFlag;
1285
+ failedCommunication: import("@matter/types").BitFlag;
1286
+ positionFailure: import("@matter/types").BitFlag;
1287
+ thermalProtection: import("@matter/types").BitFlag;
1288
+ obstacleDetected: import("@matter/types").BitFlag;
1289
+ power: import("@matter/types").BitFlag;
1290
+ stopInput: import("@matter/types").BitFlag;
1291
+ motorJammed: import("@matter/types").BitFlag;
1292
+ hardwareFailure: import("@matter/types").BitFlag;
1293
+ manualOperation: import("@matter/types").BitFlag;
1294
+ protection: import("@matter/types").BitFlag;
1295
+ }>, any>;
1296
+ };
1297
+ readonly commands: {
1298
+ readonly upOrOpen: import("@matter/types").Command<void, void, any>;
1299
+ readonly downOrClose: import("@matter/types").Command<void, void, any>;
1300
+ readonly stopMotion: import("@matter/types").Command<void, void, any>;
1301
+ };
1302
+ readonly extensions: readonly [{
1303
+ readonly flags: {
1304
+ readonly lift: true;
1305
+ readonly positionAwareLift: true;
1306
+ readonly absolutePosition: true;
1307
+ };
1308
+ readonly component: {
1309
+ readonly attributes: {
1310
+ readonly physicalClosedLimitLift: import("@matter/types").OptionalFixedAttribute<number, any>;
1311
+ readonly currentPositionLift: import("@matter/types").OptionalAttribute<number | null, any>;
1312
+ readonly installedOpenLimitLift: import("@matter/types").Attribute<number, any>;
1313
+ readonly installedClosedLimitLift: import("@matter/types").Attribute<number, any>;
1314
+ };
1315
+ };
1316
+ }, {
1317
+ readonly flags: {
1318
+ readonly tilt: true;
1319
+ readonly positionAwareTilt: true;
1320
+ readonly absolutePosition: true;
1321
+ };
1322
+ readonly component: {
1323
+ readonly attributes: {
1324
+ readonly physicalClosedLimitTilt: import("@matter/types").OptionalFixedAttribute<number, any>;
1325
+ readonly currentPositionTilt: import("@matter/types").OptionalAttribute<number | null, any>;
1326
+ readonly installedOpenLimitTilt: import("@matter/types").Attribute<number, any>;
1327
+ readonly installedClosedLimitTilt: import("@matter/types").Attribute<number, any>;
1328
+ };
1329
+ };
1330
+ }, {
1331
+ readonly flags: {
1332
+ readonly lift: true;
1333
+ };
1334
+ readonly component: {
1335
+ readonly attributes: {
1336
+ readonly numberOfActuationsLift: import("@matter/types").OptionalAttribute<number, any>;
1337
+ };
1338
+ readonly commands: {
1339
+ readonly goToLiftPercentage: import("@matter/types").OptionalCommand<import("@matter/types").TypeFromFields<{
1340
+ liftPercent100thsValue: import("@matter/types").FieldType<number>;
1341
+ }>, void, any>;
1342
+ };
1343
+ };
1344
+ }, {
1345
+ readonly flags: {
1346
+ readonly tilt: true;
1347
+ };
1348
+ readonly component: {
1349
+ readonly attributes: {
1350
+ readonly numberOfActuationsTilt: import("@matter/types").OptionalAttribute<number, any>;
1351
+ };
1352
+ readonly commands: {
1353
+ readonly goToTiltPercentage: import("@matter/types").OptionalCommand<import("@matter/types").TypeFromFields<{
1354
+ tiltPercent100thsValue: import("@matter/types").FieldType<number>;
1355
+ }>, void, any>;
1356
+ };
1357
+ };
1358
+ }, {
1359
+ readonly flags: {
1360
+ readonly lift: true;
1361
+ readonly positionAwareLift: true;
1362
+ };
1363
+ readonly component: {
1364
+ readonly attributes: {
1365
+ readonly currentPositionLiftPercentage: import("@matter/types").OptionalAttribute<number | null, any>;
1366
+ readonly targetPositionLiftPercent100ths: import("@matter/types").Attribute<number | null, any>;
1367
+ readonly currentPositionLiftPercent100ths: import("@matter/types").Attribute<number | null, any>;
1368
+ };
1369
+ readonly commands: {
1370
+ readonly goToLiftPercentage: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
1371
+ liftPercent100thsValue: import("@matter/types").FieldType<number>;
1372
+ }>, void, any>;
1373
+ };
1374
+ };
1375
+ }, {
1376
+ readonly flags: {
1377
+ readonly tilt: true;
1378
+ readonly positionAwareTilt: true;
1379
+ };
1380
+ readonly component: {
1381
+ readonly attributes: {
1382
+ readonly currentPositionTiltPercentage: import("@matter/types").OptionalAttribute<number | null, any>;
1383
+ readonly targetPositionTiltPercent100ths: import("@matter/types").Attribute<number | null, any>;
1384
+ readonly currentPositionTiltPercent100ths: import("@matter/types").Attribute<number | null, any>;
1385
+ };
1386
+ readonly commands: {
1387
+ readonly goToTiltPercentage: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
1388
+ tiltPercent100thsValue: import("@matter/types").FieldType<number>;
1389
+ }>, void, any>;
1390
+ };
1391
+ };
1392
+ }, {
1393
+ readonly flags: {
1394
+ readonly lift: true;
1395
+ readonly absolutePosition: true;
1396
+ };
1397
+ readonly component: {
1398
+ readonly commands: {
1399
+ readonly goToLiftValue: import("@matter/types").OptionalCommand<import("@matter/types").TypeFromFields<{
1400
+ liftValue: import("@matter/types").FieldType<number>;
1401
+ }>, void, any>;
1402
+ };
1403
+ };
1404
+ }, {
1405
+ readonly flags: {
1406
+ readonly tilt: true;
1407
+ readonly absolutePosition: true;
1408
+ };
1409
+ readonly component: {
1410
+ readonly commands: {
1411
+ readonly goToTiltValue: import("@matter/types").OptionalCommand<import("@matter/types").TypeFromFields<{
1412
+ tiltValue: import("@matter/types").FieldType<number>;
1413
+ }>, void, any>;
1414
+ };
1415
+ };
1416
+ }, {
1417
+ readonly flags: {
1418
+ readonly positionAwareLift: true;
1419
+ readonly lift: false;
1420
+ };
1421
+ readonly component: false;
1422
+ }, {
1423
+ readonly flags: {
1424
+ readonly positionAwareTilt: true;
1425
+ readonly tilt: false;
1426
+ };
1427
+ readonly component: false;
1428
+ }, {
1429
+ readonly flags: {
1430
+ readonly lift: false;
1431
+ readonly tilt: false;
1432
+ };
1433
+ readonly component: false;
1434
+ }];
1435
+ }>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt]>, readonly [WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt]>, typeof MatterbridgeWindowCoveringServer, import("@matter/node/behaviors/window-covering").WindowCoveringInterface>;
1242
1436
  export declare class MatterbridgeLiftTiltWindowCoveringServer extends MatterbridgeLiftTiltWindowCoveringServer_base {
1243
- upOrOpen(): Promise<void>;
1244
- downOrClose(): Promise<void>;
1245
- stopMotion(): Promise<void>;
1246
- goToLiftPercentage(request: WindowCovering.GoToLiftPercentageRequest): Promise<void>;
1247
- goToTiltPercentage(request: WindowCovering.GoToTiltPercentageRequest): Promise<void>;
1248
- handleMovement(type: MovementType, reversed: boolean, direction: MovementDirection, targetPercent100ths?: number): Promise<void>;
1249
1437
  }
1250
1438
  export declare class MatterbridgeDoorLockServer extends DoorLockServer {
1251
1439
  lockDoor(): Promise<void>;
@@ -1329,12 +1517,12 @@ declare const MatterbridgeThermostatServer_base: import("@matter/node").ClusterB
1329
1517
  }>, void, any>;
1330
1518
  readonly atomicRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
1331
1519
  requestType: import("@matter/types").FieldType<Thermostat.RequestType>;
1332
- attributeRequests: import("@matter/types").FieldType<import("@matter/types").AttributeId[]>;
1520
+ attributeRequests: import("@matter/types").FieldType<import("@matter/types/datatype").AttributeId[]>;
1333
1521
  timeout: import("@matter/types").OptionalFieldType<number>;
1334
1522
  }>, import("@matter/types").TypeFromFields<{
1335
1523
  statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
1336
1524
  attributeStatus: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
1337
- attributeId: import("@matter/types").FieldType<import("@matter/types").AttributeId>;
1525
+ attributeId: import("@matter/types").FieldType<import("@matter/types/datatype").AttributeId>;
1338
1526
  statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
1339
1527
  }>[]>;
1340
1528
  timeout: import("@matter/types").OptionalFieldType<number>;
@@ -1694,12 +1882,12 @@ declare const MatterbridgePresetThermostatServer_base: import("@matter/node").Cl
1694
1882
  }>, void, any>;
1695
1883
  readonly atomicRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
1696
1884
  requestType: import("@matter/types").FieldType<Thermostat.RequestType>;
1697
- attributeRequests: import("@matter/types").FieldType<import("@matter/types").AttributeId[]>;
1885
+ attributeRequests: import("@matter/types").FieldType<import("@matter/types/datatype").AttributeId[]>;
1698
1886
  timeout: import("@matter/types").OptionalFieldType<number>;
1699
1887
  }>, import("@matter/types").TypeFromFields<{
1700
1888
  statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
1701
1889
  attributeStatus: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
1702
- attributeId: import("@matter/types").FieldType<import("@matter/types").AttributeId>;
1890
+ attributeId: import("@matter/types").FieldType<import("@matter/types/datatype").AttributeId>;
1703
1891
  statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
1704
1892
  }>[]>;
1705
1893
  timeout: import("@matter/types").OptionalFieldType<number>;
@@ -77,7 +77,7 @@ export class MatterbridgeIdentifyServer extends IdentifyServer {
77
77
  endpoint: this.endpoint,
78
78
  });
79
79
  device.log.debug(`MatterbridgeIdentifyServer: identify called`);
80
- super.identify(request);
80
+ await super.identify(request);
81
81
  }
82
82
  async triggerEffect(request) {
83
83
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -90,7 +90,7 @@ export class MatterbridgeIdentifyServer extends IdentifyServer {
90
90
  endpoint: this.endpoint,
91
91
  });
92
92
  device.log.debug(`MatterbridgeIdentifyServer: triggerEffect called`);
93
- super.triggerEffect(request);
93
+ await super.triggerEffect(request);
94
94
  }
95
95
  }
96
96
  export class MatterbridgeOnOffServer extends OnOffServer {
@@ -105,7 +105,7 @@ export class MatterbridgeOnOffServer extends OnOffServer {
105
105
  endpoint: this.endpoint,
106
106
  });
107
107
  device.log.debug(`MatterbridgeOnOffServer: on called`);
108
- super.on();
108
+ await super.on();
109
109
  }
110
110
  async off() {
111
111
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -118,7 +118,7 @@ export class MatterbridgeOnOffServer extends OnOffServer {
118
118
  endpoint: this.endpoint,
119
119
  });
120
120
  device.log.debug(`MatterbridgeOnOffServer: off called`);
121
- super.off();
121
+ await super.off();
122
122
  }
123
123
  async toggle() {
124
124
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -131,7 +131,7 @@ export class MatterbridgeOnOffServer extends OnOffServer {
131
131
  endpoint: this.endpoint,
132
132
  });
133
133
  device.log.debug(`MatterbridgeOnOffServer: toggle called`);
134
- super.toggle();
134
+ await super.toggle();
135
135
  }
136
136
  }
137
137
  export class MatterbridgeLevelControlServer extends LevelControlServer {
@@ -146,7 +146,7 @@ export class MatterbridgeLevelControlServer extends LevelControlServer {
146
146
  endpoint: this.endpoint,
147
147
  });
148
148
  device.log.debug(`MatterbridgeLevelControlServer: moveToLevel called`);
149
- super.moveToLevel(request);
149
+ await super.moveToLevel(request);
150
150
  }
151
151
  async moveToLevelWithOnOff(request) {
152
152
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -159,7 +159,7 @@ export class MatterbridgeLevelControlServer extends LevelControlServer {
159
159
  endpoint: this.endpoint,
160
160
  });
161
161
  device.log.debug(`MatterbridgeLevelControlServer: moveToLevelWithOnOff called`);
162
- super.moveToLevelWithOnOff(request);
162
+ await super.moveToLevelWithOnOff(request);
163
163
  }
164
164
  }
165
165
  export class MatterbridgeColorControlServer extends ColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
@@ -174,7 +174,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
174
174
  endpoint: this.endpoint,
175
175
  });
176
176
  device.log.debug(`MatterbridgeColorControlServer: moveToHue called`);
177
- super.moveToHue(request);
177
+ await super.moveToHue(request);
178
178
  }
179
179
  async moveToSaturation(request) {
180
180
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -187,7 +187,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
187
187
  endpoint: this.endpoint,
188
188
  });
189
189
  device.log.debug(`MatterbridgeColorControlServer: moveToSaturation called`);
190
- super.moveToSaturation(request);
190
+ await super.moveToSaturation(request);
191
191
  }
192
192
  async moveToHueAndSaturation(request) {
193
193
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -200,7 +200,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
200
200
  endpoint: this.endpoint,
201
201
  });
202
202
  device.log.debug(`MatterbridgeColorControlServer: moveToHueAndSaturation called`);
203
- super.moveToHueAndSaturation(request);
203
+ await super.moveToHueAndSaturation(request);
204
204
  }
205
205
  async moveToColor(request) {
206
206
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -213,7 +213,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
213
213
  endpoint: this.endpoint,
214
214
  });
215
215
  device.log.debug(`MatterbridgeColorControlServer: moveToColor called`);
216
- super.moveToColor(request);
216
+ await super.moveToColor(request);
217
217
  }
218
218
  async moveToColorTemperature(request) {
219
219
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -226,7 +226,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
226
226
  endpoint: this.endpoint,
227
227
  });
228
228
  device.log.debug(`MatterbridgeColorControlServer: moveToColorTemperature called`);
229
- super.moveToColorTemperature(request);
229
+ await super.moveToColorTemperature(request);
230
230
  }
231
231
  }
232
232
  export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
@@ -241,7 +241,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
241
241
  endpoint: this.endpoint,
242
242
  });
243
243
  device.log.debug(`MatterbridgeColorControlServer: moveToHue called`);
244
- super.moveToHue(request);
244
+ await super.moveToHue(request);
245
245
  }
246
246
  async enhancedMoveToHue(request) {
247
247
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -254,7 +254,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
254
254
  endpoint: this.endpoint,
255
255
  });
256
256
  device.log.debug(`MatterbridgeColorControlServer: enhancedMoveToHue called`);
257
- super.enhancedMoveToHue(request);
257
+ await super.enhancedMoveToHue(request);
258
258
  }
259
259
  async moveToSaturation(request) {
260
260
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -267,7 +267,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
267
267
  endpoint: this.endpoint,
268
268
  });
269
269
  device.log.debug(`MatterbridgeColorControlServer: moveToSaturation called`);
270
- super.moveToSaturation(request);
270
+ await super.moveToSaturation(request);
271
271
  }
272
272
  async moveToHueAndSaturation(request) {
273
273
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -280,7 +280,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
280
280
  endpoint: this.endpoint,
281
281
  });
282
282
  device.log.debug(`MatterbridgeColorControlServer: moveToHueAndSaturation called`);
283
- super.moveToHueAndSaturation(request);
283
+ await super.moveToHueAndSaturation(request);
284
284
  }
285
285
  async enhancedMoveToHueAndSaturation(request) {
286
286
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -293,7 +293,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
293
293
  endpoint: this.endpoint,
294
294
  });
295
295
  device.log.debug(`MatterbridgeColorControlServer: enhancedMoveToHueAndSaturation called`);
296
- super.enhancedMoveToHueAndSaturation(request);
296
+ await super.enhancedMoveToHueAndSaturation(request);
297
297
  }
298
298
  async moveToColor(request) {
299
299
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -306,7 +306,7 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
306
306
  endpoint: this.endpoint,
307
307
  });
308
308
  device.log.debug(`MatterbridgeColorControlServer: moveToColor called`);
309
- super.moveToColor(request);
309
+ await super.moveToColor(request);
310
310
  }
311
311
  async moveToColorTemperature(request) {
312
312
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -319,10 +319,17 @@ export class MatterbridgeEnhancedColorControlServer extends ColorControlServer.w
319
319
  endpoint: this.endpoint,
320
320
  });
321
321
  device.log.debug(`MatterbridgeColorControlServer: moveToColorTemperature called`);
322
- super.moveToColorTemperature(request);
322
+ await super.moveToColorTemperature(request);
323
323
  }
324
324
  }
325
- export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift) {
325
+ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
326
+ lookupMovementStatus = ['Stopped', 'Opening', 'Closing', 'Unknown'];
327
+ async initialize() {
328
+ const device = this.endpoint.stateOf(MatterbridgeServer);
329
+ device.log.info(`Initializing MatterbridgeWindowCoveringServer (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
330
+ this.internal.disableOperationalModeHandling = true;
331
+ await super.initialize();
332
+ }
326
333
  async upOrOpen() {
327
334
  const device = this.endpoint.stateOf(MatterbridgeServer);
328
335
  device.log.info(`Opening cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
@@ -334,7 +341,8 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
334
341
  endpoint: this.endpoint,
335
342
  });
336
343
  device.log.debug(`MatterbridgeWindowCoveringServer: upOrOpen called`);
337
- super.upOrOpen();
344
+ await super.upOrOpen();
345
+ device.log.debug(`MatterbridgeWindowCoveringServer: upOrOpen result target ${this.state.targetPositionLiftPercent100ths} current ${this.state.currentPositionLiftPercent100ths} status global ${this.lookupMovementStatus[this.state.operationalStatus.global ?? 3]} lift ${this.lookupMovementStatus[this.state.operationalStatus.lift ?? 3]} tilt ${this.lookupMovementStatus[this.state.operationalStatus.tilt ?? 3]}`);
338
346
  }
339
347
  async downOrClose() {
340
348
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -347,7 +355,8 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
347
355
  endpoint: this.endpoint,
348
356
  });
349
357
  device.log.debug(`MatterbridgeWindowCoveringServer: downOrClose called`);
350
- super.downOrClose();
358
+ await super.downOrClose();
359
+ device.log.debug(`MatterbridgeWindowCoveringServer: downOrClose result target ${this.state.targetPositionLiftPercent100ths} current ${this.state.currentPositionLiftPercent100ths} status global ${this.lookupMovementStatus[this.state.operationalStatus.global ?? 3]} lift ${this.lookupMovementStatus[this.state.operationalStatus.lift ?? 3]} tilt ${this.lookupMovementStatus[this.state.operationalStatus.tilt ?? 3]}`);
351
360
  }
352
361
  async stopMotion() {
353
362
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -360,7 +369,8 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
360
369
  endpoint: this.endpoint,
361
370
  });
362
371
  device.log.debug(`MatterbridgeWindowCoveringServer: stopMotion called`);
363
- super.stopMotion();
372
+ await super.stopMotion();
373
+ device.log.debug(`MatterbridgeWindowCoveringServer: stopMotion result target ${this.state.targetPositionLiftPercent100ths} current ${this.state.currentPositionLiftPercent100ths} status global ${this.lookupMovementStatus[this.state.operationalStatus.global ?? 3]} lift ${this.lookupMovementStatus[this.state.operationalStatus.lift ?? 3]} tilt ${this.lookupMovementStatus[this.state.operationalStatus.tilt ?? 3]}`);
364
374
  }
365
375
  async goToLiftPercentage(request) {
366
376
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -373,63 +383,8 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
373
383
  endpoint: this.endpoint,
374
384
  });
375
385
  device.log.debug(`MatterbridgeWindowCoveringServer: goToLiftPercentage with ${request.liftPercent100thsValue}`);
376
- super.goToLiftPercentage(request);
377
- }
378
- async handleMovement(type, reversed, direction, targetPercent100ths) {
379
- }
380
- }
381
- export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
382
- async upOrOpen() {
383
- const device = this.endpoint.stateOf(MatterbridgeServer);
384
- device.log.info(`Opening cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
385
- await device.commandHandler.executeHandler('WindowCovering.upOrOpen', {
386
- command: 'upOrOpen',
387
- request: {},
388
- cluster: WindowCoveringServer.id,
389
- attributes: this.state,
390
- endpoint: this.endpoint,
391
- });
392
- device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: upOrOpen called`);
393
- super.upOrOpen();
394
- }
395
- async downOrClose() {
396
- const device = this.endpoint.stateOf(MatterbridgeServer);
397
- device.log.info(`Closing cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
398
- await device.commandHandler.executeHandler('WindowCovering.downOrClose', {
399
- command: 'downOrClose',
400
- request: {},
401
- cluster: WindowCoveringServer.id,
402
- attributes: this.state,
403
- endpoint: this.endpoint,
404
- });
405
- device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: downOrClose called`);
406
- super.downOrClose();
407
- }
408
- async stopMotion() {
409
- const device = this.endpoint.stateOf(MatterbridgeServer);
410
- device.log.info(`Stopping cover (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
411
- await device.commandHandler.executeHandler('WindowCovering.stopMotion', {
412
- command: 'stopMotion',
413
- request: {},
414
- cluster: WindowCoveringServer.id,
415
- attributes: this.state,
416
- endpoint: this.endpoint,
417
- });
418
- device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: stopMotion called`);
419
- super.stopMotion();
420
- }
421
- async goToLiftPercentage(request) {
422
- const device = this.endpoint.stateOf(MatterbridgeServer);
423
- device.log.info(`Setting cover lift percentage to ${request.liftPercent100thsValue} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
424
- await device.commandHandler.executeHandler('WindowCovering.goToLiftPercentage', {
425
- command: 'goToLiftPercentage',
426
- request,
427
- cluster: WindowCoveringServer.id,
428
- attributes: this.state,
429
- endpoint: this.endpoint,
430
- });
431
- device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToLiftPercentage with ${request.liftPercent100thsValue}`);
432
- super.goToLiftPercentage(request);
386
+ await super.goToLiftPercentage(request);
387
+ device.log.debug(`MatterbridgeWindowCoveringServer: goToLiftPercentage result target ${this.state.targetPositionLiftPercent100ths} current ${this.state.currentPositionLiftPercent100ths} status global ${this.lookupMovementStatus[this.state.operationalStatus.global ?? 3]} lift ${this.lookupMovementStatus[this.state.operationalStatus.lift ?? 3]} tilt ${this.lookupMovementStatus[this.state.operationalStatus.tilt ?? 3]}`);
433
388
  }
434
389
  async goToTiltPercentage(request) {
435
390
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -441,12 +396,17 @@ export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServ
441
396
  attributes: this.state,
442
397
  endpoint: this.endpoint,
443
398
  });
444
- device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToTiltPercentage with ${request.tiltPercent100thsValue}`);
445
- super.goToTiltPercentage(request);
399
+ device.log.debug(`MatterbridgeWindowCoveringServer: goToTiltPercentage with ${request.tiltPercent100thsValue}`);
400
+ await super.goToTiltPercentage(request);
401
+ device.log.debug(`MatterbridgeWindowCoveringServer: goToTiltPercentage result target ${this.state.targetPositionTiltPercent100ths} current ${this.state.currentPositionTiltPercent100ths} status global ${this.lookupMovementStatus[this.state.operationalStatus.global ?? 3]} lift ${this.lookupMovementStatus[this.state.operationalStatus.lift ?? 3]} tilt ${this.lookupMovementStatus[this.state.operationalStatus.tilt ?? 3]}`);
446
402
  }
447
403
  async handleMovement(type, reversed, direction, targetPercent100ths) {
448
404
  }
449
405
  }
406
+ export class MatterbridgeLiftWindowCoveringServer extends MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift) {
407
+ }
408
+ export class MatterbridgeLiftTiltWindowCoveringServer extends MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
409
+ }
450
410
  export class MatterbridgeDoorLockServer extends DoorLockServer {
451
411
  async lockDoor() {
452
412
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -459,7 +419,7 @@ export class MatterbridgeDoorLockServer extends DoorLockServer {
459
419
  endpoint: this.endpoint,
460
420
  });
461
421
  device.log.debug(`MatterbridgeDoorLockServer: lockDoor called`);
462
- super.lockDoor();
422
+ await super.lockDoor();
463
423
  }
464
424
  async unlockDoor() {
465
425
  const device = this.endpoint.stateOf(MatterbridgeServer);
@@ -472,7 +432,7 @@ export class MatterbridgeDoorLockServer extends DoorLockServer {
472
432
  endpoint: this.endpoint,
473
433
  });
474
434
  device.log.debug(`MatterbridgeDoorLockServer: unlockDoor called`);
475
- super.unlockDoor();
435
+ await super.unlockDoor();
476
436
  }
477
437
  }
478
438
  export class MatterbridgeFanControlServer extends FanControlServer.with(FanControl.Feature.Auto, FanControl.Feature.Step) {
@@ -748,7 +708,7 @@ export class MatterbridgeModeSelectServer extends ModeSelectServer {
748
708
  endpoint: this.endpoint,
749
709
  });
750
710
  device.log.debug(`MatterbridgeModeSelectServer: changeToMode called with mode: ${request.newMode}`);
751
- super.changeToMode(request);
711
+ await super.changeToMode(request);
752
712
  }
753
713
  }
754
714
  export class MatterbridgeHepaFilterMonitoringServer extends HepaFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition) {
@@ -839,6 +799,6 @@ export class MatterbridgeDeviceEnergyManagementModeServer extends DeviceEnergyMa
839
799
  });
840
800
  }
841
801
  device.log.debug(`MatterbridgeDeviceEnergyManagementModeServer changeToMode called with newMode ${request.newMode} => ${supported.label}`);
842
- return super.changeToMode(request);
802
+ return await super.changeToMode(request);
843
803
  }
844
804
  }
@@ -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, MatterbridgeEnhancedColorControlServer, MatterbridgeFanControlServer, MatterbridgeHepaFilterMonitoringServer, MatterbridgeIdentifyServer, MatterbridgeLevelControlServer, MatterbridgeLiftTiltWindowCoveringServer, MatterbridgeLiftWindowCoveringServer, MatterbridgeModeSelectServer, MatterbridgeOnOffServer, MatterbridgeOperationalStateServer, MatterbridgePowerSourceServer, MatterbridgePresetThermostatServer, MatterbridgeServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeSwitchServer, MatterbridgeThermostatServer, MatterbridgeValveConfigurationAndControlServer, } from './matterbridgeBehaviorsServer.js';
65
+ import { MatterbridgeActivatedCarbonFilterMonitoringServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeColorControlServer, MatterbridgeDeviceEnergyManagementModeServer, MatterbridgeDeviceEnergyManagementServer, MatterbridgeDoorLockServer, MatterbridgeEnhancedColorControlServer, MatterbridgeFanControlServer, MatterbridgeHepaFilterMonitoringServer, MatterbridgeIdentifyServer, MatterbridgeLevelControlServer, MatterbridgeModeSelectServer, MatterbridgeOnOffServer, MatterbridgeOperationalStateServer, MatterbridgePowerSourceServer, MatterbridgePresetThermostatServer, 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');
@@ -732,7 +732,7 @@ export class MatterbridgeEndpoint extends Endpoint {
732
732
  }
733
733
  }
734
734
  createDefaultWindowCoveringClusterServer(positionPercent100ths, type = WindowCovering.WindowCoveringType.Rollershade, endProductType = WindowCovering.EndProductType.RollerShade) {
735
- this.behaviors.require(MatterbridgeLiftWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift), {
735
+ this.behaviors.require(MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift), {
736
736
  type,
737
737
  numberOfActuationsLift: 0,
738
738
  configStatus: {
@@ -753,7 +753,7 @@ export class MatterbridgeEndpoint extends Endpoint {
753
753
  return this;
754
754
  }
755
755
  createDefaultLiftTiltWindowCoveringClusterServer(positionLiftPercent100ths, positionTiltPercent100ths, type = WindowCovering.WindowCoveringType.TiltBlindLift, endProductType = WindowCovering.EndProductType.InteriorBlind) {
756
- this.behaviors.require(MatterbridgeLiftTiltWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt), {
756
+ this.behaviors.require(MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt), {
757
757
  type,
758
758
  numberOfActuationsLift: 0,
759
759
  numberOfActuationsTilt: 0,