matterbridge-test 2.0.19 → 2.0.20-dev-20260614-bf23d6a

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
@@ -28,6 +28,20 @@ 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
+ ## [2.0.20] - Dev branch
32
+
33
+ ### Changed
34
+
35
+ - [package]: Update dependencies.
36
+ - [package]: Bump package to `automator` v.3.1.12.
37
+
38
+ - [workflow]: Bump `.github\workflows\build.yml` config to v.2.0.4.
39
+ - [workflow]: Bump `.github\workflows\codecov.yml` config to v.2.0.5.
40
+ - [workflow]: Bump `.github\workflows\publish.yml` config to v.2.0.4.
41
+ - [eslint]: Bump `eslint` config to v.2.0.7.
42
+
43
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
44
+
31
45
  ## [2.0.19] - 2026-06-05
32
46
 
33
47
  ### Breaking changes
package/dist/module.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bridgedNode, colorTemperatureLight, electricalSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, modeSelect, onOffOutlet, onOffSwitch, powerSource, } from 'matterbridge';
1
+ import { bridgedNode, colorTemperatureLight, electricalSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, modeSelect, onOffLightSwitch, onOffPlugInUnit, powerSource, } from 'matterbridge';
2
2
  import { CYAN, db, er, nf } from 'matterbridge/logger';
3
3
  import { BridgedDeviceBasicInformation, ElectricalEnergyMeasurement, ElectricalPowerMeasurement, ModeSelect, OnOff, PowerSource } from 'matterbridge/matter/clusters';
4
4
  import { fireAndForget, isValidString, waiter } from 'matterbridge/utils';
@@ -11,8 +11,8 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
11
11
  constructor(matterbridge, log, config) {
12
12
  super(matterbridge, log, config);
13
13
  this.config = config;
14
- if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.8.0')) {
15
- throw new Error(`The test plugin requires Matterbridge version >= "3.8.0". Please update Matterbridge to the latest version in the frontend.`);
14
+ if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.9.0')) {
15
+ throw new Error(`The test plugin requires Matterbridge version >= "3.9.0". Please update Matterbridge to the latest version in the frontend.`);
16
16
  }
17
17
  this.log.info('Initializing platform:', this.config.name);
18
18
  this.log.debug('- with matterbridge version ', matterbridge.matterbridgeVersion);
@@ -50,13 +50,13 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
50
50
  await waiter('Long delay start', () => false, false, 150000, 1000);
51
51
  await this.ready;
52
52
  await this.clearSelect();
53
- for (let i = 0; i < this.config.loadSwitches; i++) {
53
+ for (let i = 0; i < this.config.loadSwitches; i += 1) {
54
54
  this.setSelectDevice('serial_switch_' + i, 'Switch ' + i);
55
55
  if (!this.validateDevice('Switch ' + i))
56
56
  continue;
57
- const switchDevice = new MatterbridgeEndpoint([onOffSwitch, bridgedNode, ...(this.config.enableElectrical ? [electricalSensor] : []), ...(this.config.enablePowerSource ? [powerSource] : [])], { id: 'Switch' + i }, this.config.debug);
57
+ const switchDevice = new MatterbridgeEndpoint([onOffLightSwitch, bridgedNode, ...(this.config.enableElectrical ? [electricalSensor] : []), ...(this.config.enablePowerSource ? [powerSource] : [])], { id: 'Switch' + i }, this.config.debug);
58
58
  switchDevice.log.logName = 'Switch' + i;
59
- switchDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Switch ' + i, 'serial_switch_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', parseInt(this.version.replace(/\D/g, '')), this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
59
+ switchDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Switch ' + i, 'serial_switch_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', Number.parseInt(this.version.replace(/\D/g, '')), this.version, Number.parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
60
60
  switchDevice.createDefaultOnOffClusterServer();
61
61
  switchDevice.addCommandHandler('identify', (data) => {
62
62
  this.log.info(`Received identify command request ${data.request.identifyTime} for endpoint ${data.endpoint?.number}`);
@@ -82,13 +82,13 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
82
82
  await this.registerDevice(switchDevice);
83
83
  }
84
84
  }
85
- for (let i = 0; i < this.config.loadOutlets; i++) {
85
+ for (let i = 0; i < this.config.loadOutlets; i += 1) {
86
86
  this.setSelectDevice('serial_outlet_' + i, 'Outlet ' + i);
87
87
  if (!this.validateDevice('Outlet ' + i))
88
88
  continue;
89
- const outletDevice = new MatterbridgeEndpoint([onOffOutlet, bridgedNode, ...(this.config.enableElectrical ? [electricalSensor] : []), ...(this.config.enablePowerSource ? [powerSource] : [])], { id: 'Outlet' + i }, this.config.debug);
89
+ const outletDevice = new MatterbridgeEndpoint([onOffPlugInUnit, bridgedNode, ...(this.config.enableElectrical ? [electricalSensor] : []), ...(this.config.enablePowerSource ? [powerSource] : [])], { id: 'Outlet' + i }, this.config.debug);
90
90
  outletDevice.log.logName = 'Outlet' + i;
91
- outletDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Outlet ' + i, 'serial_outlet_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', parseInt(this.version.replace(/\D/g, '')), this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
91
+ outletDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Outlet ' + i, 'serial_outlet_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', Number.parseInt(this.version.replace(/\D/g, '')), this.version, Number.parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
92
92
  outletDevice.addCommandHandler('identify', (data) => {
93
93
  this.log.info(`Received identify command request ${data.request.identifyTime} for endpoint ${data.endpoint?.number}`);
94
94
  });
@@ -113,13 +113,13 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
113
113
  await this.registerDevice(outletDevice);
114
114
  }
115
115
  }
116
- for (let i = 0; i < this.config.loadLights; i++) {
116
+ for (let i = 0; i < this.config.loadLights; i += 1) {
117
117
  this.setSelectDevice('serial_light_' + i, 'Light ' + i);
118
118
  if (!this.validateDevice('Light ' + i))
119
119
  continue;
120
120
  const lightDevice = new MatterbridgeEndpoint([colorTemperatureLight, bridgedNode, ...(this.config.enableElectrical ? [electricalSensor] : []), ...(this.config.enablePowerSource ? [powerSource] : [])], { id: 'Light' + i }, this.config.debug);
121
121
  lightDevice.log.logName = 'Light' + i;
122
- lightDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Light ' + i, 'serial_light_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', parseInt(this.version.replace(/\D/g, '')), this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
122
+ lightDevice.createDefaultBridgedDeviceBasicInformationClusterServer('Light ' + i, 'serial_light_' + i, 0xfff1, 'Matterbridge', 'Matterbridge test plugin', Number.parseInt(this.version.replace(/\D/g, '')), this.version, Number.parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion);
123
123
  lightDevice.addCommandHandler('identify', (data) => {
124
124
  this.log.info(`Received identify command request ${data.request.identifyTime} for endpoint ${data.endpoint?.number}`);
125
125
  });
@@ -197,7 +197,7 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
197
197
  };
198
198
  async intervalHandler() {
199
199
  this.log.info('Interval called');
200
- for (let i = 0; i < this.config.loadSwitches; i++) {
200
+ for (let i = 0; i < this.config.loadSwitches; i += 1) {
201
201
  const device = this.getDeviceByName('Switch ' + i);
202
202
  const state = device?.getAttribute(OnOff, 'onOff');
203
203
  await device?.setAttribute(OnOff, 'onOff', !state, device?.log);
@@ -225,7 +225,7 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
225
225
  }
226
226
  }
227
227
  }
228
- for (let i = 0; i < this.config.loadOutlets; i++) {
228
+ for (let i = 0; i < this.config.loadOutlets; i += 1) {
229
229
  const device = this.getDeviceByName('Outlet ' + i);
230
230
  const state = device?.getAttribute(OnOff, 'onOff');
231
231
  await device?.setAttribute(OnOff, 'onOff', !state, device?.log);
@@ -255,7 +255,7 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
255
255
  }
256
256
  }
257
257
  }
258
- for (let i = 0; i < this.config.loadLights; i++) {
258
+ for (let i = 0; i < this.config.loadLights; i += 1) {
259
259
  const device = this.getDeviceByName('Light ' + i);
260
260
  const state = device?.getAttribute(OnOff, 'onOff');
261
261
  await device?.setAttribute(OnOff, 'onOff', !state, device?.log);
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "matterbridge-test",
3
- "version": "2.0.19",
3
+ "version": "2.0.20-dev-20260614-bf23d6a",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-test",
9
- "version": "2.0.19",
9
+ "version": "2.0.20-dev-20260614-bf23d6a",
10
10
  "license": "Apache-2.0",
11
- "dependencies": {
12
- "node-ansi-logger": "3.2.1",
13
- "node-persist-manager": "2.0.2"
14
- },
15
11
  "engines": {
16
12
  "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"
17
13
  },
@@ -19,76 +15,6 @@
19
15
  "type": "buymeacoffee",
20
16
  "url": "https://www.buymeacoffee.com/luligugithub"
21
17
  }
22
- },
23
- "node_modules/node-ansi-logger": {
24
- "version": "3.2.1",
25
- "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.2.1.tgz",
26
- "integrity": "sha512-R5YptDlGVfVqACSiOtfmAwV+N/ytj8crwXStrs9d9kdAXYT4xF1J1H5qfhGbXsot06OHSha76Y2Fq66sIzMq2A==",
27
- "hasShrinkwrap": true,
28
- "license": "Apache-2.0",
29
- "engines": {
30
- "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0"
31
- },
32
- "funding": {
33
- "type": "buymeacoffee",
34
- "url": "https://www.buymeacoffee.com/luligugithub"
35
- }
36
- },
37
- "node_modules/node-persist-manager": {
38
- "version": "2.0.2",
39
- "resolved": "https://registry.npmjs.org/node-persist-manager/-/node-persist-manager-2.0.2.tgz",
40
- "integrity": "sha512-FGDdNOH4c6Xqb2LwTZ55GT0UaoqaOiWJ+hWt+O7w1+9QIUQh2NsaXPtGaTiibvCi6cX823JTFQPJK2NRseLTvw==",
41
- "hasShrinkwrap": true,
42
- "license": "Apache-2.0",
43
- "dependencies": {
44
- "node-persist": "4.0.4"
45
- },
46
- "engines": {
47
- "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0"
48
- },
49
- "funding": {
50
- "type": "buymeacoffee",
51
- "url": "https://www.buymeacoffee.com/luligugithub"
52
- }
53
- },
54
- "node_modules/node-persist-manager/node_modules/node-persist": {
55
- "version": "4.0.4",
56
- "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-4.0.4.tgz",
57
- "integrity": "sha512-8sPAz/7tw1mCCc8xBG4f0wi+flHkSSgQeX998iQ75Pu27evA6UUWCjSE7xnrYTg2q33oU5leJ061EKPDv6BocQ==",
58
- "license": "MIT",
59
- "dependencies": {
60
- "p-limit": "^3.1.0"
61
- },
62
- "engines": {
63
- "node": ">=10.12.0"
64
- }
65
- },
66
- "node_modules/node-persist-manager/node_modules/p-limit": {
67
- "version": "3.1.0",
68
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
69
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
70
- "license": "MIT",
71
- "dependencies": {
72
- "yocto-queue": "^0.1.0"
73
- },
74
- "engines": {
75
- "node": ">=10"
76
- },
77
- "funding": {
78
- "url": "https://github.com/sponsors/sindresorhus"
79
- }
80
- },
81
- "node_modules/node-persist-manager/node_modules/yocto-queue": {
82
- "version": "0.1.0",
83
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
84
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
85
- "license": "MIT",
86
- "engines": {
87
- "node": ">=10"
88
- },
89
- "funding": {
90
- "url": "https://github.com/sponsors/sindresorhus"
91
- }
92
18
  }
93
19
  }
94
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-test",
3
- "version": "2.0.19",
3
+ "version": "2.0.20-dev-20260614-bf23d6a",
4
4
  "description": "Matterbridge test plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -67,9 +67,5 @@
67
67
  "CHANGELOG.md",
68
68
  "*.config.json",
69
69
  "*.schema.json"
70
- ],
71
- "dependencies": {
72
- "node-ansi-logger": "3.2.1",
73
- "node-persist-manager": "2.0.2"
74
- }
70
+ ]
75
71
  }