Open dinde opened 1 year ago
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
bump
What is the actual calculation?
any update? ive face the same issue
Same here. The lux values is much more high than other iluminace sensor in same place.
Same here. Compared to Eve Motion sensors the Lux values of ZG-204ZL are way too high.
Looks like this one is using illuminance()
: https://github.com/Koenkk/zigbee-herdsman-converters/blob/3ec951e4c16310be29cec0473030827fb9a5bc23/src/devices/tuya.ts#L6301
Others use illuminance_lux()
https://github.com/Koenkk/zigbee-herdsman-converters/blob/3ec951e4c16310be29cec0473030827fb9a5bc23/src/devices/tuya.ts#L6391 which should go through this conversion: https://github.com/Koenkk/zigbee-herdsman-converters/blob/3ec951e4c16310be29cec0473030827fb9a5bc23/src/converters/fromZigbee.ts#L466
I just tried illuminance_lux
in an external converter and it didn't seem to make a difference, still 2500 lux for fairly dim indoor lighting.
Hmm:
[2024-06-08 23:41:32] debug: z2m: Received Zigbee message from 'motion1', type 'attributeReport', cluster 'msIlluminanceMeasurement', data '{"measuredValue":34059}' from endpoint 1 with groupID 0
[2024-06-08 23:41:32] debug: z2m: No converter available for 'ZG-204ZL' with cluster 'msIlluminanceMeasurement' and type 'attributeReport' and data '{"measuredValue":34059}'
Math.pow(10, (34059 - 1) / 10000)
is 2546 which is what I'm seeing in the UI so it's definitely going through the converter. I have a different sensor that reports 56 lux so it seems like this one needs something like / 20000
instead?
Yeah idk how this works actually, it has the raw value here https://github.com/Koenkk/zigbee2mqtt/blob/0e6da85d195f8696379cc55a1c34e5f495121063/lib/extension/receive.ts#L108
then in herdsman-converters it's an array again, this function https://github.com/Koenkk/zigbee-herdsman-converters/blob/3ec951e4c16310be29cec0473030827fb9a5bc23/src/lib/tuya.ts#L1383 gets [0, 0, 8, 187]
and turns it into 2235
with https://github.com/Koenkk/zigbee-herdsman-converters/blob/3ec951e4c16310be29cec0473030827fb9a5bc23/src/lib/tuya.ts#L27
I'm not sure if it's really the RAW value that the ZG-204ZL device delivers. I compared it with my HUE sensor (Philips 9290012607), which displays both the RAW value and the LUX value. I placed both devices right next to each other in the same room for the test. The result was:
Hi, anything we can do to show the correct value? itβs currently night time over here and the lux values are incorrect.
I have 2 of these devices..try and guess which ones from the screenshot? :D
bump
What happened?
Just installed a ZG-204ZL motion sensor with luminance sensor. Values reported for illuminance as lux is in fact raw (number can't be that high)
What did you expect to happen?
illuminance is raw not in lux. As a feature it could be nice to have both values (with a converter directly in z2m but it's manageable thru home assistant as well).
How to reproduce it (minimal and precise)
Just install it
Zigbee2MQTT version
1.32.2
Adapter firmware version
20230507
Adapter
Sonoff ZBDongle-P
Debug log
Will upload if needed/requested