matterbridge-example-dynamic-platform 1.2.4-dev-20250612-b04ef65 → 1.2.4-dev-20250612-926c70e

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
@@ -10,11 +10,16 @@ If you like this project and find it useful, please consider giving it a star on
10
10
 
11
11
  ## [1.2.4] - 2025-06-11
12
12
 
13
+ ### Added
14
+
15
+ - [npm]: The dev of matterbridge-example-dynamic-platform is published with tag **dev** on **npm** each day at 00:00 UTC if there is a new commit.
16
+
13
17
  ### Changed
14
18
 
15
19
  - [package]: Require matterbridge 3.0.6.
16
20
  - [package]: Updated package.
17
21
  - [package]: Updated dependencies.
22
+ - [subscribe]: Prevent attribute setting when offline for air purifier and fan.
18
23
 
19
24
  <a href="https://www.buymeacoffee.com/luligugithub">
20
25
  <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
package/dist/platform.js CHANGED
@@ -725,7 +725,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
725
725
  await this.airConditioner?.setAttribute(ThermostatCluster.id, 'localTemperature', 20 * 100, this.airConditioner?.log);
726
726
  await this.airConditioner?.setAttribute(TemperatureMeasurement.Cluster.id, 'measuredValue', 20 * 100, this.airConditioner?.log);
727
727
  await this.airConditioner?.setAttribute(RelativeHumidityMeasurementCluster.id, 'measuredValue', 50 * 100, this.airConditioner?.log);
728
- await this.airConditioner?.setAttribute(FanControl.Cluster.id, 'speedSetting', 50, this.airConditioner?.log);
729
728
  await this.airConditioner?.setAttribute(FanControl.Cluster.id, 'percentSetting', 50, this.airConditioner?.log);
730
729
  });
731
730
  this.airConditioner?.addCommandHandler('off', async () => {
@@ -733,7 +732,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
733
732
  await this.airConditioner?.setAttribute(ThermostatCluster.id, 'localTemperature', null, this.airConditioner?.log);
734
733
  await this.airConditioner?.setAttribute(TemperatureMeasurement.Cluster.id, 'measuredValue', null, this.airConditioner?.log);
735
734
  await this.airConditioner?.setAttribute(RelativeHumidityMeasurementCluster.id, 'measuredValue', null, this.airConditioner?.log);
736
- await this.airConditioner?.setAttribute(FanControl.Cluster.id, 'speedSetting', null, this.airConditioner?.log);
737
735
  await this.airConditioner?.setAttribute(FanControl.Cluster.id, 'percentSetting', null, this.airConditioner?.log);
738
736
  });
739
737
  this.pump = new MatterbridgeEndpoint([pumpDevice, bridgedNode, powerSource], { uniqueStorageKey: 'Pump' }, this.config.debug)
@@ -830,13 +828,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
830
828
  if (isValidNumber(newValue, 0, 100))
831
829
  this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', newValue, this.fan?.log);
832
830
  }, this.fan.log);
833
- await this.fan?.subscribeAttribute(FanControl.Cluster.id, 'speedSetting', (newValue, oldValue, context) => {
834
- this.fan?.log.info(`Speed setting changed from ${oldValue} to ${newValue} context: ${context.offline === true ? 'offline' : 'online'}`);
835
- if (context.offline === true)
836
- return;
837
- if (isValidNumber(newValue, 0, 100))
838
- this.fan?.setAttribute(FanControl.Cluster.id, 'speedCurrent', newValue, this.fan?.log);
839
- }, this.fan.log);
840
831
  this.waterLeak = new MatterbridgeEndpoint([waterLeakDetector, bridgedNode, powerSource], { uniqueStorageKey: 'Water leak detector' }, this.config.debug)
841
832
  .createDefaultBridgedDeviceBasicInformationClusterServer('Water leak detector', 'serial_98745631222', 0xfff1, 'Matterbridge', 'Matterbridge WaterLeakDetector', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
842
833
  .createDefaultPowerSourceRechargeableBatteryClusterServer()
@@ -1219,12 +1210,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1219
1210
  }
1220
1211
  }, 60 * 1000 + 550);
1221
1212
  }
1222
- this.fan?.log.info('Set fan initial fanMode to Auto, percentCurrent and percentSetting to 50 and speedCurrent and speedSetting to 50');
1213
+ this.fan?.log.info('Set fan initial fanMode to Auto, percentCurrent and percentSetting to 50');
1223
1214
  await this.fan?.setAttribute(FanControl.Cluster.id, 'fanMode', FanControl.FanMode.Auto, this.fan.log);
1224
1215
  await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 50, this.fan.log);
1225
1216
  await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 50, this.fan.log);
1226
- await this.fan?.setAttribute(FanControl.Cluster.id, 'speedCurrent', 50, this.fan.log);
1227
- await this.fan?.setAttribute(FanControl.Cluster.id, 'speedSetting', 50, this.fan.log);
1228
1217
  if (this.config.useInterval) {
1229
1218
  this.fanInterval = setInterval(async () => {
1230
1219
  const mode = this.fan?.getAttribute(FanControl.Cluster.id, 'fanMode', this.fan.log);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "1.2.4-dev-20250612-b04ef65",
3
+ "version": "1.2.4-dev-20250612-926c70e",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-dynamic-platform",
9
- "version": "1.2.4-dev-20250612-b04ef65",
9
+ "version": "1.2.4-dev-20250612-926c70e",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.0.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "1.2.4-dev-20250612-b04ef65",
3
+ "version": "1.2.4-dev-20250612-926c70e",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "MIT",