matterbridge-zigbee2mqtt 2.8.0 → 2.8.1-dev-20251001-5cc1ecd
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 +22 -0
- package/dist/entity.js +18 -7
- package/dist/platform.js +1 -1
- package/npm-shrinkwrap.json +42 -42
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
8
8
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="120">
|
|
9
9
|
</a>
|
|
10
10
|
|
|
11
|
+
## [2.8.1] - 2025-10-01
|
|
12
|
+
|
|
13
|
+
### Automations and scenes
|
|
14
|
+
|
|
15
|
+
The package [zigbee2mqtt-automations](https://github.com/Luligu/zigbee2mqtt-automations) has been updated to version 3.0.0 that includes also scenes.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- [package]: Updated dependencies.
|
|
20
|
+
- [workflows]: Ignore any .md in build.yaml.
|
|
21
|
+
- [workflows]: Ignore any .md in codeql.yaml.
|
|
22
|
+
- [workflows]: Ignore any .md in codecov.yaml.
|
|
23
|
+
- [jest]: Updated jestHelpers to v. 1.0.6.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- [platform]: Fixed command handlers execution when the controllers send scenes.
|
|
28
|
+
|
|
29
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
30
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
31
|
+
</a>
|
|
32
|
+
|
|
11
33
|
## [2.8.0] - 2025-09-14
|
|
12
34
|
|
|
13
35
|
### Breaking changes
|
package/dist/entity.js
CHANGED
|
@@ -238,6 +238,12 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
238
238
|
this.propertyMap.clear();
|
|
239
239
|
}
|
|
240
240
|
cachePublish(command = 'unknown', payload, transitionTime) {
|
|
241
|
+
if (command === 'moveToColorTemperature') {
|
|
242
|
+
delete this.cachePayload['color'];
|
|
243
|
+
}
|
|
244
|
+
else if (command === 'moveToColor' || command === 'moveToHueSaturation' || command === 'moveToHue' || command === 'moveToSaturation') {
|
|
245
|
+
delete this.cachePayload['color_temp'];
|
|
246
|
+
}
|
|
241
247
|
if (payload)
|
|
242
248
|
this.cachePayload = { ...this.cachePayload, ...payload };
|
|
243
249
|
if (this.transition && transitionTime && transitionTime / 10 >= 1)
|
|
@@ -369,7 +375,8 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
369
375
|
}
|
|
370
376
|
}
|
|
371
377
|
async moveToColorTemperatureCommandHandler(data) {
|
|
372
|
-
|
|
378
|
+
delete this.cachePayload['color'];
|
|
379
|
+
if (data.endpoint.getAttribute(OnOff.Cluster.id, 'onOff') === false || (data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorMode') === ColorControl.ColorMode.ColorTemperatureMireds && data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorTemperatureMireds') === data.request.colorTemperatureMireds)) {
|
|
373
380
|
this.log.debug(`*Command moveToColorTemperature ignored for ${this.ien}${this.isGroup ? this.group?.friendly_name : this.device?.friendly_name}${rs}${db} endpoint: ${data.endpoint?.maybeId}:${data.endpoint?.maybeNumber} light OFF or colorTemperatureMireds unchanged`);
|
|
374
381
|
return;
|
|
375
382
|
}
|
|
@@ -384,7 +391,8 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
384
391
|
}
|
|
385
392
|
}
|
|
386
393
|
async moveToColorCommandHandler(data) {
|
|
387
|
-
|
|
394
|
+
delete this.cachePayload['color_temp'];
|
|
395
|
+
if (data.endpoint.getAttribute(OnOff.Cluster.id, 'onOff') === false || (data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorMode') === ColorControl.ColorMode.CurrentXAndCurrentY && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentX') === data.request.colorX && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentY') === data.request.colorY)) {
|
|
388
396
|
this.log.debug(`*Command moveToColor ignored for ${this.ien}${this.isGroup ? this.group?.friendly_name : this.device?.friendly_name}${rs}${db} endpoint: ${data.endpoint?.maybeId}:${data.endpoint?.maybeNumber} light OFF or color unchanged`);
|
|
389
397
|
return;
|
|
390
398
|
}
|
|
@@ -392,7 +400,8 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
392
400
|
this.cachePublish('moveToColor', { ['color' + (this.hasEndpoints ? '_' + data.endpoint.uniqueStorageKey : '')]: { x: Math.round(data.request.colorX / 65536 * 10000) / 10000, y: Math.round(data.request.colorY / 65536 * 10000) / 10000 } }, data.request.transitionTime);
|
|
393
401
|
}
|
|
394
402
|
async moveToHueCommandHandler(data) {
|
|
395
|
-
|
|
403
|
+
delete this.cachePayload['color_temp'];
|
|
404
|
+
if (data.endpoint.getAttribute(OnOff.Cluster.id, 'onOff') === false || (data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorMode') === ColorControl.ColorMode.CurrentHueAndCurrentSaturation && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentHue') === data.request.hue)) {
|
|
396
405
|
this.log.debug(`*Command moveToHue ignored for ${this.ien}${this.isGroup ? this.group?.friendly_name : this.device?.friendly_name}${rs}${db} endpoint: ${data.endpoint?.maybeId}:${data.endpoint?.maybeNumber} light OFF or hue unchanged`);
|
|
397
406
|
return;
|
|
398
407
|
}
|
|
@@ -400,7 +409,8 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
400
409
|
this.cachePublish('moveToHue', { ['color' + (this.hasEndpoints ? '_' + data.endpoint.uniqueStorageKey : '')]: { h: Math.round(data.request.hue / 254 * 360), s: Math.round(data.endpoint.getAttribute(ColorControlCluster.id, 'currentSaturation') / 254 * 100) } }, data.request.transitionTime);
|
|
401
410
|
}
|
|
402
411
|
async moveToSaturationCommandHandler(data) {
|
|
403
|
-
|
|
412
|
+
delete this.cachePayload['color_temp'];
|
|
413
|
+
if (data.endpoint.getAttribute(OnOff.Cluster.id, 'onOff') === false || (data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorMode') === ColorControl.ColorMode.CurrentHueAndCurrentSaturation && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentSaturation') === data.request.saturation)) {
|
|
404
414
|
this.log.debug(`*Command moveToSaturation ignored for ${this.ien}${this.isGroup ? this.group?.friendly_name : this.device?.friendly_name}${rs}${db} endpoint: ${data.endpoint?.maybeId}:${data.endpoint?.maybeNumber} light OFF or saturation unchanged`);
|
|
405
415
|
return;
|
|
406
416
|
}
|
|
@@ -408,7 +418,8 @@ export class ZigbeeEntity extends EventEmitter {
|
|
|
408
418
|
this.cachePublish('moveToSaturation', { ['color' + (this.hasEndpoints ? '_' + data.endpoint.uniqueStorageKey : '')]: { h: Math.round(data.endpoint.getAttribute(ColorControlCluster.id, 'currentHue') / 254 * 360), s: Math.round(data.request.saturation / 254 * 100) } }, data.request.transitionTime);
|
|
409
419
|
}
|
|
410
420
|
async moveToHueAndSaturationCommandHandler(data) {
|
|
411
|
-
|
|
421
|
+
delete this.cachePayload['color_temp'];
|
|
422
|
+
if (data.endpoint.getAttribute(OnOff.Cluster.id, 'onOff') === false || (data.endpoint.getAttribute(ColorControl.Cluster.id, 'colorMode') === ColorControl.ColorMode.CurrentHueAndCurrentSaturation && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentHue') === data.request.hue && data.endpoint.getAttribute(ColorControl.Cluster.id, 'currentSaturation') === data.request.saturation)) {
|
|
412
423
|
this.log.debug(`*Command moveToHueAndSaturation ignored for ${this.ien}${this.isGroup ? this.group?.friendly_name : this.device?.friendly_name}${rs}${db} endpoint: ${data.endpoint?.maybeId}:${data.endpoint?.maybeNumber} light OFF or hue/saturation unchanged`);
|
|
413
424
|
return;
|
|
414
425
|
}
|
|
@@ -667,7 +678,7 @@ export class ZigbeeGroup extends ZigbeeEntity {
|
|
|
667
678
|
group.scenes.forEach((scene) => {
|
|
668
679
|
zigbeeGroup.log.debug(`***Group ${gn}${group.friendly_name}${rs}${db} scene ${CYAN}${scene.name}${db} id ${CYAN}${scene.id}${db}`);
|
|
669
680
|
platform.setSelectDeviceEntity(`group-${group.id}`, 'scenes', 'Scenes', 'component');
|
|
670
|
-
platform.
|
|
681
|
+
platform._registerVirtualDevice(`${platform.config.scenesPrefix ? group.friendly_name + ' ' : ''}${scene.name}`, async () => {
|
|
671
682
|
zigbeeGroup.log.info(`Triggered scene "${scene.name}" id ${scene.id} from group ${group.friendly_name}`);
|
|
672
683
|
zigbeeGroup.publishCommand('scene_recall', group.friendly_name, { scene_recall: scene.id });
|
|
673
684
|
});
|
|
@@ -885,7 +896,7 @@ export class ZigbeeDevice extends ZigbeeEntity {
|
|
|
885
896
|
Object.values(endpoint.scenes).forEach((scene) => {
|
|
886
897
|
zigbeeDevice.log.debug(`***Device ${dn}${device.friendly_name}${rs}${db} endpoint ${CYAN}${key}${db} scene ${CYAN}${scene.name}${db} id ${CYAN}${scene.id}${db}`);
|
|
887
898
|
platform.setSelectDeviceEntity(device.ieee_address, 'scenes', 'Scenes', 'component');
|
|
888
|
-
platform.
|
|
899
|
+
platform._registerVirtualDevice(`${platform.config.scenesPrefix ? device.friendly_name + ' ' : ''}${scene.name}`, async () => {
|
|
889
900
|
zigbeeDevice.log.info(`Triggered scene "${scene.name}" id ${scene.id} from device ${device.friendly_name}`);
|
|
890
901
|
zigbeeDevice.publishCommand('scene_recall', device.friendly_name, { scene_recall: scene.id });
|
|
891
902
|
});
|
package/dist/platform.js
CHANGED
|
@@ -500,7 +500,7 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
|
|
|
500
500
|
}
|
|
501
501
|
return matterGroup;
|
|
502
502
|
}
|
|
503
|
-
|
|
503
|
+
_registerVirtualDevice(name, callback) {
|
|
504
504
|
let aggregator;
|
|
505
505
|
if (this.matterbridge.bridgeMode === 'bridge') {
|
|
506
506
|
aggregator = this.matterbridge.aggregatorNode;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-zigbee2mqtt",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1-dev-20251001-5cc1ecd",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-zigbee2mqtt",
|
|
9
|
-
"version": "2.8.
|
|
9
|
+
"version": "2.8.1-dev-20251001-5cc1ecd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"moment": "2.30.1",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"node_modules/@types/node": {
|
|
35
|
-
"version": "24.
|
|
36
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.
|
|
37
|
-
"integrity": "sha512-
|
|
35
|
+
"version": "24.6.1",
|
|
36
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.1.tgz",
|
|
37
|
+
"integrity": "sha512-ljvjjs3DNXummeIaooB4cLBKg2U6SPI6Hjra/9rRIy7CpM0HpLtG9HptkMKAb4HYWy5S7HUvJEuWgr/y0U8SHw==",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"undici-types": "~7.
|
|
40
|
+
"undici-types": "~7.13.0"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"node_modules/@types/readable-stream": {
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"node_modules/broker-factory": {
|
|
106
|
-
"version": "3.1.
|
|
107
|
-
"resolved": "https://registry.npmjs.org/broker-factory/-/broker-factory-3.1.
|
|
108
|
-
"integrity": "sha512-
|
|
106
|
+
"version": "3.1.10",
|
|
107
|
+
"resolved": "https://registry.npmjs.org/broker-factory/-/broker-factory-3.1.10.tgz",
|
|
108
|
+
"integrity": "sha512-BzqK5GYFhvVFvO13uzPN0SCiOsOQuhMUbsGvTXDJMA2/N4GvIlFdxEuueE+60Zk841bBU5G3+fl2cqYEo0wgGg==",
|
|
109
109
|
"license": "MIT",
|
|
110
110
|
"dependencies": {
|
|
111
|
-
"@babel/runtime": "^7.28.
|
|
112
|
-
"fast-unique-numbers": "^9.0.
|
|
111
|
+
"@babel/runtime": "^7.28.4",
|
|
112
|
+
"fast-unique-numbers": "^9.0.24",
|
|
113
113
|
"tslib": "^2.8.1",
|
|
114
|
-
"worker-factory": "^7.0.
|
|
114
|
+
"worker-factory": "^7.0.46"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"node_modules/buffer": {
|
|
@@ -215,12 +215,12 @@
|
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
"node_modules/fast-unique-numbers": {
|
|
218
|
-
"version": "9.0.
|
|
219
|
-
"resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-9.0.
|
|
220
|
-
"integrity": "sha512-
|
|
218
|
+
"version": "9.0.24",
|
|
219
|
+
"resolved": "https://registry.npmjs.org/fast-unique-numbers/-/fast-unique-numbers-9.0.24.tgz",
|
|
220
|
+
"integrity": "sha512-Dv0BYn4waOWse94j16rsZ5w/0zoaCa74O3q6IZjMqaXbtT92Q+Sb6pPk+phGzD8Xh+nueQmSRI3tSCaHKidzKw==",
|
|
221
221
|
"license": "MIT",
|
|
222
222
|
"dependencies": {
|
|
223
|
-
"@babel/runtime": "^7.28.
|
|
223
|
+
"@babel/runtime": "^7.28.4",
|
|
224
224
|
"tslib": "^2.8.1"
|
|
225
225
|
},
|
|
226
226
|
"engines": {
|
|
@@ -530,9 +530,9 @@
|
|
|
530
530
|
"license": "MIT"
|
|
531
531
|
},
|
|
532
532
|
"node_modules/undici-types": {
|
|
533
|
-
"version": "7.
|
|
534
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.
|
|
535
|
-
"integrity": "sha512-
|
|
533
|
+
"version": "7.13.0",
|
|
534
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.13.0.tgz",
|
|
535
|
+
"integrity": "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==",
|
|
536
536
|
"license": "MIT"
|
|
537
537
|
},
|
|
538
538
|
"node_modules/util-deprecate": {
|
|
@@ -542,50 +542,50 @@
|
|
|
542
542
|
"license": "MIT"
|
|
543
543
|
},
|
|
544
544
|
"node_modules/worker-factory": {
|
|
545
|
-
"version": "7.0.
|
|
546
|
-
"resolved": "https://registry.npmjs.org/worker-factory/-/worker-factory-7.0.
|
|
547
|
-
"integrity": "sha512-
|
|
545
|
+
"version": "7.0.46",
|
|
546
|
+
"resolved": "https://registry.npmjs.org/worker-factory/-/worker-factory-7.0.46.tgz",
|
|
547
|
+
"integrity": "sha512-Sr1hq2FMgNa04UVhYQacsw+i58BtMimzDb4+CqYphZ97OfefRpURu0UZ+JxMr/H36VVJBfuVkxTK7MytsanC3w==",
|
|
548
548
|
"license": "MIT",
|
|
549
549
|
"dependencies": {
|
|
550
|
-
"@babel/runtime": "^7.28.
|
|
551
|
-
"fast-unique-numbers": "^9.0.
|
|
550
|
+
"@babel/runtime": "^7.28.4",
|
|
551
|
+
"fast-unique-numbers": "^9.0.24",
|
|
552
552
|
"tslib": "^2.8.1"
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
"node_modules/worker-timers": {
|
|
556
|
-
"version": "8.0.
|
|
557
|
-
"resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-8.0.
|
|
558
|
-
"integrity": "sha512-
|
|
556
|
+
"version": "8.0.25",
|
|
557
|
+
"resolved": "https://registry.npmjs.org/worker-timers/-/worker-timers-8.0.25.tgz",
|
|
558
|
+
"integrity": "sha512-X7Z5dmM6PlrEnaadtFQOyXHGD/IysPA3HZzaC2koqsU1VI+RvyGmjiiLiUBQixK8PH5R7ilkOzZupWskNRaXmA==",
|
|
559
559
|
"license": "MIT",
|
|
560
560
|
"dependencies": {
|
|
561
|
-
"@babel/runtime": "^7.28.
|
|
561
|
+
"@babel/runtime": "^7.28.4",
|
|
562
562
|
"tslib": "^2.8.1",
|
|
563
|
-
"worker-timers-broker": "^8.0.
|
|
564
|
-
"worker-timers-worker": "^9.0.
|
|
563
|
+
"worker-timers-broker": "^8.0.11",
|
|
564
|
+
"worker-timers-worker": "^9.0.11"
|
|
565
565
|
}
|
|
566
566
|
},
|
|
567
567
|
"node_modules/worker-timers-broker": {
|
|
568
|
-
"version": "8.0.
|
|
569
|
-
"resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-8.0.
|
|
570
|
-
"integrity": "sha512-
|
|
568
|
+
"version": "8.0.11",
|
|
569
|
+
"resolved": "https://registry.npmjs.org/worker-timers-broker/-/worker-timers-broker-8.0.11.tgz",
|
|
570
|
+
"integrity": "sha512-uwhxKru8BI9m2tsogxr2fB6POZ8LB2xH+Pu3R0mvQnAZLPgLD6K3IX4LNKPTEgTJ/j5VsuQPB+gLI1NBNKkPlg==",
|
|
571
571
|
"license": "MIT",
|
|
572
572
|
"dependencies": {
|
|
573
|
-
"@babel/runtime": "^7.28.
|
|
574
|
-
"broker-factory": "^3.1.
|
|
575
|
-
"fast-unique-numbers": "^9.0.
|
|
573
|
+
"@babel/runtime": "^7.28.4",
|
|
574
|
+
"broker-factory": "^3.1.10",
|
|
575
|
+
"fast-unique-numbers": "^9.0.24",
|
|
576
576
|
"tslib": "^2.8.1",
|
|
577
|
-
"worker-timers-worker": "^9.0.
|
|
577
|
+
"worker-timers-worker": "^9.0.11"
|
|
578
578
|
}
|
|
579
579
|
},
|
|
580
580
|
"node_modules/worker-timers-worker": {
|
|
581
|
-
"version": "9.0.
|
|
582
|
-
"resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-9.0.
|
|
583
|
-
"integrity": "sha512-
|
|
581
|
+
"version": "9.0.11",
|
|
582
|
+
"resolved": "https://registry.npmjs.org/worker-timers-worker/-/worker-timers-worker-9.0.11.tgz",
|
|
583
|
+
"integrity": "sha512-pArb5xtgHWImYpXhjg1OFv7JFG0ubmccb73TFoXHXjG830fFj+16N57q9YeBnZX52dn+itRrMoJZ9HaZBVzDaA==",
|
|
584
584
|
"license": "MIT",
|
|
585
585
|
"dependencies": {
|
|
586
|
-
"@babel/runtime": "^7.28.
|
|
586
|
+
"@babel/runtime": "^7.28.4",
|
|
587
587
|
"tslib": "^2.8.1",
|
|
588
|
-
"worker-factory": "^7.0.
|
|
588
|
+
"worker-factory": "^7.0.46"
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
591
|
"node_modules/ws": {
|