matterbridge-example-dynamic-platform 2.0.13-dev-20260303-224d0bf → 2.0.13-dev-20260304-437bf8f
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 -0
- package/README.md +3 -2
- package/dist/module.js +4 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -40,6 +40,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
40
40
|
- [dimmerMountedLegacy]: Add a dimmer Mounted Switch legacy device.
|
|
41
41
|
- [solarPower]: Add four panels to the Solar Power.
|
|
42
42
|
- [soilSensor]: Add a Soil Sensor (Matter 1.5.0).
|
|
43
|
+
- [IrrigationSystem]: Add an Irrigation System (Matter 1.5.0).
|
|
43
44
|
|
|
44
45
|
### Changed
|
|
45
46
|
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
Matterbridge dynamic platform example plugin is a template to develop your own plugin using the dynamic platform.
|
|
26
26
|
|
|
27
|
-
It exposes
|
|
27
|
+
It exposes 68 virtual devices:
|
|
28
28
|
|
|
29
29
|
- a door contact sensor
|
|
30
30
|
- a motion sensor
|
|
@@ -33,7 +33,6 @@ It exposes 67 virtual devices:
|
|
|
33
33
|
- a humidity sensor
|
|
34
34
|
- a pressure sensor
|
|
35
35
|
- a flow sensor
|
|
36
|
-
- a soil sensor
|
|
37
36
|
- a climate sensor with temperature, humidity and pressure
|
|
38
37
|
- a mode select device
|
|
39
38
|
- a switch with onOff cluster
|
|
@@ -94,6 +93,8 @@ It exposes 67 virtual devices:
|
|
|
94
93
|
- a heat pump device
|
|
95
94
|
- a basic video player (supported by SmartThings)
|
|
96
95
|
- a speaker device (supported by SmartThings)
|
|
96
|
+
- a soil sensor (Matter 1.5.0)
|
|
97
|
+
- an irrigation system (Matter 1.5.0)
|
|
97
98
|
|
|
98
99
|
All these devices continuously change their state and position. The plugin also shows how to use all the command handlers (so you can control all the devices), how to subscribe to attributes, and how to trigger events.
|
|
99
100
|
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { aggregator, airPurifier, airQualitySensor, bridgedNode, colorTemperatureLight, contactSensor, coverDevice, dimmableLight, dimmableMountedSwitch, dimmableOutlet, doorLockDevice, electricalSensor, extendedColorLight, fanDevice, flowSensor, genericSwitch, humiditySensor, lightSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, modeSelect, occupancySensor, onOffLight, onOffMountedSwitch, onOffOutlet, onOffSwitch, powerSource, pressureSensor, pumpDevice, rainSensor, smokeCoAlarm, temperatureSensor, thermostatDevice, waterFreezeDetector, waterLeakDetector, waterValve, } from 'matterbridge';
|
|
2
|
-
import { AirConditioner, BasicVideoPlayer, BatteryStorage, Cooktop, Dishwasher, Evse, ExtractorHood, HeatPump, LaundryDryer, LaundryWasher, MicrowaveOven, Oven, Refrigerator, RoboticVacuumCleaner, SoilSensor, SolarPower, Speaker, WaterHeater, } from 'matterbridge/devices';
|
|
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
4
|
import { AreaNamespaceTag, LocationTag, NumberTag, PositionTag, 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, IlluminanceMeasurement, LevelControl, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffCluster, OperationalState, OvenMode, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PressureMeasurement, RadonConcentrationMeasurement, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, RvcCleanMode, RvcOperationalState, RvcRunMode, SmokeCoAlarm, TemperatureMeasurement, Thermostat, ThermostatCluster, TotalVolatileOrganicCompoundsConcentrationMeasurement, WindowCovering, } from 'matterbridge/matter/clusters';
|
|
@@ -32,6 +32,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
32
32
|
pressure;
|
|
33
33
|
flow;
|
|
34
34
|
soil;
|
|
35
|
+
irrigationSystem;
|
|
35
36
|
select;
|
|
36
37
|
climate;
|
|
37
38
|
switch;
|
|
@@ -163,6 +164,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
|
163
164
|
this.flow = await this.addDevice(this.flow);
|
|
164
165
|
this.soil = new SoilSensor('Soil Sensor', 'SOI000067', { soilMoistureMeasuredValue: 45 });
|
|
165
166
|
this.soil = await this.addDevice(this.soil);
|
|
167
|
+
this.irrigationSystem = new IrrigationSystem('Irrigation System', 'IRR000068').addZone(NumberTag.One).addZone(NumberTag.Two).addZone(NumberTag.Three).addZone(NumberTag.Four);
|
|
168
|
+
this.irrigationSystem = (await this.addDevice(this.irrigationSystem));
|
|
166
169
|
this.climate = new MatterbridgeEndpoint([bridgedNode, powerSource], { id: 'Climate' }, this.config.debug)
|
|
167
170
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Climate', 'CLI00008', 0xfff1, 'Matterbridge', 'Matterbridge Climate')
|
|
168
171
|
.createDefaultPowerSourceReplaceableBatteryClusterServer(90, PowerSource.BatChargeLevel.Ok, 2990, '2 x AA', 2, PowerSource.BatReplaceability.UserReplaceable)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
|
3
|
-
"version": "2.0.13-dev-
|
|
3
|
+
"version": "2.0.13-dev-20260304-437bf8f",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
|
9
|
-
"version": "2.0.13-dev-
|
|
9
|
+
"version": "2.0.13-dev-20260304-437bf8f",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "3.2.0",
|
package/package.json
CHANGED