zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Same value for "illuminance" and "illuminance_lux": what's wrong ?

Open david-kracht opened this issue 6 years ago • 2 comments

Hope this small log is ok here.

Sep 21 19:39:47 raspberrypi3 npm[28573]: Zigbee2MQTT:info  2020-09-21 19:39:47: MQTT publish: topic 'home/zigbee/pir/living', payload '{"battery":100,"illuminance":30,"illuminance_lux":30,"linkquality":75,"occupancy":false,"voltage":3015}'
Sep 21 19:39:51 raspberrypi3 npm[28573]: Zigbee2MQTT:info  2020-09-21 19:39:51: MQTT publish: topic 'home/zigbee/pir/hall', payload '{"battery":100,"illuminance":22,"illuminance_lux":22,"linkquality":70,"occupancy":false,"voltage":3025}'
Sep 21 19:40:21 raspberrypi3 npm[28573]: Zigbee2MQTT:info  2020-09-21 19:40:21: MQTT publish: topic 'home/zigbee/pir/sofa', payload '{"battery":100,"illuminance":1,"illuminance_lux":1,"linkquality":72,"occupancy":false,"voltage":3005}'
Sep 21 19:40:28 raspberrypi3 npm[28573]: Zigbee2MQTT:info  2020-09-21 19:40:28: MQTT publish: topic 'home/zigbee/pir/ben', payload '{"battery":91,"illuminance":0,"illuminance_lux":0,"linkquality":70,"occupancy":false,"voltage":2985}'

What happened

Read title.

What did you expect to happen

Convertion done to lux measure.

How to reproduce it (minimal and precise)

Trivial. Just observe sensor reports.

Debug info

Zigbee2MQTT version: 1.14.4 Adapter hardware: CC2531 Adapter firmware version {"maintrel":3,"majorrel":2,"minorrel":6,"product":0,"revision":20190619,"transportrev":2},"type":"zStack12

david-kracht avatar Sep 21 '20 17:09 david-kracht

If this is for an Xiaomi Aqara occupancy sensor this is expected behaviour.

Background: according to the Zigbee spec illuminance values are not directly reported in lux. After finding this out we've create a new property: illuminance_lux which is guaranteed to be the illuminance value in lux. However the Xiaomi already reports it's illuminance in lux, therefore illuminance and illuminance_lux have the same value for this device.

Koenkk avatar Sep 21 '20 18:09 Koenkk

Thanks for the clarification.

david-kracht avatar Sep 21 '20 18:09 david-kracht