I'm going to describe the Zigbee Motion Sensors behavior that were integrated into Home Assistant via Zigbee2MQTT add-on (over CC2531 usb dongle).

What is Zigbee Motion Sensor?

It's the small device that detects movement in front of it. Usually it equips with small battery but has long run operation over a year. If detected the movement, it will broadcast the occupancy status via Zigbee signal.

What are The Statuses That We can Get from the Sensor?

  • occupancy state: which is boolean (true/false or on/off). On means there is a movement in front of the sensor.
  • battery state: Percentage level of battery of the sensor.
  • tamper state: indicates that the sensor may be tampered by someone. Usually it originates from the back plate may be stripped from main box.
  • illuminance state: indicates the illuminance level of that area. The unit is Lux (lx).
  • motion sensitivity: this state can be both set and get so that you can control level of sensitivity to be High, Medium or Low.
  • temperature: yep, temperature.

However, you can't get all above statuses from the cheap sensor. Only occupancy and battery statuses are mandatory from the ground level. You need to pay more to get more. The table below shows statuses that you can get from 3 products.

Brand/Model Occupancy Battery Tamper Illuminance Temperature Motion Sensitivity
Philips 9290012607 Y Y - Y Y Y
Aqara RTCGQ11LM Y Y - Y - -
Sonoff SNZB-03 Y Y Y - - -

Understand Cool Down Period?

Usually they will send the Occupancy trigger when a movement was detected. The clear state is shall be sent from the sensor to gateway as soon as possible. However, these dump sensors are not work like that. They are usually send out the clear signal after 1-3min. If you are building the automation to rely on Occupancy state, you need to reconsider about this limitation.

During the cool down period, the sensor is in DO NOTHING mode. If there is NO movement (after swiped your hand in front of the sensor), the Occupancy state is still On.

Even we applied the setting "occupancy_timeout: SECONDS" to /share/zigbee2mqtt/devices.yml (applicable to only Philips and Aqara sensors), the sensor will send clear state after SECONDS specified. But this is just the fallback setting in Zigbee2MQTT, the actual sensor is still under DO NOTHING mode until the restoration time (1-3 min).

Mitigation of Cool Down Period Issue

We need to do several mitigation steps as describe here to solve the issue in HA's side.

  1. Set the Timer to more than cool down period such as 5 or 10 minutes
  2. When the motion sensor detected a movement, just do your desire action such as "turn on the light" and run "timer.start". This is work for both first time motion detected and the latter. In case of the latter detection, the timer will be restarted.
  3. Set the action on "idle" state of Timer. Then check the motion sensor occupancy status. If it is "on", there is someone in that area so we just need to restart the timer again. If it is "off", it's safe to turn off the light.

Tips for Choosing the Motion Sensor

  • If you need to work with the light's related automation, choose the sensor that ships with illuminance status.
  • If the sensitivity is crucial for your automation, choose Philips's one. It is the only brand that I know which has this capability (adjustable sensitivity level). General sensor has really low distance of detection, Aqara and Sonoff are working fine with 1-3 meters distance.
  • For stability, I don't recommend Sonoff. I got one piece of this sensor and already configured the automation. It worked like a charm during the first day. The latter, it can't even detect the motion when I stand in front of it. But Aqara works fine for me.

Where to Buy?

Note: Affiliate program is applied to all of the above.

Buy me a coffee