matterbridge-example-dynamic-platform 1.3.2 → 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,36 @@ 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
+
41
+ ## [1.3.3] - 2025-07-20
42
+
43
+ ### Added
44
+
45
+ - [platform]: Add RVC supportedMaps attribute. Thanks Ludovic BOUÉ (#21).
46
+
47
+ ### Changed
48
+
49
+ - [package]: Updated dependencies.
50
+ - [package]: Required matterbridge 3.1.5.
51
+
52
+ <a href="https://www.buymeacoffee.com/luligugithub">
53
+ <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
54
+ </a>
55
+
26
56
  ## [1.3.2] - 2025-07-06
27
57
 
28
58
  ### Added
package/dist/platform.js CHANGED
@@ -1,8 +1,8 @@
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
- import { LocationTag, NumberTag, PositionTag } from 'matterbridge/matter';
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, } from 'matterbridge/matter/clusters';
4
+ import { AreaNamespaceTag, LocationTag, NumberTag, PositionTag } from 'matterbridge/matter';
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';
6
6
  import { Appliances } from './appliances.js';
7
7
  export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatform {
8
8
  switch;
@@ -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.2')) {
69
- throw new Error(`This plugin requires Matterbridge version >= "3.1.2". 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)
@@ -1000,7 +1002,54 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1000
1002
  else {
1001
1003
  this.latchingSwitch = undefined;
1002
1004
  }
1003
- const robot = new RoboticVacuumCleaner('Robot Vacuum', 'RVC1238777820', this.config.enableServerRvc === true ? 'server' : undefined);
1005
+ const robot = new RoboticVacuumCleaner('Robot Vacuum', 'RVC1238777820', this.config.enableServerRvc === true ? 'server' : undefined, 1, [
1006
+ { label: 'Idle', mode: 1, modeTags: [{ value: RvcRunMode.ModeTag.Idle }] },
1007
+ { label: 'Cleaning', mode: 2, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
1008
+ { label: 'Mapping', mode: 3, modeTags: [{ value: RvcRunMode.ModeTag.Mapping }] },
1009
+ { label: 'SpotCleaning', mode: 4, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }, { value: RvcRunMode.ModeTag.Max }] },
1010
+ ], 1, [
1011
+ { label: 'Vacuum', mode: 1, modeTags: [{ value: RvcCleanMode.ModeTag.Vacuum }] },
1012
+ { label: 'Mop', mode: 2, modeTags: [{ value: RvcCleanMode.ModeTag.Mop }] },
1013
+ { label: 'Clean', mode: 3, modeTags: [{ value: RvcCleanMode.ModeTag.DeepClean }] },
1014
+ ], null, null, undefined, undefined, [
1015
+ {
1016
+ areaId: 1,
1017
+ mapId: 1,
1018
+ areaInfo: { locationInfo: { locationName: 'Living', floorNumber: 0, areaType: AreaNamespaceTag.LivingRoom.tag }, landmarkInfo: null },
1019
+ },
1020
+ {
1021
+ areaId: 2,
1022
+ mapId: 2,
1023
+ areaInfo: { locationInfo: { locationName: 'Kitchen', floorNumber: 0, areaType: AreaNamespaceTag.Kitchen.tag }, landmarkInfo: null },
1024
+ },
1025
+ {
1026
+ areaId: 3,
1027
+ mapId: 3,
1028
+ areaInfo: { locationInfo: { locationName: 'Bedroom', floorNumber: 1, areaType: AreaNamespaceTag.Bedroom.tag }, landmarkInfo: null },
1029
+ },
1030
+ {
1031
+ areaId: 4,
1032
+ mapId: 4,
1033
+ areaInfo: { locationInfo: { locationName: 'Bathroom', floorNumber: 1, areaType: AreaNamespaceTag.Bathroom.tag }, landmarkInfo: null },
1034
+ },
1035
+ ], [], 1, [
1036
+ {
1037
+ mapId: 1,
1038
+ name: 'Ground floor',
1039
+ },
1040
+ {
1041
+ mapId: 2,
1042
+ name: 'First floor',
1043
+ },
1044
+ {
1045
+ mapId: 3,
1046
+ name: 'Bedroom',
1047
+ },
1048
+ {
1049
+ mapId: 4,
1050
+ name: 'Bathroom',
1051
+ },
1052
+ ]);
1004
1053
  if (this.config.enableServerRvc === true) {
1005
1054
  this.log.notice('RVC is in server mode');
1006
1055
  }
@@ -1056,11 +1105,17 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1056
1105
  await this.registerDevice(this.laundryDryer);
1057
1106
  this.bridgedDevices.set(this.laundryDryer.deviceName ?? '', this.laundryDryer);
1058
1107
  }
1059
- const dishwasherDevice = new Appliances(dishwasher, 'Dishwasher', 'DW0987654321');
1060
- this.setSelectDevice(dishwasherDevice.serialNumber ?? '', dishwasherDevice.deviceName ?? '', undefined, 'hub');
1061
- if (this.validateDevice(dishwasherDevice.deviceName ?? '')) {
1062
- await this.registerDevice(dishwasherDevice);
1063
- 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);
1064
1119
  }
1065
1120
  const refrigeratorDevice = new Appliances(refrigerator, 'Refrigerator', 'RE9987654322');
1066
1121
  refrigeratorDevice.addFixedLabel('composed', 'Refrigerator');
@@ -1082,12 +1137,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1082
1137
  await this.registerDevice(microwaveOvenDevice);
1083
1138
  this.bridgedDevices.set(microwaveOvenDevice.deviceName ?? '', microwaveOvenDevice);
1084
1139
  }
1085
- const extractorHoodDevice = new Appliances(extractorHood, 'Extractor Hood', 'EH1234567893');
1086
- this.setSelectDevice(extractorHoodDevice.serialNumber ?? '', extractorHoodDevice.deviceName ?? '', undefined, 'hub');
1087
- if (this.validateDevice(extractorHoodDevice.deviceName ?? '')) {
1088
- await this.registerDevice(extractorHoodDevice);
1089
- this.bridgedDevices.set(extractorHoodDevice.deviceName ?? '', extractorHoodDevice);
1090
- }
1091
1140
  const cooktopDevice = new Appliances(cooktop, 'Cooktop', 'CT1255887894');
1092
1141
  this.setSelectDevice(cooktopDevice.serialNumber ?? '', cooktopDevice.deviceName ?? '', undefined, 'hub');
1093
1142
  if (this.validateDevice(cooktopDevice.deviceName ?? '')) {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
3
  "type": "DynamicPlatform",
4
- "version": "1.1.7",
5
4
  "whiteList": [],
6
5
  "blackList": [],
7
6
  "useInterval": true,
8
- "debug": true,
7
+ "enableServerRvc": true,
8
+ "debug": false,
9
9
  "unregisterOnShutdown": false
10
10
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "1.3.2",
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.2",
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.2",
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",