matterbridge-example-dynamic-platform 3.0.1-dev-20260713-46db965 → 3.0.1
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 +1 -1
- package/dist/module.js +61 -61
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -28,7 +28,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
28
28
|
|
|
29
29
|
<a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
|
|
30
30
|
|
|
31
|
-
## [3.0.1] -
|
|
31
|
+
## [3.0.1] - 2026-07-17
|
|
32
32
|
|
|
33
33
|
### Changed
|
|
34
34
|
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { aggregator, airPurifier, airQualitySensor, bridgedNode, colorTemperatureLight, contactSensor, windowCovering, dimmableLight, mountedDimmableLoadControl, dimmablePlugInUnit, doorLock, electricalSensor, extendedColorLight, fan, flowSensor, genericSwitch, getSemtag, humiditySensor, lightSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, modeSelect, occupancySensor, onOffLight, mountedOnOffControl, onOffPlugInUnit, onOffLightSwitch, powerSource, pressureSensor, pump, rainSensor, smokeCoAlarm, temperatureSensor, thermostat, waterFreezeDetector, waterLeakDetector, waterValve, } from 'matterbridge';
|
|
2
2
|
import { AirConditioner, BasicVideoPlayer, BatteryStorage, Cooktop, Dishwasher, Evse, ExtractorHood, HeatPump, IrrigationSystem, LaundryDryer, LaundryWasher, MicrowaveOven, Oven, Refrigerator, RoboticVacuumCleaner, SoilSensor, SolarPower, Speaker, WaterHeater, } from 'matterbridge/devices';
|
|
3
3
|
import { debugStringify } from 'matterbridge/logger';
|
|
4
|
-
import {
|
|
4
|
+
import { CommonAreaNamespaceTag, CommonLocationTag, CommonNumberTag, CommonPositionTag, RefrigeratorTag, SwitchesTag, UINT16_MAX, UINT32_MAX } from 'matterbridge/matter';
|
|
5
5
|
import { AirQuality, BooleanState, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, ColorControl, Descriptor, DeviceEnergyManagement, DoorLock, ElectricalEnergyMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, FanControl, FlowMeasurement, FormaldehydeConcentrationMeasurement, Identify, IlluminanceMeasurement, LevelControl, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OperationalState, OvenMode, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PressureMeasurement, RadonConcentrationMeasurement, RelativeHumidityMeasurement, RvcCleanMode, RvcOperationalState, RvcRunMode, SmokeCoAlarm, TemperatureMeasurement, Thermostat, TotalVolatileOrganicCompoundsConcentrationMeasurement, WindowCovering, } from 'matterbridge/matter/clusters';
|
|
6
6
|
import { fireAndForget, getEnumDescription, isValidBoolean, isValidNumber, isValidObject, isValidString } from 'matterbridge/utils';
|
|
7
7
|
function luxToMatter(lux) {
|
|
@@ -169,10 +169,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
169
169
|
this.irrigation = new IrrigationSystem('Irrigation System', 'IRR000068', { singleZone: true, batteryPowered: true, flowMeasuredValue: 15 });
|
|
170
170
|
this.irrigation = (await this.addDevice(this.irrigation));
|
|
171
171
|
this.irrigationSystem = new IrrigationSystem('Irrigation System 4 zones', 'IRR000069', { flowMeasuredValue: 60 })
|
|
172
|
-
.addZone(
|
|
173
|
-
.addZone(
|
|
174
|
-
.addZone(
|
|
175
|
-
.addZone(
|
|
172
|
+
.addZone(CommonNumberTag.One)
|
|
173
|
+
.addZone(CommonNumberTag.Two)
|
|
174
|
+
.addZone(CommonNumberTag.Three)
|
|
175
|
+
.addZone(CommonNumberTag.Four);
|
|
176
176
|
this.irrigationSystem = (await this.addDevice(this.irrigationSystem));
|
|
177
177
|
this.climate = new MatterbridgeEndpoint([bridgedNode, powerSource], { id: 'Climate' }, this.config.debug)
|
|
178
178
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Climate', 'CLI00008', 0xfff1, 'Matterbridge', 'Matterbridge Climate')
|
|
@@ -522,25 +522,25 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
522
522
|
this.smartOutlet
|
|
523
523
|
.addChildDeviceTypeWithClusterServer('Socket 1', onOffPlugInUnit, [OnOff.id], {
|
|
524
524
|
id: 'Socket1',
|
|
525
|
-
tagList: [getSemtag(
|
|
525
|
+
tagList: [getSemtag(CommonNumberTag.One)],
|
|
526
526
|
})
|
|
527
527
|
.addRequiredClusterServers();
|
|
528
528
|
this.smartOutlet
|
|
529
529
|
.addChildDeviceTypeWithClusterServer('Socket 2', onOffPlugInUnit, [OnOff.id], {
|
|
530
530
|
id: 'Socket2',
|
|
531
|
-
tagList: [getSemtag(
|
|
531
|
+
tagList: [getSemtag(CommonNumberTag.Two)],
|
|
532
532
|
})
|
|
533
533
|
.addRequiredClusterServers();
|
|
534
534
|
this.smartOutlet
|
|
535
535
|
.addChildDeviceTypeWithClusterServer('Socket 3', onOffPlugInUnit, [OnOff.id], {
|
|
536
536
|
id: 'Socket3',
|
|
537
|
-
tagList: [getSemtag(
|
|
537
|
+
tagList: [getSemtag(CommonNumberTag.Three)],
|
|
538
538
|
})
|
|
539
539
|
.addRequiredClusterServers();
|
|
540
540
|
this.smartOutlet
|
|
541
541
|
.addChildDeviceTypeWithClusterServer('Socket 4', onOffPlugInUnit, [OnOff.id], {
|
|
542
542
|
id: 'Socket4',
|
|
543
|
-
tagList: [getSemtag(
|
|
543
|
+
tagList: [getSemtag(CommonNumberTag.Four)],
|
|
544
544
|
})
|
|
545
545
|
.addRequiredClusterServers();
|
|
546
546
|
this.smartOutlet = await this.addDevice(this.smartOutlet);
|
|
@@ -552,28 +552,28 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
552
552
|
this.smartBridgedOutlet
|
|
553
553
|
.addChildDeviceTypeWithClusterServer('Plug 1', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
|
|
554
554
|
id: 'Plug1',
|
|
555
|
-
tagList: [getSemtag(
|
|
555
|
+
tagList: [getSemtag(CommonNumberTag.One)],
|
|
556
556
|
})
|
|
557
557
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Plug 1', 'BOU00064-1', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
|
|
558
558
|
.addRequiredClusterServers();
|
|
559
559
|
this.smartBridgedOutlet
|
|
560
560
|
.addChildDeviceTypeWithClusterServer('Plug 2', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
|
|
561
561
|
id: 'Plug2',
|
|
562
|
-
tagList: [getSemtag(
|
|
562
|
+
tagList: [getSemtag(CommonNumberTag.Two)],
|
|
563
563
|
})
|
|
564
564
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Plug 2', 'BOU00064-2', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
|
|
565
565
|
.addRequiredClusterServers();
|
|
566
566
|
this.smartBridgedOutlet
|
|
567
567
|
.addChildDeviceTypeWithClusterServer('Plug 3', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
|
|
568
568
|
id: 'Plug3',
|
|
569
|
-
tagList: [getSemtag(
|
|
569
|
+
tagList: [getSemtag(CommonNumberTag.Three)],
|
|
570
570
|
})
|
|
571
571
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Plug 3', 'BOU00064-3', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
|
|
572
572
|
.addRequiredClusterServers();
|
|
573
573
|
this.smartBridgedOutlet
|
|
574
574
|
.addChildDeviceTypeWithClusterServer('Plug 4', [onOffPlugInUnit, bridgedNode], [OnOff.id], {
|
|
575
575
|
id: 'Plug4',
|
|
576
|
-
tagList: [getSemtag(
|
|
576
|
+
tagList: [getSemtag(CommonNumberTag.Four)],
|
|
577
577
|
})
|
|
578
578
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Plug 4', 'BOU00064-4', 0xfff1, 'Matterbridge', 'Matterbridge Bridged Outlet')
|
|
579
579
|
.addRequiredClusterServers();
|
|
@@ -957,8 +957,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
957
957
|
this.thermoHeat
|
|
958
958
|
.addChildDeviceType('TemperatureIN', [temperatureSensor], {
|
|
959
959
|
tagList: [
|
|
960
|
-
{ mfgCode: null, namespaceId:
|
|
961
|
-
{ mfgCode: null, namespaceId:
|
|
960
|
+
{ mfgCode: null, namespaceId: CommonLocationTag.Indoor.namespaceId, tag: CommonLocationTag.Indoor.tag, label: null },
|
|
961
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.One.namespaceId, tag: CommonNumberTag.One.tag, label: null },
|
|
962
962
|
],
|
|
963
963
|
})
|
|
964
964
|
.createDefaultIdentifyClusterServer()
|
|
@@ -966,8 +966,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
966
966
|
this.thermoHeat
|
|
967
967
|
.addChildDeviceType('TemperatureOUT', [temperatureSensor], {
|
|
968
968
|
tagList: [
|
|
969
|
-
{ mfgCode: null, namespaceId:
|
|
970
|
-
{ mfgCode: null, namespaceId:
|
|
969
|
+
{ mfgCode: null, namespaceId: CommonLocationTag.Outdoor.namespaceId, tag: CommonLocationTag.Outdoor.tag, label: null },
|
|
970
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Two.namespaceId, tag: CommonNumberTag.Two.tag, label: null },
|
|
971
971
|
],
|
|
972
972
|
})
|
|
973
973
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1358,10 +1358,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1358
1358
|
this.momentarySwitch
|
|
1359
1359
|
.addChildDeviceType('Momentary switch 1', [genericSwitch], {
|
|
1360
1360
|
tagList: [
|
|
1361
|
-
{ mfgCode: null, namespaceId:
|
|
1362
|
-
{ mfgCode: null, namespaceId:
|
|
1363
|
-
{ mfgCode: null, namespaceId:
|
|
1364
|
-
{ mfgCode: null, namespaceId:
|
|
1361
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.One.namespaceId, tag: CommonNumberTag.One.tag, label: null },
|
|
1362
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: null },
|
|
1363
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Left.namespaceId, tag: CommonPositionTag.Left.tag, label: null },
|
|
1364
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.LivingRoom.namespaceId, tag: CommonAreaNamespaceTag.LivingRoom.tag, label: null },
|
|
1365
1365
|
],
|
|
1366
1366
|
})
|
|
1367
1367
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1369,10 +1369,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1369
1369
|
this.momentarySwitch
|
|
1370
1370
|
.addChildDeviceType('Momentary switch 2', [genericSwitch], {
|
|
1371
1371
|
tagList: [
|
|
1372
|
-
{ mfgCode: null, namespaceId:
|
|
1373
|
-
{ mfgCode: null, namespaceId:
|
|
1374
|
-
{ mfgCode: null, namespaceId:
|
|
1375
|
-
{ mfgCode: null, namespaceId:
|
|
1372
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Two.namespaceId, tag: CommonNumberTag.Two.tag, label: null },
|
|
1373
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Middle.namespaceId, tag: CommonPositionTag.Middle.tag, label: null },
|
|
1374
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Left.namespaceId, tag: CommonPositionTag.Left.tag, label: null },
|
|
1375
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.LivingRoom.namespaceId, tag: CommonAreaNamespaceTag.LivingRoom.tag, label: null },
|
|
1376
1376
|
],
|
|
1377
1377
|
})
|
|
1378
1378
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1380,10 +1380,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1380
1380
|
this.momentarySwitch
|
|
1381
1381
|
.addChildDeviceType('Momentary switch 3', [genericSwitch], {
|
|
1382
1382
|
tagList: [
|
|
1383
|
-
{ mfgCode: null, namespaceId:
|
|
1384
|
-
{ mfgCode: null, namespaceId:
|
|
1385
|
-
{ mfgCode: null, namespaceId:
|
|
1386
|
-
{ mfgCode: null, namespaceId:
|
|
1383
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Three.namespaceId, tag: CommonNumberTag.Three.tag, label: null },
|
|
1384
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: null },
|
|
1385
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Left.namespaceId, tag: CommonPositionTag.Left.tag, label: null },
|
|
1386
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.LivingRoom.namespaceId, tag: CommonAreaNamespaceTag.LivingRoom.tag, label: null },
|
|
1387
1387
|
],
|
|
1388
1388
|
})
|
|
1389
1389
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1391,11 +1391,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1391
1391
|
const switch4 = this.momentarySwitch
|
|
1392
1392
|
.addChildDeviceType('Momentary switch 4', [genericSwitch], {
|
|
1393
1393
|
tagList: [
|
|
1394
|
-
{ mfgCode: null, namespaceId:
|
|
1395
|
-
{ mfgCode: null, namespaceId:
|
|
1396
|
-
{ mfgCode: null, namespaceId:
|
|
1394
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Four.namespaceId, tag: CommonNumberTag.Four.tag, label: null },
|
|
1395
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: null },
|
|
1396
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Right.namespaceId, tag: CommonPositionTag.Right.tag, label: null },
|
|
1397
1397
|
{ mfgCode: null, namespaceId: SwitchesTag.Custom.namespaceId, tag: SwitchesTag.Custom.tag, label: 'Turn on' },
|
|
1398
|
-
{ mfgCode: null, namespaceId:
|
|
1398
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.Bedroom.namespaceId, tag: CommonAreaNamespaceTag.Bedroom.tag, label: null },
|
|
1399
1399
|
],
|
|
1400
1400
|
})
|
|
1401
1401
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1403,11 +1403,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1403
1403
|
const switch5 = this.momentarySwitch
|
|
1404
1404
|
.addChildDeviceType('Momentary switch 5', [genericSwitch], {
|
|
1405
1405
|
tagList: [
|
|
1406
|
-
{ mfgCode: null, namespaceId:
|
|
1407
|
-
{ mfgCode: null, namespaceId:
|
|
1408
|
-
{ mfgCode: null, namespaceId:
|
|
1406
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Five.namespaceId, tag: CommonNumberTag.Five.tag, label: null },
|
|
1407
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Middle.namespaceId, tag: CommonPositionTag.Middle.tag, label: null },
|
|
1408
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Right.namespaceId, tag: CommonPositionTag.Right.tag, label: null },
|
|
1409
1409
|
{ mfgCode: null, namespaceId: SwitchesTag.Custom.namespaceId, tag: SwitchesTag.Custom.tag, label: 'Turn off' },
|
|
1410
|
-
{ mfgCode: null, namespaceId:
|
|
1410
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.Bedroom.namespaceId, tag: CommonAreaNamespaceTag.Bedroom.tag, label: null },
|
|
1411
1411
|
],
|
|
1412
1412
|
})
|
|
1413
1413
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1415,11 +1415,11 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1415
1415
|
const switch6 = this.momentarySwitch
|
|
1416
1416
|
.addChildDeviceType('Momentary switch 6', [genericSwitch], {
|
|
1417
1417
|
tagList: [
|
|
1418
|
-
{ mfgCode: null, namespaceId:
|
|
1419
|
-
{ mfgCode: null, namespaceId:
|
|
1420
|
-
{ mfgCode: null, namespaceId:
|
|
1418
|
+
{ mfgCode: null, namespaceId: CommonNumberTag.Seven.namespaceId, tag: CommonNumberTag.Seven.tag, label: null },
|
|
1419
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: null },
|
|
1420
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Right.namespaceId, tag: CommonPositionTag.Right.tag, label: null },
|
|
1421
1421
|
{ mfgCode: null, namespaceId: SwitchesTag.Custom.namespaceId, tag: SwitchesTag.Custom.tag, label: 'Toggle' },
|
|
1422
|
-
{ mfgCode: null, namespaceId:
|
|
1422
|
+
{ mfgCode: null, namespaceId: CommonAreaNamespaceTag.Bedroom.namespaceId, tag: CommonAreaNamespaceTag.Bedroom.tag, label: null },
|
|
1423
1423
|
],
|
|
1424
1424
|
})
|
|
1425
1425
|
.createDefaultIdentifyClusterServer()
|
|
@@ -1458,22 +1458,22 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1458
1458
|
{
|
|
1459
1459
|
areaId: 1,
|
|
1460
1460
|
mapId: 1,
|
|
1461
|
-
areaInfo: { locationInfo: { locationName: 'Living', floorNumber: 0, areaType:
|
|
1461
|
+
areaInfo: { locationInfo: { locationName: 'Living', floorNumber: 0, areaType: CommonAreaNamespaceTag.LivingRoom.tag }, landmarkInfo: null },
|
|
1462
1462
|
},
|
|
1463
1463
|
{
|
|
1464
1464
|
areaId: 2,
|
|
1465
1465
|
mapId: 1,
|
|
1466
|
-
areaInfo: { locationInfo: { locationName: 'Kitchen', floorNumber: 0, areaType:
|
|
1466
|
+
areaInfo: { locationInfo: { locationName: 'Kitchen', floorNumber: 0, areaType: CommonAreaNamespaceTag.Kitchen.tag }, landmarkInfo: null },
|
|
1467
1467
|
},
|
|
1468
1468
|
{
|
|
1469
1469
|
areaId: 3,
|
|
1470
1470
|
mapId: 2,
|
|
1471
|
-
areaInfo: { locationInfo: { locationName: 'Bedroom', floorNumber: 1, areaType:
|
|
1471
|
+
areaInfo: { locationInfo: { locationName: 'Bedroom', floorNumber: 1, areaType: CommonAreaNamespaceTag.Bedroom.tag }, landmarkInfo: null },
|
|
1472
1472
|
},
|
|
1473
1473
|
{
|
|
1474
1474
|
areaId: 4,
|
|
1475
1475
|
mapId: 2,
|
|
1476
|
-
areaInfo: { locationInfo: { locationName: 'Bathroom', floorNumber: 1, areaType:
|
|
1476
|
+
areaInfo: { locationInfo: { locationName: 'Bathroom', floorNumber: 1, areaType: CommonAreaNamespaceTag.Bathroom.tag }, landmarkInfo: null },
|
|
1477
1477
|
},
|
|
1478
1478
|
], [], 1, [
|
|
1479
1479
|
{
|
|
@@ -1499,10 +1499,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1499
1499
|
], EnergyEvse.State.PluggedInCharging, EnergyEvse.SupplyState.ChargingEnabled, EnergyEvse.FaultState.NoError, 220_000, 10_000, 2_200_000, 1_000_000, 500_000, 32_000_000);
|
|
1500
1500
|
this.evse = await this.addDevice(this.evse);
|
|
1501
1501
|
this.solarPower = new SolarPower('Solar Power', 'SOL00046', 220_000, 10_000, 2200_000, 2_200_000, 0, 500_000);
|
|
1502
|
-
this.solarPower.addPanel('Panel 1',
|
|
1503
|
-
this.solarPower.addPanel('Panel 2',
|
|
1504
|
-
this.solarPower.addPanel('Panel 3',
|
|
1505
|
-
this.solarPower.addPanel('Panel 4',
|
|
1502
|
+
this.solarPower.addPanel('Panel 1', CommonNumberTag.One);
|
|
1503
|
+
this.solarPower.addPanel('Panel 2', CommonNumberTag.Two);
|
|
1504
|
+
this.solarPower.addPanel('Panel 3', CommonNumberTag.Three);
|
|
1505
|
+
this.solarPower.addPanel('Panel 4', CommonNumberTag.Four);
|
|
1506
1506
|
this.solarPower = (await this.addDevice(this.solarPower));
|
|
1507
1507
|
this.batteryStorage = new BatteryStorage('Battery Storage', 'BST00047', 75, PowerSource.BatChargeLevel.Ok, 220_000, 10_000, 2_200_000, 1_000_000, 2_000_000, -2_000_000, 3_000_000);
|
|
1508
1508
|
this.batteryStorage = await this.addDevice(this.batteryStorage);
|
|
@@ -1519,7 +1519,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1519
1519
|
this.microwaveOven = new MicrowaveOven('Microwave Oven', 'MWO00053');
|
|
1520
1520
|
this.microwaveOven = await this.addDevice(this.microwaveOven);
|
|
1521
1521
|
this.oven = new Oven('Oven', 'OVN00054');
|
|
1522
|
-
this.oven.addCabinet('Upper Cabinet', [{ mfgCode: null, namespaceId:
|
|
1522
|
+
this.oven.addCabinet('Upper Cabinet', [{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: CommonPositionTag.Top.label }], 2, [
|
|
1523
1523
|
{ label: 'Bake', mode: 1, modeTags: [{ value: OvenMode.ModeTag.Bake }] },
|
|
1524
1524
|
{ label: 'Convection', mode: 2, modeTags: [{ value: OvenMode.ModeTag.Convection }] },
|
|
1525
1525
|
{ label: 'Grill', mode: 3, modeTags: [{ value: OvenMode.ModeTag.Grill }] },
|
|
@@ -1531,7 +1531,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1531
1531
|
{ label: 'Proofing', mode: 9, modeTags: [{ value: OvenMode.ModeTag.Proofing }] },
|
|
1532
1532
|
{ label: 'Steam', mode: 10, modeTags: [{ value: OvenMode.ModeTag.Steam }] },
|
|
1533
1533
|
], 180 * 100, 100 * 100, 300 * 100, 10 * 100, 20 * 100, OperationalState.OperationalStateEnum.Stopped, 2, ['pre-heating', 'pre-heated', 'cooling down']);
|
|
1534
|
-
this.oven.addCabinet('Lower Cabinet', [{ mfgCode: null, namespaceId:
|
|
1534
|
+
this.oven.addCabinet('Lower Cabinet', [{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: CommonPositionTag.Bottom.label }], 3, [
|
|
1535
1535
|
{ label: 'Convection', mode: 1, modeTags: [{ value: OvenMode.ModeTag.Convection }] },
|
|
1536
1536
|
{ label: 'Clean', mode: 2, modeTags: [{ value: OvenMode.ModeTag.Clean }] },
|
|
1537
1537
|
{ label: 'Steam', mode: 3, modeTags: [{ value: OvenMode.ModeTag.Steam }] },
|
|
@@ -1539,29 +1539,29 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
1539
1539
|
this.oven = (await this.addDevice(this.oven));
|
|
1540
1540
|
this.cooktop = new Cooktop('Cooktop', 'CKT00055');
|
|
1541
1541
|
this.cooktop.addSurface('Surface Top Left', [
|
|
1542
|
-
{ mfgCode: null, namespaceId:
|
|
1543
|
-
{ mfgCode: null, namespaceId:
|
|
1542
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: CommonPositionTag.Top.label },
|
|
1543
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Left.namespaceId, tag: CommonPositionTag.Left.tag, label: CommonPositionTag.Left.label },
|
|
1544
1544
|
]);
|
|
1545
1545
|
this.cooktop.addSurface('Surface Top Right', [
|
|
1546
|
-
{ mfgCode: null, namespaceId:
|
|
1547
|
-
{ mfgCode: null, namespaceId:
|
|
1546
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: CommonPositionTag.Top.label },
|
|
1547
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Right.namespaceId, tag: CommonPositionTag.Right.tag, label: CommonPositionTag.Right.label },
|
|
1548
1548
|
]);
|
|
1549
1549
|
this.cooktop.addSurface('Surface Bottom Left', [
|
|
1550
|
-
{ mfgCode: null, namespaceId:
|
|
1551
|
-
{ mfgCode: null, namespaceId:
|
|
1550
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: CommonPositionTag.Bottom.label },
|
|
1551
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Left.namespaceId, tag: CommonPositionTag.Left.tag, label: CommonPositionTag.Left.label },
|
|
1552
1552
|
]);
|
|
1553
1553
|
this.cooktop.addSurface('Surface Bottom Right', [
|
|
1554
|
-
{ mfgCode: null, namespaceId:
|
|
1555
|
-
{ mfgCode: null, namespaceId:
|
|
1554
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: CommonPositionTag.Bottom.label },
|
|
1555
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Right.namespaceId, tag: CommonPositionTag.Right.tag, label: CommonPositionTag.Right.label },
|
|
1556
1556
|
]);
|
|
1557
1557
|
this.cooktop = (await this.addDevice(this.cooktop));
|
|
1558
1558
|
const refrigerator = new Refrigerator('Refrigerator', 'REF00056');
|
|
1559
1559
|
refrigerator.addCabinet('Refrigerator Top', [
|
|
1560
|
-
{ mfgCode: null, namespaceId:
|
|
1560
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Top.namespaceId, tag: CommonPositionTag.Top.tag, label: 'Refrigerator Top' },
|
|
1561
1561
|
{ mfgCode: null, namespaceId: RefrigeratorTag.Refrigerator.namespaceId, tag: RefrigeratorTag.Refrigerator.tag, label: RefrigeratorTag.Refrigerator.label },
|
|
1562
1562
|
], 12 * 100, 5 * 100, 20 * 100, 1 * 100, 1200);
|
|
1563
1563
|
refrigerator.addCabinet('Freezer Bottom', [
|
|
1564
|
-
{ mfgCode: null, namespaceId:
|
|
1564
|
+
{ mfgCode: null, namespaceId: CommonPositionTag.Bottom.namespaceId, tag: CommonPositionTag.Bottom.tag, label: 'Freezer Bottom' },
|
|
1565
1565
|
{ mfgCode: null, namespaceId: RefrigeratorTag.Freezer.namespaceId, tag: RefrigeratorTag.Freezer.tag, label: RefrigeratorTag.Freezer.label },
|
|
1566
1566
|
], -18 * 100, -30 * 100, -10 * 100, 1 * 100, -1800);
|
|
1567
1567
|
this.refrigerator = (await this.addDevice(refrigerator));
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
|
3
|
-
"version": "3.0.1
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
|
9
|
-
"version": "3.0.1
|
|
9
|
+
"version": "3.0.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "3.3.0",
|