matterbridge-example-dynamic-platform 1.3.3 → 1.3.4-dev-20250720-e338589

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
@@ -23,6 +23,21 @@ If you like this project and find it useful, please consider giving it a star on
23
23
  <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
24
24
  </a>
25
25
 
26
+ ## [1.3.4] - 2025-07-22
27
+
28
+ ### Added
29
+
30
+ - [platform]: Changed to the new ExtratorHood() and Dishwasher() from Matterbridge.
31
+
32
+ ### Changed
33
+
34
+ - [package]: Updated dependencies.
35
+ - [package]: Required matterbridge 3.1.6.
36
+
37
+ <a href="https://www.buymeacoffee.com/luligugithub">
38
+ <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
39
+ </a>
40
+
26
41
  ## [1.3.3] - 2025-07-20
27
42
 
28
43
  ### Added
package/dist/platform.js CHANGED
@@ -1,5 +1,5 @@
1
- import { MatterbridgeEndpoint, MatterbridgeDynamicPlatform, airQualitySensor, bridgedNode, colorTemperatureLight, coverDevice, dimmableLight, doorLockDevice, fanDevice, flowSensor, humiditySensor, onOffLight, onOffOutlet, onOffSwitch, powerSource, rainSensor, smokeCoAlarm, temperatureSensor, thermostatDevice, waterFreezeDetector, waterLeakDetector, airPurifier, pumpDevice, waterValve, genericSwitch, airConditioner, cooktop, extractorHood, microwaveOven, oven, refrigerator, dishwasher, onOffMountedSwitch, dimmableMountedSwitch, extendedColorLight, } from 'matterbridge';
2
- import { RoboticVacuumCleaner, LaundryWasher, WaterHeater, Evse, SolarPower, BatteryStorage, LaundryDryer, HeatPump } from 'matterbridge/devices';
1
+ import { MatterbridgeEndpoint, MatterbridgeDynamicPlatform, airQualitySensor, bridgedNode, colorTemperatureLight, coverDevice, dimmableLight, doorLockDevice, fanDevice, flowSensor, humiditySensor, onOffLight, onOffOutlet, onOffSwitch, powerSource, rainSensor, smokeCoAlarm, temperatureSensor, thermostatDevice, waterFreezeDetector, waterLeakDetector, airPurifier, pumpDevice, waterValve, genericSwitch, airConditioner, cooktop, microwaveOven, oven, refrigerator, onOffMountedSwitch, dimmableMountedSwitch, extendedColorLight, } from 'matterbridge';
2
+ import { RoboticVacuumCleaner, LaundryWasher, WaterHeater, Evse, SolarPower, BatteryStorage, LaundryDryer, HeatPump, Dishwasher, ExtractorHood } from 'matterbridge/devices';
3
3
  import { isValidBoolean, isValidNumber } from 'matterbridge/utils';
4
4
  import { AreaNamespaceTag, LocationTag, NumberTag, PositionTag } from 'matterbridge/matter';
5
5
  import { PowerSource, BooleanState, OnOff, LevelControl, AirQuality, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, FlowMeasurement, ColorControl, DoorLock, FanControl, FormaldehydeConcentrationMeasurement, NitrogenDioxideConcentrationMeasurement, OzoneConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm25ConcentrationMeasurement, RadonConcentrationMeasurement, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, SmokeCoAlarm, TemperatureMeasurement, Thermostat, ThermostatCluster, TotalVolatileOrganicCompoundsConcentrationMeasurement, WindowCovering, EnergyEvseMode, EnergyEvse, RvcRunMode, RvcCleanMode, } from 'matterbridge/matter/clusters';
@@ -40,6 +40,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
40
40
  evse;
41
41
  laundryWasher;
42
42
  laundryDryer;
43
+ dishwasher;
44
+ extractorHood;
43
45
  solarPower;
44
46
  batteryStorage;
45
47
  heatPump;
@@ -65,8 +67,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
65
67
  fanModeLookup = ['Off', 'Low', 'Medium', 'High', 'On', 'Auto', 'Smart'];
66
68
  constructor(matterbridge, log, config) {
67
69
  super(matterbridge, log, config);
68
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.1.5')) {
69
- throw new Error(`This plugin requires Matterbridge version >= "3.1.5". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
70
+ if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.1.6')) {
71
+ throw new Error(`This plugin requires Matterbridge version >= "3.1.6". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
70
72
  }
71
73
  this.log.info('Initializing platform:', this.config.name);
72
74
  if (config.whiteList === undefined)
@@ -1103,11 +1105,17 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1103
1105
  await this.registerDevice(this.laundryDryer);
1104
1106
  this.bridgedDevices.set(this.laundryDryer.deviceName ?? '', this.laundryDryer);
1105
1107
  }
1106
- const dishwasherDevice = new Appliances(dishwasher, 'Dishwasher', 'DW0987654321');
1107
- this.setSelectDevice(dishwasherDevice.serialNumber ?? '', dishwasherDevice.deviceName ?? '', undefined, 'hub');
1108
- if (this.validateDevice(dishwasherDevice.deviceName ?? '')) {
1109
- await this.registerDevice(dishwasherDevice);
1110
- this.bridgedDevices.set(dishwasherDevice.deviceName ?? '', dishwasherDevice);
1108
+ this.dishwasher = new Dishwasher('Dishwasher', 'DW1234567890');
1109
+ this.setSelectDevice(this.dishwasher.serialNumber ?? '', this.dishwasher.deviceName ?? '', undefined, 'hub');
1110
+ if (this.validateDevice(this.dishwasher.deviceName ?? '')) {
1111
+ await this.registerDevice(this.dishwasher);
1112
+ this.bridgedDevices.set(this.dishwasher.deviceName ?? '', this.dishwasher);
1113
+ }
1114
+ this.extractorHood = new ExtractorHood('Extractor Hood', 'EH1234567893');
1115
+ this.setSelectDevice(this.extractorHood.serialNumber ?? '', this.extractorHood.deviceName ?? '', undefined, 'hub');
1116
+ if (this.validateDevice(this.extractorHood.deviceName ?? '')) {
1117
+ await this.registerDevice(this.extractorHood);
1118
+ this.bridgedDevices.set(this.extractorHood.deviceName ?? '', this.extractorHood);
1111
1119
  }
1112
1120
  const refrigeratorDevice = new Appliances(refrigerator, 'Refrigerator', 'RE9987654322');
1113
1121
  refrigeratorDevice.addFixedLabel('composed', 'Refrigerator');
@@ -1129,12 +1137,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1129
1137
  await this.registerDevice(microwaveOvenDevice);
1130
1138
  this.bridgedDevices.set(microwaveOvenDevice.deviceName ?? '', microwaveOvenDevice);
1131
1139
  }
1132
- const extractorHoodDevice = new Appliances(extractorHood, 'Extractor Hood', 'EH1234567893');
1133
- this.setSelectDevice(extractorHoodDevice.serialNumber ?? '', extractorHoodDevice.deviceName ?? '', undefined, 'hub');
1134
- if (this.validateDevice(extractorHoodDevice.deviceName ?? '')) {
1135
- await this.registerDevice(extractorHoodDevice);
1136
- this.bridgedDevices.set(extractorHoodDevice.deviceName ?? '', extractorHoodDevice);
1137
- }
1138
1140
  const cooktopDevice = new Appliances(cooktop, 'Cooktop', 'CT1255887894');
1139
1141
  this.setSelectDevice(cooktopDevice.serialNumber ?? '', cooktopDevice.deviceName ?? '', undefined, 'hub');
1140
1142
  if (this.validateDevice(cooktopDevice.deviceName ?? '')) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "1.3.3",
3
+ "version": "1.3.4-dev-20250720-e338589",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-dynamic-platform",
9
- "version": "1.3.3",
9
+ "version": "1.3.4-dev-20250720-e338589",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "1.3.3",
3
+ "version": "1.3.4-dev-20250720-e338589",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",