itavero / homebridge-z2m

Expose your Zigbee devices to HomeKit with ease, by integrating 🐝 Zigbee2MQTT with 🏠 Homebridge.
https://z2m.dev
Apache License 2.0
325 stars 49 forks source link

[Bug] 'VOC Density': characteristic was supplied illegal value: number 1181 exceeded maximum of 1000 #651

Open Veldkornet opened 1 year ago

Veldkornet commented 1 year ago

Is there an existing issue for this?

Describe the bug

The following warnings are shown in the logs often:

[3/8/2023, 8:56:02 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1004 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:56:59 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1004 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:57:03 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1043 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:58:04 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1067 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:58:29 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1067 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:59:05 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1105 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 8:59:59 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1105 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:00:06 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1091 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:01:07 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1110 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:02:08 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1120 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:02:29 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1120 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:03:09 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1156 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:04:10 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1126 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:05:10 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1170 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:05:29 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1170 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:05:39 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1170 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:06:11 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1183 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:07:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1183 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:07:12 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1200 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:07:14 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1200 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:07:14 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1200 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:07:15 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1200 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:08:13 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1197 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:09:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1197 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:09:13 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1197 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:10:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1197 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:10:14 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1215 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:11:30 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1215 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:13:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1227 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:14:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1216 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:15:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1216 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:15:01 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1261 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:15:39 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1261 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:16:02 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1238 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:17:03 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1229 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:18:04 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1235 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:19:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1235 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:19:05 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1359 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:20:07 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1323 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:21:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1323 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:21:30 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1310 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:22:15 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1310 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:22:31 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1300 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:23:32 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1275 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:24:32 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1226 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:25:33 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1181 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:25:40 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1181 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:26:00 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1181 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:26:33 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1154 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:27:01 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1154 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:27:34 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1132 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:28:02 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1132 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:28:35 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1097 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:29:36 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1101 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:30:37 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1085 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:31:38 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1066 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:32:39 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1045 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:33:01 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1045 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:35:41 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1013 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.
[3/8/2023, 9:36:32 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 1013 exceeded maximum of 1000. See https://homebridge.io/w/JtMGR for more info.

From the documentation here I understand that it should be able to go well beyond 1000, but according to this the maximum is 1000. So Unclear what's going on here...

For reference, I'm using a Frient AQSZB-110

Related devices

Frient AQSZB-110

Related Devices

No response

Steps To Reproduce

No response

Expected behavior

No response

Device entry

No response

Status update

No response

Messages from this plugin

No response

This plugin

1.9.2

Homebridge

1.5.0

Zigbee2MQTT

1.30.2

Homebridge Config UI X (if applicable)

4.50.2

itavero commented 1 year ago

Can you share the exposes information of the device?

I would expect that the plugin takes over the range provided by Zigbee2MQTT (so I want to check if one is provided).

Veldkornet commented 1 year ago

Well, the VOC does work and it shows fine in HomeAssistant for example. It's just HomeBridge that complains as soon as it goes above 1000.

{
    "air_quality": "moderate",
    "battery": 100,
    "battery_low": false,
    "humidity": 52.2,
    "last_seen": "2023-03-09T18:54:19+01:00",
    "linkquality": 18,
    "temperature": 16.2,
    "update": {
        "installed_version": 262145,
        "latest_version": 262145,
        "state": "idle"
    },
    "voc": 282,
    "voltage": 3000,
    "update_available": null
}
itavero commented 1 year ago

The check on the limits is something that Homebridge does. Like I said, I believe I pass the limits provided by Zigbee2MQTT to Homebridge everywhere in my plugin.

If you can share the exposes definition for the device, I can hopefully establish if:

If it's one of the first two scenario's, a PR in zigbee-herdsman-converters is probably needed to resolve it. The last scenario should be resolved in this plugin.

Veldkornet commented 1 year ago

Oh okay, where can I find this information that you need?

itavero commented 1 year ago

As mentioned in the form when you created this issue, the device entry can be found on the MQTT topic zigbee2mqtt/bridge/devices. This includes the exposes information as well. (note: this is different from zigbee2mqtt/bridge/config/devices)

Veldkornet commented 1 year ago

Currently I don't find this device under zigbee2mqtt/bridge/devices, I'll keep my MQTT client open for a while though to see if it appears....

satter commented 1 year ago

I have Aqara VOCKQJK11LM sensor and I've posted about these warnings here

Here is my device entry from topic zigbee2mqtt/bridge/devices: voc_aqara.txt

My thoughts on this

  1. There should be a conversion from ppb to μg/m3 before reporting voc density to homebridge
    z2m now uses μg/m3 by default but not for all devices (mine will still report ppb).
  2. Default limit of 1000 is too low both for ppb and μg/m3 values, I've recorded at least 2000 ppb for my sensor

I will check display_unit setting to compare reported ppb with displayed μg/m3 value

stale[bot] commented 1 year ago

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

Veldkornet commented 1 year ago

Still having issue

Jorick-tv commented 1 year ago

I found that my Prolight ZIgbee bulbs gave a similar issue: [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 555 exceeded maximum of 500. See https.. etc The colour temperature ended up above what is considered "warmest" I turned it down in the exposes of the bulbs. Will report back if error persists

addvanced commented 1 year ago

I got the same problem with some IKEA Trådfri light bulbs. [5/1/2023, 12:22:08 PM] [homebridge-z2m] This plugin generated a warning from the characteristic 'Color Temperature': characteristic was supplied illegal value: number 157 exceeded minimum of 250. See https://homebridge.io/w/JtMGR for more info. [5/1/2023, 12:22:08 PM] [homebridge-z2m] Error: at ColorTemperature.Characteristic.characteristicWarning (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105) at ColorTemperature.Characteristic.validateUserInput (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2923:14) at ColorTemperature.Characteristic.updateValue (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2328:20) at Lightbulb.Service.updateCharacteristic (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:795:35) at PassthroughCharacteristicMonitor.callback (/homebridge/node_modules/homebridge-z2m/src/converters/monitor.ts:28:24) at /homebridge/node_modules/homebridge-z2m/src/converters/light.ts:137:34 at Array.forEach (<anonymous>) at LightHandler.updateState (/homebridge/node_modules/homebridge-z2m/src/converters/light.ts:137:19) at Zigbee2mqttAccessory.updateStates (/homebridge/node_modules/homebridge-z2m/src/platformAccessory.ts:360:15) at Zigbee2mqttPlatform.handleDeviceUpdate (/homebridge/node_modules/homebridge-z2m/src/platform.ts:283:19) [5/1/2023, 12:22:08 PM] [homebridge-z2m] Handled device update for hallway_light: {"brightness":254,"color":{"x":0.3171,"y":0.3152},"color_mode":"xy","color_temp":157,"state":"OFF"}

stale[bot] commented 1 year ago

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

satter commented 1 year ago

This is still an issue

stale[bot] commented 1 year ago

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

satter commented 1 year ago

not stale

itavero commented 1 year ago

@Veldkornet / @addvanced : The issue with the lights is different. As far as I know Zigbee2MQTT includes the range for these properties in the exposes information. If you get a value outside of this range from Zigbee2MQTT, that simply means that the range provided by Zigbee2MQTT is incorrect and should be adjusted in zigbee-herdsman-converters.

With regards to the VOC devices: I would have expected zigbee-herdsman-converters to provide the measuring range of the device as well, but apparently it does not provide this. That means the default range of HomeKit is being used, but I can extend this for sure (if I find time to do so).

stale[bot] commented 1 year ago

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

Veldkornet commented 1 year ago

💩

stale[bot] commented 8 months ago

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

smulle48 commented 6 months ago

I got the same errors with this device.

https://www.zigbee2mqtt.io/devices/VOCKQJK11LM.html#aqara-vockqjk11lm

I starts spamming the log, which kills homebridge-z2m.

It comes alive again when the value is below 1000.

I also got problems with this device:

https://www.zigbee2mqtt.io/devices/E2007.html#ikea-e2007

If you turn off the fan, sometimes the pm25 gets below zero for some reason. This will cause the same error and kill homebridge-z2m