matterbridge-example-dynamic-platform 3.0.2-dev-20260808-db970b3 → 3.0.2-dev-20260808-eeaaae3

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
@@ -31,11 +31,12 @@ If you like this project and find it useful, please consider giving it a star on
31
31
 
32
32
  ### Breaking changes
33
33
 
34
- - [matterbridge]: Require matterbridge v.3.10.3 with matter v.1.6.0.
34
+ - [matterbridge]: Require matterbridge v.3.10.5 with matter v.1.6.0.
35
35
 
36
36
  ### Added
37
37
 
38
38
  - [chip]: Add chip-test toolchain agents instruction and chip-test runner.
39
+ - [chip]: Add `chipTests.json`/`chipTests.md` with the generic device basic composition, conformance and default warnings tests, and document known CHIP test suite gaps.
39
40
  - [frontend]: Add plugin-frontend agents instructions.
40
41
  - [platform]: Add `closureGarageDoor` device.
41
42
  - [platform]: Add `closureVenetianBlind` device with Lift and Tilt panels.
package/README.md CHANGED
@@ -100,6 +100,8 @@ It exposes 72 virtual devices:
100
100
 
101
101
  All these devices continuously change their state and position. The plugin also shows how to use all the command handlers (so you can control all the devices), how to subscribe to attributes, and how to trigger events.
102
102
 
103
+ All devices pass the generic Matter conformance test suite (`TC_DeviceBasicComposition.py`, `TC_DeviceConformance.py` and `TC_DefaultWarnings.py`) run via the CHIP test harness, with one known upstream test-suite gap for the Closure devices — see [chipTests.md](./chipTests.md) for details and how to run the suite against this plugin.
104
+
103
105
  If you want to write your own plugin, the easiest way to get started is to clone the [Matterbridge Plugin Template](https://github.com/Luligu/matterbridge-plugin-template). It has **Dev Container support for an instant development environment**, with all tools and extensions (like Node.js, npm, TypeScript, ESLint, Prettier, Jest, and Vitest) already loaded and configured.
104
106
 
105
107
  If you like this project and find it useful, please consider giving it a star on [GitHub](https://github.com/Luligu/matterbridge-example-dynamic-platform) and sponsoring it.
package/dist/module.js CHANGED
@@ -108,8 +108,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
108
108
  constructor(matterbridge, log, config) {
109
109
  super(matterbridge, log, config);
110
110
  this.config = config;
111
- if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.10.3')) {
112
- throw new Error(`This plugin requires Matterbridge version >= "3.10.3". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
111
+ if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.10.5')) {
112
+ throw new Error(`This plugin requires Matterbridge version >= "3.10.5". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
113
113
  }
114
114
  this.log.info('Initializing platform:', this.config.name);
115
115
  }
@@ -168,7 +168,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
168
168
  this.flow = await this.addDevice(this.flow);
169
169
  this.soil = new SoilSensor('Soil Sensor', 'SOI000067', { soilMoistureMeasuredValue: 45, temperatureMeasuredValue: 3500, batteryPowered: true });
170
170
  this.soil = await this.addDevice(this.soil);
171
- this.irrigation = new IrrigationSystem('Irrigation System', 'IRR000068', { singleZone: true, batteryPowered: true, flowMeasuredValue: 15 });
171
+ this.irrigation = new IrrigationSystem('Irrigation System', 'IRR000068', { batteryPowered: true, flowMeasuredValue: 15 }).addZone(CommonNumberTag.One);
172
172
  this.irrigation = (await this.addDevice(this.irrigation));
173
173
  this.irrigationSystem = new IrrigationSystem('Irrigation System 4 zones', 'IRR000069', { flowMeasuredValue: 60 })
174
174
  .addZone(CommonNumberTag.One)
@@ -217,8 +217,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
217
217
  this.closureVenetianBlind = new Closure('Venetian Blind', 'VEN000072', {
218
218
  tagList: [getSemtag(ClosureTag.Covering), getSemtag(ClosureCoveringTag.Venetian)],
219
219
  });
220
- const closureVenetianBlindLift = this.closureVenetianBlind.addPanel('Lift', [getSemtag(ClosurePanelTag.Lift)]);
221
- const closureVenetianBlindTilt = this.closureVenetianBlind.addPanel('Tilt', [getSemtag(ClosurePanelTag.Tilt)]);
220
+ const closureVenetianBlindLift = this.closureVenetianBlind.addPanel('Lift', [getSemtag(ClosurePanelTag.Lift)], 'lift');
221
+ const closureVenetianBlindTilt = this.closureVenetianBlind.addPanel('Tilt', [getSemtag(ClosurePanelTag.Tilt)], 'tilt');
222
222
  this.closureVenetianBlind = (await this.addDevice(this.closureVenetianBlind));
223
223
  const closurePanelTargetPercent = (position) => {
224
224
  if (position === ClosureControl.TargetPosition.MoveToFullyOpen)
@@ -325,9 +325,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
325
325
  this.switch = new MatterbridgeEndpoint([onOffLightSwitch, bridgedNode, powerSource], { id: 'Switch' }, this.config.debug)
326
326
  .createDefaultIdentifyClusterServer()
327
327
  .createDefaultBridgedDeviceBasicInformationClusterServer('Switch', 'SWI00010', 0xfff1, 'Matterbridge', 'Matterbridge Switch')
328
- .createDefaultOnOffClusterServer()
329
328
  .createDefaultPowerSourceWiredClusterServer()
330
329
  .addRequiredClusters();
330
+ if (process.env.MATTERBRIDGE_CHIP_TEST !== '1') {
331
+ this.switch.createDefaultOnOffClusterServer();
332
+ }
331
333
  this.switch = await this.addDevice(this.switch);
332
334
  this.switch?.addCommandHandler('identify', ({ request: { identifyTime } }) => {
333
335
  this.log.info(`Command identify called identifyTime:${identifyTime}`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.2-dev-20260808-db970b3",
3
+ "version": "3.0.2-dev-20260808-eeaaae3",
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-20260808-db970b3",
9
+ "version": "3.0.2-dev-20260808-eeaaae3",
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-20260808-db970b3",
3
+ "version": "3.0.2-dev-20260808-eeaaae3",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",