matterbridge-zigbee2mqtt 2.5.0-dev.4 → 2.5.0-dev.5

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
@@ -17,7 +17,7 @@ New device types:
17
17
  - rainSensor
18
18
  - smokeSensor
19
19
 
20
- If your controller has issues detecting the new device type, blacklist these devices, restart, wait 5 minutes that the controller removes them, remove the blacklist and restart again. This will create a new endpoint on the controller.
20
+ If your controller has issues detecting the new device type, blacklist these devices, restart, wait 5 minutes that the controller removes them, remove the blacklist and restart again. This will create a new endpoint on the controller and the controllers will likely remove and recreate all the devices so make a backup of configurations (i.e. room assignements) and automations on the controller.
21
21
 
22
22
  ## [2.5.0] - 2025-05-23
23
23
 
@@ -27,10 +27,10 @@ If your controller has issues detecting the new device type, blacklist these dev
27
27
  - [waterLeak]: Added waterLeakDetector device type for zigbee property "water_leak". Default to false (i.e. no alarm) since is not possible to get the property.
28
28
  - [rainSensor]: Added rainSensor device type for zigbee property "rain". Default to false (i.e. no alarm) since is not possible to get the property.
29
29
  - [smokeSensor]: Added smokeSensor device type for zigbee property "smoke". Default to false (i.e. no alarm) since is not possible to get the property.
30
- - [colorTemp]: Added conversion from color temperature to rgb for the rgb devices that don't support color temperature.
30
+ - [colorTemp]: Added conversion from color temperature to rgb for the rgb devices that don't support color_temp.
31
31
  - [battery]: Set batChargeLevel to warning if battery is less than 40% and the device doesn't expose battery_low.
32
32
  - [battery]: Set batChargeLevel to critical if battery is less than 20% and the device doesn't expose battery_low.
33
- - [retain]: Send retained mqtt states at startup if z2m has retain enabled.
33
+ - [retain]: Send retained mqtt states at startup if z2m has retain enabled. See the README.md for explanations.
34
34
  - [logger]: Added onChangeLoggerLevel() to the platform.
35
35
 
36
36
  ### Changed
@@ -40,7 +40,12 @@ If your controller has issues detecting the new device type, blacklist these dev
40
40
  - [plugin]: Requires Matterbridge 3.0.3.
41
41
  - [config]: As anticipated in the previous release, the parameter postfixHostname has been removed. Use postfix if needed.
42
42
  - [colorRgb]: Changed the default device type from colorTemperatureLight to extendedColorLight to solve the SmartThings issue with colors.
43
- - [colorTemp]: The min and max mired values are now set in the cluster.
43
+ - [colorTemp]: The min and max mired values for color_temp are now set in the cluster.
44
+
45
+ ### Fixed
46
+
47
+ - [logger]: Fixed logger not always taking the correct value from the frontend.
48
+ - [issue104]: Solved wrong mode AUTO in system_mode for HEAT only devices.
44
49
 
45
50
  <a href="https://www.buymeacoffee.com/luligugithub">
46
51
  <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
package/dist/entity.js CHANGED
@@ -50,7 +50,7 @@ export class ZigbeeEntity extends EventEmitter {
50
50
  this.en = gn;
51
51
  this.ien = ign;
52
52
  }
53
- this.log = new AnsiLogger({ logName: this.entityName, logTimestampFormat: 4, logLevel: platform.debugEnabled ? "debug" : "info" });
53
+ this.log = new AnsiLogger({ logName: this.entityName, logTimestampFormat: 4, logLevel: platform.debugEnabled ? "debug" : platform.log.logLevel });
54
54
  this.log.debug(`Created MatterEntity: ${this.entityName}`);
55
55
  this.platform.z2m.on('MESSAGE-' + this.entityName, (payload) => {
56
56
  const now = Date.now();
@@ -106,6 +106,10 @@ export class ZigbeeEntity extends EventEmitter {
106
106
  if (!z2m)
107
107
  z2m = z2ms.find((z2m) => z2m.property === propertyMap?.name);
108
108
  if (z2m) {
109
+ if (z2m.valueLookup && propertyMap.values && propertyMap.values !== '' && typeof value === 'string' && !propertyMap.values.includes(value)) {
110
+ this.log.debug(`*Payload entry ${CYAN}${key}${db} value ${CYAN}${value}${db} not found in propertyMap values ${CYAN}${propertyMap.values}${db}`);
111
+ return;
112
+ }
109
113
  if (z2m.converter || z2m.valueLookup) {
110
114
  this.updateAttributeIfChanged(this.bridgedDevice, propertyMap === undefined || propertyMap.endpoint === '' ? undefined : propertyMap.endpoint, z2m.cluster, z2m.attribute, z2m.converter ? z2m.converter(value) : value, z2m.valueLookup);
111
115
  return;
@@ -1016,11 +1020,17 @@ export class ZigbeeDevice extends ZigbeeEntity {
1016
1020
  zigbeeDevice.propertyMap.delete('running_state');
1017
1021
  zigbeeDevice.bridgedDevice.createDefaultHeatingThermostatClusterServer(undefined, undefined, minHeating, maxHeating);
1018
1022
  mainEndpoint.clusterServersIds.splice(mainEndpoint.clusterServersIds.indexOf(Thermostat.Cluster.id), 1);
1023
+ const sMode = zigbeeDevice.propertyMap.get('system_mode');
1024
+ if (sMode)
1025
+ sMode.values = 'off|heat';
1019
1026
  }
1020
1027
  else if ((!heat && cool) || (!system_mode_values?.includes('auto') && system_mode_values?.includes('cool'))) {
1021
1028
  zigbeeDevice.propertyMap.delete('running_state');
1022
1029
  zigbeeDevice.bridgedDevice.createDefaultCoolingThermostatClusterServer(undefined, undefined, minCooling, maxCooling);
1023
1030
  mainEndpoint.clusterServersIds.splice(mainEndpoint.clusterServersIds.indexOf(Thermostat.Cluster.id), 1);
1031
+ const sMode = zigbeeDevice.propertyMap.get('system_mode');
1032
+ if (sMode)
1033
+ sMode.values = 'off|cool';
1024
1034
  }
1025
1035
  else {
1026
1036
  zigbeeDevice.bridgedDevice.createDefaultThermostatClusterServer(undefined, undefined, undefined, undefined, minHeating, maxHeating, minCooling, maxCooling);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.5.0-dev.4",
3
+ "version": "2.5.0-dev.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-zigbee2mqtt",
9
- "version": "2.5.0-dev.4",
9
+ "version": "2.5.0-dev.5",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "moment": "2.30.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.5.0-dev.4",
3
+ "version": "2.5.0-dev.5",
4
4
  "description": "Matterbridge zigbee2mqtt plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",