matterbridge-example-dynamic-platform 3.0.4-dev-20260908-8b4d88b → 3.0.4-dev-20260914-aab53d4

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
@@ -33,13 +33,14 @@ If you like this project and find it useful, please consider giving it a star on
33
33
 
34
34
  ### Breaking changes
35
35
 
36
- - [matterbridge]: Require matterbridge v.3.10.8 with matter v.1.6.0.
36
+ - [matterbridge]: Require matterbridge v.3.10.10 with matter v.1.6.0.
37
37
 
38
38
  ### Added
39
39
 
40
40
  - [platform]: Add `RfidLock` device: a door lock with the User, PinCredential, and RfidCredential (RID) features, testing the `numberOfRfidUsersSupported` parameter of `createUserPinDoorLockClusterServer()` (Matter 1.6.0 § 5.2.4). `SetCredential`, `GetCredentialStatus`, and `ClearCredential` already handle `DoorLock.CredentialType.Rfid` generically in `MatterbridgeDoorLockServer`, so no RFID-specific command handlers were needed for this device.
41
41
  - [Oven]/[Refrigerator]: Add a `TemperatureAlarm` example to the demo cabinets.
42
42
  - [devcontainer]: Upgrade the `Dev Container` to v.2.1.0, using the Node.js and Bun stack.
43
+ - [Momentary switch]: Report `productId` `0x8000` on the composed `Momentary switch` bridged device, so Home Assistant's `(vendorId, productId)` allowlist can match the `ha_entitylabel` FixedLabels on `switch4`/`switch5`/`switch6` (requires matterbridge's `createDefaultBridgedDeviceBasicInformationClusterServer()` optional `productId` parameter).
43
44
 
44
45
  ### Changed
45
46
 
package/dist/module.js CHANGED
@@ -99,13 +99,13 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
99
99
  constructor(matterbridge, log, config) {
100
100
  super(matterbridge, log, config);
101
101
  this.config = config;
102
- if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.10.8')) {
103
- throw new Error(`This plugin requires Matterbridge version >= "3.10.8". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
102
+ if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.10.10')) {
103
+ throw new Error(`This plugin requires Matterbridge version >= "3.10.10". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
104
104
  }
105
- this.log.info('Initializing platform:', this.config.name);
105
+ this.log.info(`Initializing platform ${this.config.name}...`);
106
106
  }
107
107
  async onStart(reason) {
108
- this.log.info('onStart called with reason:', reason ?? 'none');
108
+ this.log.info(`Starting platform ${this.config.name} with reason: ${reason ?? 'no reason provided'}...`);
109
109
  await this.ready;
110
110
  await this.clearSelect();
111
111
  this.door = new MatterbridgeEndpoint([contactSensor, bridgedNode, powerSource], { id: 'Door' }, this.config.debug)
@@ -674,28 +674,28 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
674
674
  id: 'Plug1',
675
675
  tagList: [getSemtag(CommonNumberTag.One)],
676
676
  })
677
- .createDefaultBridgedDeviceBasicInformationClusterServer('Plug 1', 'BOU00064-1', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
677
+ .createDefaultBridgedDeviceBasicInformationClusterServer('Plug TV', 'BOU00064-1', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
678
678
  .addRequiredClusterServers();
679
679
  this.smartBridgedOutlet
680
680
  .addChildDeviceTypeWithClusterServer('Plug 2', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
681
681
  id: 'Plug2',
682
682
  tagList: [getSemtag(CommonNumberTag.Two)],
683
683
  })
684
- .createDefaultBridgedDeviceBasicInformationClusterServer('Plug 2', 'BOU00064-2', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
684
+ .createDefaultBridgedDeviceBasicInformationClusterServer('Plug Speaker', 'BOU00064-2', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
685
685
  .addRequiredClusterServers();
686
686
  this.smartBridgedOutlet
687
687
  .addChildDeviceTypeWithClusterServer('Plug 3', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
688
688
  id: 'Plug3',
689
689
  tagList: [getSemtag(CommonNumberTag.Three)],
690
690
  })
691
- .createDefaultBridgedDeviceBasicInformationClusterServer('Plug 3', 'BOU00064-3', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
691
+ .createDefaultBridgedDeviceBasicInformationClusterServer('Plug Satellite', 'BOU00064-3', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
692
692
  .addRequiredClusterServers();
693
693
  this.smartBridgedOutlet
694
694
  .addChildDeviceTypeWithClusterServer('Plug 4', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
695
695
  id: 'Plug4',
696
696
  tagList: [getSemtag(CommonNumberTag.Four)],
697
697
  })
698
- .createDefaultBridgedDeviceBasicInformationClusterServer('Plug 4', 'BOU00064-4', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
698
+ .createDefaultBridgedDeviceBasicInformationClusterServer('Plug Netflix', 'BOU00064-4', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
699
699
  .addRequiredClusterServers();
700
700
  this.smartBridgedOutlet = await this.addDevice(this.smartBridgedOutlet);
701
701
  this.coverLift = new MatterbridgeEndpoint([windowCovering, bridgedNode, powerSource], { id: 'CoverLift' }, this.config.debug)
@@ -1527,7 +1527,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1527
1527
  .createDefaultTvocMeasurementClusterServer(100);
1528
1528
  this.airQuality = await this.addDevice(this.airQuality);
1529
1529
  this.momentarySwitch = new MatterbridgeEndpoint([bridgedNode, powerSource], { id: 'Momentary switch composed' }, this.config.debug)
1530
- .createDefaultBridgedDeviceBasicInformationClusterServer('Momentary switch', 'MOS00041', 0xfff1, 'Matterbridge', 'Matterbridge Momentary Switch')
1530
+ .createDefaultBridgedDeviceBasicInformationClusterServer('Momentary switch', 'MOS00041', 0xfff1, 'Matterbridge', 'Matterbridge Momentary Switch', 1, '1.0.0', 1, '1.0.0', 'Matter Bridged Endpoint', 'https://matterbridge.io', 1, 0x8000)
1531
1531
  .createDefaultPowerSourceReplaceableBatteryClusterServer(50, PowerSource.BatChargeLevel.Ok, 2900, 'CR2450', 1);
1532
1532
  fireAndForget(this.momentarySwitch.addFixedLabel('composed', 'Compound device'), this.log, `Failed to add fixed label`);
1533
1533
  this.momentarySwitch
@@ -1605,17 +1605,17 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1605
1605
  await switch4.addFixedLabel('room', 'Living Room');
1606
1606
  await switch4.addFixedLabel('switch', 'Switch 4');
1607
1607
  await switch4.addFixedLabel('button', 'Button 4');
1608
- await switch4.addFixedLabel('ha_entitylabel', 'DIY');
1608
+ await switch4.addFixedLabel('ha_entitylabel', 'Switch 4');
1609
1609
  await switch5.addFixedLabel('name', 'Switch 5');
1610
1610
  await switch5.addFixedLabel('room', 'Living Room');
1611
1611
  await switch5.addFixedLabel('switch', 'Switch 5');
1612
1612
  await switch5.addFixedLabel('button', 'Button 5');
1613
- await switch5.addFixedLabel('ha_entitylabel', 'DIY');
1613
+ await switch5.addFixedLabel('ha_entitylabel', 'Switch 5');
1614
1614
  await switch6.addFixedLabel('name', 'Switch 6');
1615
1615
  await switch6.addFixedLabel('room', 'Living Room');
1616
1616
  await switch6.addFixedLabel('switch', 'Switch 6');
1617
1617
  await switch6.addFixedLabel('button', 'Button 6');
1618
- await switch6.addFixedLabel('ha_entitylabel', 'DIY');
1618
+ await switch6.addFixedLabel('ha_entitylabel', 'Switch 6');
1619
1619
  }
1620
1620
  this.latchingSwitch = new MatterbridgeEndpoint([genericSwitch, bridgedNode, powerSource], { id: 'Latching switch' }, this.config.debug)
1621
1621
  .createDefaultBridgedDeviceBasicInformationClusterServer('Latching switch', 'LAS00042', 0xfff1, 'Matterbridge', 'Matterbridge LatchingSwitch')
@@ -1946,7 +1946,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1946
1946
  }
1947
1947
  async onConfigure() {
1948
1948
  await super.onConfigure();
1949
- this.log.info('onConfigure called');
1949
+ this.log.info(`Configuring platform ${this.config.name}...`);
1950
1950
  if (this.config.useInterval) {
1951
1951
  this.addInterval(async () => {
1952
1952
  this.log.info(`Appliances animation phase ${this.phase}`);
@@ -2629,7 +2629,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
2629
2629
  async onShutdown(reason) {
2630
2630
  this.clearIntervals();
2631
2631
  await super.onShutdown(reason);
2632
- this.log.info('onShutdown called with reason:', reason ?? 'none');
2632
+ this.log.info(`Shutting down platform ${this.config.name} with reason: ${reason ?? 'no reason provided'}...`);
2633
2633
  if (this.config.unregisterOnShutdown)
2634
2634
  await this.unregisterAllDevices(500);
2635
2635
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.4-dev-20260908-8b4d88b",
3
+ "version": "3.0.4-dev-20260914-aab53d4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-dynamic-platform",
9
- "version": "3.0.4-dev-20260908-8b4d88b",
9
+ "version": "3.0.4-dev-20260914-aab53d4",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.4-dev-20260908-8b4d88b",
3
+ "version": "3.0.4-dev-20260914-aab53d4",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",