matterbridge-example-dynamic-platform 3.0.2-dev-20260813-d1bc6f7 → 3.0.2

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 CHANGED
@@ -29,7 +29,7 @@ If you like this project and find it useful, please consider giving it a star on
29
29
 
30
30
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
31
31
 
32
- ## [3.0.2] - Dev branch
32
+ ## [3.0.2] - 2026-08-14
33
33
 
34
34
  ### Breaking changes
35
35
 
@@ -38,12 +38,14 @@ If you like this project and find it useful, please consider giving it a star on
38
38
  ### Added
39
39
 
40
40
  - [chip]: Add chip-test toolchain agents instruction and chip-test runner.
41
- - [chip]: Add `chipTests.json`/`chipTests.md` with the generic device basic composition, conformance and default warnings tests, and document known CHIP test suite gaps.
41
+ - [chip]: Add `chipTests.json`/`chipTests.md` with the generic device basic composition, conformance and default warnings tests (all tests pass ✅). Document known CHIP test suite bugs.
42
+ - [chip]: Add `chipTests.json`/`chipTests.md` with the ClosureControl and ClosureDimension cluster tests (all tests pass ✅).
42
43
  - [frontend]: Add plugin-frontend agents instructions.
43
44
  - [platform]: Add `closureGarageDoor` device. Thanks Ludovic BOUÉ.
44
45
  - [platform]: Add `closureVenetianBlind` device with Lift and Tilt panels. Thanks Ludovic BOUÉ.
45
46
  - [platform]: Add a thermostat auto mode with schedules (Weekdays and Weekend schedules) including 2 sub endpoints with temperature and humidity sensors, using `createDefaultSchedulesThermostatClusterServer()`. Thanks Ludovic BOUÉ.
46
47
  - [thermostat]: Add a thermostat auto mode with thermostat suggestions (Comfort and Eco presets with a pre-seeded suggestion) including 2 sub endpoints with temperature and humidity sensors, using `createDefaultThermostatSuggestionsClusterServer()`. Thanks Ludovic BOUÉ.
48
+ - [devcontainer]: Bump `devcontainer` to v.1.2.0.
47
49
 
48
50
  ### Changed
49
51
 
package/dist/module.js CHANGED
@@ -201,18 +201,18 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
201
201
  const targetState = this.closureGarageDoor?.getAttribute(ClosureControl, 'overallTargetState');
202
202
  if (targetState === undefined || targetState === null || targetState.position === undefined || targetState.position === null)
203
203
  return;
204
- void this.closureGarageDoor?.setAttribute(ClosureControl, 'mainState', ClosureControl.MainState.Stopped, this.closureGarageDoor.log);
205
- void this.closureGarageDoor?.setAttribute(ClosureControl, 'countdownTime', 0, this.closureGarageDoor.log);
206
- void this.closureGarageDoor?.setAttribute(ClosureControl, 'overallCurrentState', {
204
+ void this.closureGarageDoor?.setState({
207
205
  position: closureTargetToCurrentPosition(targetState.position),
208
206
  latch: targetState.latch,
209
207
  speed: targetState.speed,
210
208
  secureState: targetState.position === ClosureControl.TargetPosition.MoveToFullyClosed && targetState.latch === true,
211
- }, this.closureGarageDoor.log);
209
+ }, targetState, ClosureControl.MainState.Stopped, 0, []);
210
+ void this.closureGarageDoor?.triggerMovementCompleted();
212
211
  }, 1000).unref();
213
212
  });
214
- this.closureGarageDoor?.addCommandHandler('ClosureControl.stop', () => {
213
+ this.closureGarageDoor?.addCommandHandler('ClosureControl.stop', ({ attributes }) => {
215
214
  this.closureGarageDoor?.log.info('Command stop called');
215
+ attributes.countdownTime = 0;
216
216
  clearTimeout(closureGarageDoorMoveTimeout);
217
217
  closureGarageDoorMoveTimeout = undefined;
218
218
  });
@@ -256,20 +256,16 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
256
256
  void this.closureVenetianBlind?.setAttribute(ClosureControl, 'overallCurrentState', { position: overallPosition, latch: liftCurrent.latch ?? true, speed: liftCurrent.speed, secureState: liftCurrent.position === 10000 && liftCurrent.latch === true }, this.closureVenetianBlind?.log);
257
257
  };
258
258
  const simulateClosurePanelReachingTarget = (panel) => {
259
- const pending = closurePanelReachTimeouts.get(panel);
260
- if (pending)
261
- clearTimeout(pending);
259
+ clearTimeout(closurePanelReachTimeouts.get(panel));
262
260
  const currentStateTimeout = setTimeout(() => {
263
261
  void (async () => {
264
- closurePanelReachTimeouts.delete(panel);
265
262
  const targetState = panel.getAttribute(ClosureDimension, 'targetState');
266
263
  if (targetState === undefined || targetState === null)
267
264
  return;
268
265
  await panel.setAttribute(ClosureDimension, 'currentState', targetState, panel.log);
269
266
  syncClosureVenetianBlindFromPanels();
270
267
  })();
271
- }, 1000);
272
- currentStateTimeout.unref();
268
+ }, 1000).unref();
273
269
  closurePanelReachTimeouts.set(panel, currentStateTimeout);
274
270
  };
275
271
  const moveClosurePanelTo = (panel, position, latch, speed) => {
@@ -303,6 +299,14 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
303
299
  };
304
300
  addClosurePanelSetTargetSimulation(closureVenetianBlindLift);
305
301
  addClosurePanelSetTargetSimulation(closureVenetianBlindTilt);
302
+ const addClosurePanelStepSimulation = (panel) => {
303
+ panel.addCommandHandler('ClosureDimension.step', ({ request: { direction, numberOfSteps, speed } }) => {
304
+ panel.log.info(`Command step called direction:${direction} numberOfSteps:${numberOfSteps} speed:${speed}`);
305
+ simulateClosurePanelReachingTarget(panel);
306
+ });
307
+ };
308
+ addClosurePanelStepSimulation(closureVenetianBlindLift);
309
+ addClosurePanelStepSimulation(closureVenetianBlindTilt);
306
310
  this.climate = new MatterbridgeEndpoint([bridgedNode, powerSource], { id: 'Climate' }, this.config.debug)
307
311
  .createDefaultBridgedDeviceBasicInformationClusterServer('Climate', 'CLI00008', 0xfff1, 'Matterbridge', 'Matterbridge Climate')
308
312
  .createDefaultPowerSourceReplaceableBatteryClusterServer(90, PowerSource.BatChargeLevel.Ok, 2990, '2 x AA', 2, PowerSource.BatReplaceability.UserReplaceable)
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.2-dev-20260813-d1bc6f7",
3
+ "version": "3.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-dynamic-platform",
9
- "version": "3.0.2-dev-20260813-d1bc6f7",
9
+ "version": "3.0.2",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.2-dev-20260813-d1bc6f7",
3
+ "version": "3.0.2",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",