matterbridge-example-dynamic-platform 1.3.7 → 1.3.8-dev-20250813-d4b5769
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 +16 -0
- package/dist/platform.js +20 -18
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -23,6 +23,22 @@ 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.8] - 2025-08-01
|
27
|
+
|
28
|
+
### Added
|
29
|
+
|
30
|
+
- [rvc]: Removed the supportedMaps workaround for the RVC maps. Thanks Ludovic BOUÉ (#25).
|
31
|
+
- [platform]: Added the new MicrowaveOven() and Oven() device classes from Matterbridge.
|
32
|
+
|
33
|
+
### Changed
|
34
|
+
|
35
|
+
- [package]: Updated dependencies.
|
36
|
+
- [package]: Required matterbridge 3.2.3.
|
37
|
+
|
38
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
39
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
40
|
+
</a>
|
41
|
+
|
26
42
|
## [1.3.7] - 2025-08-01
|
27
43
|
|
28
44
|
### Added
|
package/dist/platform.js
CHANGED
@@ -1,9 +1,9 @@
|
|
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,
|
2
|
-
import { RoboticVacuumCleaner, LaundryWasher, WaterHeater, Evse, SolarPower, BatteryStorage, LaundryDryer, HeatPump, Dishwasher, ExtractorHood } 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, oven, refrigerator, onOffMountedSwitch, dimmableMountedSwitch, extendedColorLight, } from 'matterbridge';
|
2
|
+
import { RoboticVacuumCleaner, LaundryWasher, WaterHeater, Evse, SolarPower, BatteryStorage, LaundryDryer, HeatPump, Dishwasher, ExtractorHood, MicrowaveOven, Oven, } from 'matterbridge/devices';
|
3
3
|
import { isValidBoolean, isValidNumber, isValidString } from 'matterbridge/utils';
|
4
4
|
import { debugStringify } from 'matterbridge/logger';
|
5
5
|
import { AreaNamespaceTag, LocationTag, NumberTag, PositionTag, SwitchesTag, UINT16_MAX, UINT32_MAX } from 'matterbridge/matter';
|
6
|
-
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, ConcentrationMeasurement, Descriptor, BridgedDeviceBasicInformation, } from 'matterbridge/matter/clusters';
|
6
|
+
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, ConcentrationMeasurement, Descriptor, BridgedDeviceBasicInformation, OvenMode, OperationalState, } from 'matterbridge/matter/clusters';
|
7
7
|
import { Appliances } from './appliances.js';
|
8
8
|
export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatform {
|
9
9
|
switch;
|
@@ -50,6 +50,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
50
50
|
solarPower;
|
51
51
|
batteryStorage;
|
52
52
|
heatPump;
|
53
|
+
microwaveOven;
|
54
|
+
oven;
|
53
55
|
switchInterval;
|
54
56
|
lightInterval;
|
55
57
|
outletInterval;
|
@@ -73,8 +75,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
73
75
|
fanDirectionLookup = ['Forward', 'Reverse'];
|
74
76
|
constructor(matterbridge, log, config) {
|
75
77
|
super(matterbridge, log, config);
|
76
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.
|
77
|
-
throw new Error(`This plugin requires Matterbridge version >= "3.
|
78
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.2.3')) {
|
79
|
+
throw new Error(`This plugin requires Matterbridge version >= "3.2.3". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
|
78
80
|
}
|
79
81
|
this.log.info('Initializing platform:', this.config.name);
|
80
82
|
if (config.whiteList === undefined)
|
@@ -994,17 +996,17 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
994
996
|
},
|
995
997
|
{
|
996
998
|
areaId: 2,
|
997
|
-
mapId:
|
999
|
+
mapId: 1,
|
998
1000
|
areaInfo: { locationInfo: { locationName: 'Kitchen', floorNumber: 0, areaType: AreaNamespaceTag.Kitchen.tag }, landmarkInfo: null },
|
999
1001
|
},
|
1000
1002
|
{
|
1001
1003
|
areaId: 3,
|
1002
|
-
mapId:
|
1004
|
+
mapId: 2,
|
1003
1005
|
areaInfo: { locationInfo: { locationName: 'Bedroom', floorNumber: 1, areaType: AreaNamespaceTag.Bedroom.tag }, landmarkInfo: null },
|
1004
1006
|
},
|
1005
1007
|
{
|
1006
1008
|
areaId: 4,
|
1007
|
-
mapId:
|
1009
|
+
mapId: 2,
|
1008
1010
|
areaInfo: { locationInfo: { locationName: 'Bathroom', floorNumber: 1, areaType: AreaNamespaceTag.Bathroom.tag }, landmarkInfo: null },
|
1009
1011
|
},
|
1010
1012
|
], [], 1, [
|
@@ -1016,14 +1018,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
1016
1018
|
mapId: 2,
|
1017
1019
|
name: 'First floor',
|
1018
1020
|
},
|
1019
|
-
{
|
1020
|
-
mapId: 3,
|
1021
|
-
name: 'Bedroom',
|
1022
|
-
},
|
1023
|
-
{
|
1024
|
-
mapId: 4,
|
1025
|
-
name: 'Bathroom',
|
1026
|
-
},
|
1027
1021
|
]);
|
1028
1022
|
if (this.config.enableServerRvc === true) {
|
1029
1023
|
this.log.notice('RVC is in server mode');
|
@@ -1052,14 +1046,22 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
1052
1046
|
this.dishwasher = await this.addDevice(this.dishwasher);
|
1053
1047
|
this.extractorHood = new ExtractorHood('Extractor Hood', 'EH1234567893');
|
1054
1048
|
this.extractorHood = await this.addDevice(this.extractorHood);
|
1049
|
+
this.microwaveOven = new MicrowaveOven('Microwave Oven', 'MO1234567893');
|
1050
|
+
this.microwaveOven = await this.addDevice(this.microwaveOven);
|
1051
|
+
this.oven = new Oven('Oven', 'OV1234567890');
|
1052
|
+
this.oven.addCabinet('Upper Cabinet', [{ mfgCode: null, namespaceId: PositionTag.Top.namespaceId, tag: PositionTag.Top.tag, label: PositionTag.Top.label }]);
|
1053
|
+
this.oven.addCabinet('Lower Cabinet', [{ mfgCode: null, namespaceId: PositionTag.Bottom.namespaceId, tag: PositionTag.Bottom.tag, label: PositionTag.Bottom.label }], 3, [
|
1054
|
+
{ label: 'Convection', mode: 1, modeTags: [{ value: OvenMode.ModeTag.Convection }] },
|
1055
|
+
{ label: 'Clean', mode: 2, modeTags: [{ value: OvenMode.ModeTag.Clean }] },
|
1056
|
+
{ label: 'Steam', mode: 3, modeTags: [{ value: OvenMode.ModeTag.Steam }] },
|
1057
|
+
], 2, ['180°', '190°', '200°'], OperationalState.OperationalStateEnum.Running, 1, ['pre-heating', 'pre-heated', 'cooling down']);
|
1058
|
+
this.oven = (await this.addDevice(this.oven));
|
1055
1059
|
const refrigeratorDevice = new Appliances(refrigerator, 'Refrigerator', 'RE9987654322');
|
1056
1060
|
refrigeratorDevice.addFixedLabel('composed', 'Refrigerator');
|
1057
1061
|
await this.addDevice(refrigeratorDevice);
|
1058
1062
|
const ovenDevice = new Appliances(oven, 'Oven', 'OV1298867891');
|
1059
1063
|
ovenDevice.addFixedLabel('composed', 'Oven');
|
1060
1064
|
await this.addDevice(ovenDevice);
|
1061
|
-
const microwaveOvenDevice = new Appliances(microwaveOven, 'Microwave Oven', 'MO1234567892');
|
1062
|
-
await this.addDevice(microwaveOvenDevice);
|
1063
1065
|
const cooktopDevice = new Appliances(cooktop, 'Cooktop', 'CT1255887894');
|
1064
1066
|
await this.addDevice(cooktopDevice);
|
1065
1067
|
}
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.8-dev-20250813-d4b5769",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
9
|
-
"version": "1.3.
|
9
|
+
"version": "1.3.8-dev-20250813-d4b5769",
|
10
10
|
"license": "Apache-2.0",
|
11
11
|
"dependencies": {
|
12
12
|
"node-ansi-logger": "3.1.1",
|