matterbridge-example-dynamic-platform 3.0.3-dev-20260830-a347a26 → 3.0.3

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
@@ -29,12 +29,12 @@ If you like this project and find it useful, please consider giving it a star on
29
29
 
30
30
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
31
31
 
32
- ## [3.0.3] - Dev branch
32
+ ## [3.0.3] - 2026-08-30
33
33
 
34
34
  ### Breaking changes
35
35
 
36
36
  - [matterbridge]: Require matterbridge v.3.10.7 with matter v.1.6.0.
37
- - [fanControl]: Matterbridge v.3.10.6 now manages the compliant FanControl `fanMode` and `percentSetting` synchronization; plugin examples now only update `percentCurrent` as physical device feedback.
37
+ - [fanControl]: Matterbridge v.3.10.7 now manages the compliant FanControl `fanMode` and `percentSetting` synchronization; plugins now only update `percentCurrent` as physical device feedback from `fanMode` and `percentSetting`.
38
38
 
39
39
  ### Added
40
40
 
@@ -48,6 +48,8 @@ If you like this project and find it useful, please consider giving it a star on
48
48
  - [package]: Bump `@types/node` to v.26.4.0.
49
49
  - [package]: Bump `oxfmt` to v.0.65.0.
50
50
  - [package]: Bump `oxlint` to v.1.80.0.
51
+ - [package]: Bump `node-ansi-logger` to v.3.3.1.
52
+ - [package]: Bump `node-persist-manager` to v.2.1.1.
51
53
 
52
54
  ### Fixed
53
55
 
package/dist/module.js CHANGED
@@ -1313,16 +1313,16 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1313
1313
  const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
1314
1314
  this.thermoAutoSchedules?.log.info(`Subscribe systemMode called with: ${lookupSystemMode[newValue]} (old value: ${lookupSystemMode[oldValue]})`);
1315
1315
  }, this.thermoAutoSchedules.log);
1316
- this.thermoAutoSchedules?.subscribeAttribute(Thermostat.id, 'occupiedHeatingSetpoint', (newValue, oldValue) => {
1316
+ this.thermoAutoSchedules?.subscribeAttribute(Thermostat, 'occupiedHeatingSetpoint', (newValue, oldValue) => {
1317
1317
  this.thermoAutoSchedules?.log.info(`Subscribe occupiedHeatingSetpoint called with: ${newValue / 100} (old value: ${oldValue / 100})`);
1318
1318
  }, this.thermoAutoSchedules.log);
1319
- this.thermoAutoSchedules?.subscribeAttribute(Thermostat.id, 'occupiedCoolingSetpoint', (newValue, oldValue) => {
1319
+ this.thermoAutoSchedules?.subscribeAttribute(Thermostat, 'occupiedCoolingSetpoint', (newValue, oldValue) => {
1320
1320
  this.thermoAutoSchedules?.log.info(`Subscribe occupiedCoolingSetpoint called with: ${newValue / 100} (old value: ${oldValue / 100})`);
1321
1321
  }, this.thermoAutoSchedules.log);
1322
- this.thermoAutoSchedules?.subscribeAttribute(Thermostat.id, 'activeScheduleHandle', (newValue, oldValue) => {
1322
+ this.thermoAutoSchedules?.subscribeAttribute(Thermostat, 'activeScheduleHandle', (newValue, oldValue) => {
1323
1323
  this.thermoAutoSchedules?.log.info(`Subscribe activeScheduleHandle called with: ${newValue ? `0x${Buffer.from(newValue).toString('hex')}` : 'null'} (old value: ${oldValue ? `0x${Buffer.from(oldValue).toString('hex')}` : 'null'})`);
1324
1324
  }, this.thermoAutoSchedules.log);
1325
- this.thermoAutoSchedules?.subscribeAttribute(Thermostat.id, 'schedules', (newValue, oldValue) => {
1325
+ this.thermoAutoSchedules?.subscribeAttribute(Thermostat, 'schedules', (newValue, oldValue) => {
1326
1326
  this.thermoAutoSchedules?.log.info(`Subscribe schedules called with: ${debugStringify(newValue)} (old value: ${debugStringify(oldValue)})`);
1327
1327
  }, this.thermoAutoSchedules.log);
1328
1328
  this.thermoHeat = new MatterbridgeEndpoint([thermostat, bridgedNode, powerSource], { id: 'Thermostat (Heat)' }, this.config.debug)
@@ -1360,7 +1360,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1360
1360
  const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
1361
1361
  this.thermoHeat?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
1362
1362
  }, this.thermoHeat.log);
1363
- this.thermoHeat?.subscribeAttribute(Thermostat.id, 'occupiedHeatingSetpoint', (value) => {
1363
+ this.thermoHeat?.subscribeAttribute(Thermostat, 'occupiedHeatingSetpoint', (value) => {
1364
1364
  this.thermoHeat?.log.info('Subscribe occupiedHeatingSetpoint called with:', value / 100);
1365
1365
  }, this.thermoHeat.log);
1366
1366
  this.thermoCool = new MatterbridgeEndpoint([thermostat, bridgedNode, powerSource], { id: 'Thermostat (Cool)' }, this.config.debug)
@@ -1380,7 +1380,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1380
1380
  const lookupSystemMode = ['Off', 'Auto', '', 'Cool', 'Heat', 'EmergencyHeat', 'Precooling', 'FanOnly', 'Dry', 'Sleep'];
1381
1381
  this.thermoCool?.log.info('Subscribe systemMode called with:', lookupSystemMode[value]);
1382
1382
  }, this.thermoCool.log);
1383
- this.thermoCool?.subscribeAttribute(Thermostat.id, 'occupiedCoolingSetpoint', (value) => {
1383
+ this.thermoCool?.subscribeAttribute(Thermostat, 'occupiedCoolingSetpoint', (value) => {
1384
1384
  this.thermoCool?.log.info('Subscribe occupiedCoolingSetpoint called with:', value / 100);
1385
1385
  }, this.thermoCool.log);
1386
1386
  this.airPurifier = new MatterbridgeEndpoint([airPurifier, bridgedNode, powerSource], { id: 'Air purifier' }, this.config.debug)
@@ -1405,10 +1405,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1405
1405
  this.airPurifier?.addCommandHandler('identify', ({ request: { identifyTime } }) => {
1406
1406
  this.airPurifier?.log.info(`Command identify called identifyTime:${identifyTime}`);
1407
1407
  });
1408
- this.airPurifier?.subscribeAttribute(FanControl.id, 'fanMode', (newValue, oldValue, context) => {
1408
+ this.airPurifier?.subscribeAttribute(FanControl, 'fanMode', (newValue, oldValue, context) => {
1409
1409
  this.airPurifier?.log.info(`Fan mode changed from ${this.fanModeLookup[oldValue]} to ${this.fanModeLookup[newValue]} context: ${context.fabric === undefined ? 'offline' : 'online'}`);
1410
1410
  }, this.airPurifier.log);
1411
- this.airPurifier?.subscribeAttribute(FanControl.id, 'percentSetting', (newValue, oldValue, context) => void (async () => {
1411
+ this.airPurifier?.subscribeAttribute(FanControl, 'percentSetting', (newValue, oldValue, context) => void (async () => {
1412
1412
  this.airPurifier?.log.info(`Percent setting changed from ${oldValue} to ${newValue} context: ${context.fabric === undefined ? 'offline' : 'online'}`);
1413
1413
  if (context.fabric === undefined)
1414
1414
  return;
@@ -1935,10 +1935,10 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
1935
1935
  await this.airConditioner?.setAttribute(RelativeHumidityMeasurement.id, 'measuredValue', null, this.airConditioner?.log);
1936
1936
  await this.airConditioner?.setAttribute(FanControl.id, 'percentSetting', 0, this.airConditioner?.log);
1937
1937
  });
1938
- this.airConditioner?.subscribeAttribute(FanControl.id, 'fanMode', (newValue, oldValue, context) => {
1938
+ this.airConditioner?.subscribeAttribute(FanControl, 'fanMode', (newValue, oldValue, context) => {
1939
1939
  this.airConditioner?.log.info(`Fan mode changed from ${this.fanModeLookup[oldValue]} to ${this.fanModeLookup[newValue]} context: ${context.fabric === undefined ? 'offline' : 'online'}`);
1940
1940
  }, this.airConditioner?.log);
1941
- this.airConditioner?.subscribeAttribute(FanControl.id, 'percentSetting', (newValue, oldValue, context) => void (async () => {
1941
+ this.airConditioner?.subscribeAttribute(FanControl, 'percentSetting', (newValue, oldValue, context) => void (async () => {
1942
1942
  this.airConditioner?.log.info(`Percent setting changed from ${oldValue} to ${newValue} context: ${context.fabric === undefined ? 'offline' : 'online'}`);
1943
1943
  if (context.fabric === undefined)
1944
1944
  return;
@@ -2558,18 +2558,18 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
2558
2558
  if (this.config.useInterval) {
2559
2559
  this.addInterval(async () => {
2560
2560
  let mode = this.fanDefault?.getAttribute(FanControl, 'fanMode', this.fanDefault.log);
2561
- let value = this.fanDefault?.getAttribute(FanControl, 'percentCurrent', this.fanDefault.log);
2562
- if (isValidNumber(mode, FanControl.FanMode.Off, FanControl.FanMode.Auto) && mode === FanControl.FanMode.Auto && isValidNumber(value, 0, 100)) {
2563
- value = value + 10 >= 100 ? 0 : value + 10;
2564
- await this.fanDefault?.setAttribute(FanControl, 'percentCurrent', value, this.fanDefault.log);
2565
- this.fanDefault?.log.info(`Set fan percentCurrent to ${value}`);
2561
+ let current = this.fanDefault?.getAttribute(FanControl, 'percentCurrent', this.fanDefault.log);
2562
+ if (isValidNumber(mode, FanControl.FanMode.Off, FanControl.FanMode.Auto) && mode === FanControl.FanMode.Auto && isValidNumber(current, 0, 100)) {
2563
+ current = current + 10 >= 100 ? 0 : current + 10;
2564
+ await this.fanDefault?.setAttribute(FanControl, 'percentCurrent', current, this.fanDefault.log);
2565
+ this.fanDefault?.log.info(`Set fan percentCurrent to ${current}`);
2566
2566
  }
2567
2567
  mode = this.fanComplete?.getAttribute(FanControl, 'fanMode', this.fanComplete.log);
2568
- value = this.fanComplete?.getAttribute(FanControl, 'percentCurrent', this.fanComplete.log);
2569
- if (isValidNumber(mode, FanControl.FanMode.Off, FanControl.FanMode.Auto) && mode === FanControl.FanMode.Auto && isValidNumber(value, 0, 100)) {
2570
- value = value + 10 >= 100 ? 0 : value + 10;
2571
- await this.fanComplete?.setAttribute(FanControl, 'percentCurrent', value, this.fanComplete.log);
2572
- this.fanComplete?.log.info(`Set fan percentCurrent to ${value}`);
2568
+ current = this.fanComplete?.getAttribute(FanControl, 'percentCurrent', this.fanComplete.log);
2569
+ if (isValidNumber(mode, FanControl.FanMode.Off, FanControl.FanMode.Auto) && mode === FanControl.FanMode.Auto && isValidNumber(current, 0, 100)) {
2570
+ current = current + 10 >= 100 ? 0 : current + 10;
2571
+ await this.fanComplete?.setAttribute(FanControl, 'percentCurrent', current, this.fanComplete.log);
2572
+ this.fanComplete?.log.info(`Set fan percentCurrent to ${current}`);
2573
2573
  }
2574
2574
  }, 60 * 1000 + 700);
2575
2575
  }
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.3-dev-20260830-a347a26",
3
+ "version": "3.0.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-dynamic-platform",
9
- "version": "3.0.3-dev-20260830-a347a26",
9
+ "version": "3.0.3",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "node-ansi-logger": "3.3.0",
13
- "node-persist-manager": "2.1.0"
12
+ "node-ansi-logger": "3.3.1",
13
+ "node-persist-manager": "2.1.1"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
@@ -21,9 +21,9 @@
21
21
  }
22
22
  },
23
23
  "node_modules/node-ansi-logger": {
24
- "version": "3.3.0",
25
- "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.3.0.tgz",
26
- "integrity": "sha512-ZW77lbZkA8h3r2HA2rcE5RjTIcwRDNB072RkZVyimGQpmEorJT8ajZ7UDhkHGoh0JRrCJL0iUKBE8q4oU8MHMg==",
24
+ "version": "3.3.1",
25
+ "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.3.1.tgz",
26
+ "integrity": "sha512-JjkQHtVKgyd5Ua4AkYCFsZZiUYMrPsj/S9k2VY8/FjYuFJFRjDawsuxMwaThhWu4oU7zwuqvDG2uoDnjUyApVw==",
27
27
  "hasShrinkwrap": true,
28
28
  "license": "Apache-2.0",
29
29
  "engines": {
@@ -35,9 +35,9 @@
35
35
  }
36
36
  },
37
37
  "node_modules/node-persist-manager": {
38
- "version": "2.1.0",
39
- "resolved": "https://registry.npmjs.org/node-persist-manager/-/node-persist-manager-2.1.0.tgz",
40
- "integrity": "sha512-LJze/Fcd8LijM4OMPnp0AQ+Z1e9mFMkjOEDw08xHA2HSRd2+N5s0uyH5ogYmXPC68f0sc4GrdKMpAcsHuO3PKA==",
38
+ "version": "2.1.1",
39
+ "resolved": "https://registry.npmjs.org/node-persist-manager/-/node-persist-manager-2.1.1.tgz",
40
+ "integrity": "sha512-cAqF2spTnzDSAQeORHy/OYdD1VROGZ6UiLjmq/gVxQ4EglB0Ro0QX83U+xHEh2G6b7HTvGFqjS/R9LTOGkcayw==",
41
41
  "hasShrinkwrap": true,
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-dynamic-platform",
3
- "version": "3.0.3-dev-20260830-a347a26",
3
+ "version": "3.0.3",
4
4
  "description": "Matterbridge dynamic plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -68,7 +68,7 @@
68
68
  "*.schema.json"
69
69
  ],
70
70
  "dependencies": {
71
- "node-ansi-logger": "3.3.0",
72
- "node-persist-manager": "2.1.0"
71
+ "node-ansi-logger": "3.3.1",
72
+ "node-persist-manager": "2.1.1"
73
73
  }
74
74
  }