Zigbee device read values every x minute

I want to write a script that read every x minutes the value of the device. For example the illuminance or temperature. I have aqara motion sensor, which mesure also the illuminance, but it does not update hassio every x seconds. It sends the date to hassio only when it detected the movement.

So want to write some kind of polling.

If using Zigbee2MQTT

zigbee2mqtt/[FRIENDLY_NAME]/get #

This is the counterpart of the set command. It allows you to read a value from a device. To read e.g. the state of a device send the payload {"state": ""}. What you can /get is specified on the device page under the “Exposes” section.

Illuminance (numeric) #

Measured illuminance in lux. Value can be found in the published state on the illuminance property. It’s not possible to read (/get) or write (/set) this value. The unit of this value is lx.

Whatever you get from polling, it will not be the current value, but the last update.

I am not using Zigbee2MQTT. Using ZHA with ConbeeII

Doesn’t matter, as @m0wlheld wrote you will not be able to get the current value from the sensor. Apart from that illuminance from the this montion sensor is pretty useless, beter take a look at the xiaomi light sensor.

2 Likes

The Philips Hue Motion sensor reports illumination and temperature independent of motion detection.

1 Like

Ok got it. Low cost sensor do not provide details

€ 9.74 is not expensive

yeh but the one i got has: illuminance, occupancy and motion