matterbridge-test 1.0.6 → 1.0.7-dev.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 +11 -0
- package/dist/platform.js +11 -11
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-example-dynamic-platform and sponsoring it.
|
|
6
6
|
|
|
7
|
+
## [1.0.7] - 2025-02-01
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- [package]: Updated dependencies.
|
|
12
|
+
- [package]: Require matterbridge 2.1.0.
|
|
13
|
+
|
|
14
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
15
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
16
|
+
</a>
|
|
17
|
+
|
|
7
18
|
## [1.0.6] - 2025-01-21
|
|
8
19
|
|
|
9
20
|
### Changed
|
package/dist/platform.js
CHANGED
|
@@ -18,8 +18,8 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
18
18
|
bridgedDevices = new Map();
|
|
19
19
|
constructor(matterbridge, log, config) {
|
|
20
20
|
super(matterbridge, log, config);
|
|
21
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('2.
|
|
22
|
-
throw new Error(`The test plugin requires Matterbridge version >= "2.
|
|
21
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('2.1.0')) {
|
|
22
|
+
throw new Error(`The test plugin requires Matterbridge version >= "2.1.0". Please update Matterbridge to the latest version in the frontend.`);
|
|
23
23
|
}
|
|
24
24
|
this.log.info('Initializing platform:', this.config.name);
|
|
25
25
|
this.log.debug('- with matterbridge version ', matterbridge.matterbridgeVersion);
|
|
@@ -104,7 +104,7 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
104
104
|
this.log.info(`Received changeToMode command with request ${data.request.newMode} for endpoint ${data.endpoint?.number}`);
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
switchDevice.addRequiredClusterServers(
|
|
107
|
+
switchDevice.addRequiredClusterServers();
|
|
108
108
|
if (this.noDevices === false)
|
|
109
109
|
await this.registerDevice(switchDevice);
|
|
110
110
|
this.bridgedDevices.set('Switch' + i, switchDevice);
|
|
@@ -138,7 +138,7 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
138
138
|
this.log.info(`Received command changeToMode with request ${data.request.newMode} for endpoint ${data.endpoint?.number}`);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
outletDevice.addRequiredClusterServers(
|
|
141
|
+
outletDevice.addRequiredClusterServers();
|
|
142
142
|
if (this.noDevices === false)
|
|
143
143
|
await this.registerDevice(outletDevice);
|
|
144
144
|
this.bridgedDevices.set('Outlet' + i, outletDevice);
|
|
@@ -193,25 +193,25 @@ export class TestPlatform extends MatterbridgeDynamicPlatform {
|
|
|
193
193
|
this.log.info(`Received command changeToMode with request ${data.request.newMode} for endpoint ${data.endpoint?.number}`);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
lightDevice.addRequiredClusterServers(
|
|
196
|
+
lightDevice.addRequiredClusterServers();
|
|
197
197
|
if (this.noDevices === false)
|
|
198
198
|
await this.registerDevice(lightDevice);
|
|
199
199
|
this.bridgedDevices.set('Light' + i, lightDevice);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
addElectricalMeasurements(device) {
|
|
203
|
-
device.
|
|
204
|
-
device.
|
|
205
|
-
device.
|
|
203
|
+
device.createDefaultPowerTopologyClusterServer();
|
|
204
|
+
device.createDefaultElectricalPowerMeasurementClusterServer(220 * 1000, 2.5 * 1000, 220 * 2.5 * 1000, 50 * 1000);
|
|
205
|
+
device.createDefaultElectricalEnergyMeasurementClusterServer(1500 * 1000);
|
|
206
206
|
}
|
|
207
207
|
addModeSelect(device, description) {
|
|
208
|
-
device.
|
|
208
|
+
device.createDefaultModeSelectClusterServer(description + ' Led Mode Select', [
|
|
209
209
|
{ label: 'Led ON', mode: 1, semanticTags: [] },
|
|
210
210
|
{ label: 'Led OFF', mode: 2, semanticTags: [] },
|
|
211
|
-
], 1, 1)
|
|
211
|
+
], 1, 1);
|
|
212
212
|
}
|
|
213
213
|
addPowerSource(device) {
|
|
214
|
-
device.
|
|
214
|
+
device.createDefaultPowerSourceReplaceableBatteryClusterServer(100);
|
|
215
215
|
}
|
|
216
216
|
async onConfigure() {
|
|
217
217
|
await super.onConfigure();
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-test",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7-dev.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-test",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.7-dev.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "3.0.0",
|