matterbridge-example-dynamic-platform 1.3.8-dev-20250801-bfd558c → 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 +2 -0
- package/dist/platform.js +17 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -28,10 +28,12 @@ If you like this project and find it useful, please consider giving it a star on
|
|
28
28
|
### Added
|
29
29
|
|
30
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.
|
31
32
|
|
32
33
|
### Changed
|
33
34
|
|
34
35
|
- [package]: Updated dependencies.
|
36
|
+
- [package]: Required matterbridge 3.2.3.
|
35
37
|
|
36
38
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
37
39
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
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.2.
|
77
|
-
throw new Error(`This plugin requires Matterbridge version >= "3.2.
|
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)
|
@@ -1044,14 +1046,22 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
1044
1046
|
this.dishwasher = await this.addDevice(this.dishwasher);
|
1045
1047
|
this.extractorHood = new ExtractorHood('Extractor Hood', 'EH1234567893');
|
1046
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));
|
1047
1059
|
const refrigeratorDevice = new Appliances(refrigerator, 'Refrigerator', 'RE9987654322');
|
1048
1060
|
refrigeratorDevice.addFixedLabel('composed', 'Refrigerator');
|
1049
1061
|
await this.addDevice(refrigeratorDevice);
|
1050
1062
|
const ovenDevice = new Appliances(oven, 'Oven', 'OV1298867891');
|
1051
1063
|
ovenDevice.addFixedLabel('composed', 'Oven');
|
1052
1064
|
await this.addDevice(ovenDevice);
|
1053
|
-
const microwaveOvenDevice = new Appliances(microwaveOven, 'Microwave Oven', 'MO1234567892');
|
1054
|
-
await this.addDevice(microwaveOvenDevice);
|
1055
1065
|
const cooktopDevice = new Appliances(cooktop, 'Cooktop', 'CT1255887894');
|
1056
1066
|
await this.addDevice(cooktopDevice);
|
1057
1067
|
}
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.3.8-dev-
|
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.8-dev-
|
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",
|
package/package.json
CHANGED