Xiaomi Human / Body / Motion Sensor - Timeout

What kind of ZB network topologies are you guys testing this on?
I have 9 motion sensors and a further 33 devices. Did you notice a decrease in network efficiency/responsiveness when you increased the motion sensor’s reporting by 2400%?

Well, I have only 5 motion sensors, 2 door/window sensors from xiaomi connected to Xiaomi gateway, and so far I had no problems.
I have this HW mod for 4 days now.

Can anybody confirm this: The first motion event every few hours is consumed of the chinese voice / mode change of the sensor. As soon as the sensor is already in the “5 seconds mode” it does a good job. In my case: If I come back home at the evening the light doesn’t turn on instantly anymore.

1 Like

I can confirm that. Every few hours modified sensor is not responding on the motion.

1 Like

Do you use Xiaomi Hub or zigbee2mqtt/deconz?

Also, can someone confirm this for me:

  • If sensor detects the motion, it sends a motion back to hub. Then it waits for 60s. If in that 60s, it detects the motion again, it will reset the 60s timer. After 60s, it will send no_motion to hub. Is that correct?
  • The default scan interval in HA is 30s, so in the best case, I’ll see a change from motion->no_motion in 61s and in the worst case in 90s. Is that correct?
  • When the sensor sends a no_motion, can it detects motion again right away, or does it has a timeout for then it can detect motion again?

I guess I can answer my first question and what I wrote is not right. When the sensor detects the motion, it goes to sleep for 60s.

From Aqara FAQ page:

The Aqara Motion sensor is not sensitive to detect motion. Why is that?

The Aqara Motion sensor detects once every minute by default and goes to sleep mode after it is triggered. After one minute, it is triggered again. It might be right in the sleep mode when you were using it.

and also

Some trigger interval of the Motion Sensor is long and some is short. Why is that?

One hour after it is connected to the network (Newly added to the network mode), the Motion Sensor is triggered once every 5 seconds. If it is not triggered within an hour, it automatically enters Normal User Mode. It is then triggered once every minute.

I’ve checked this for a while now. I have no issues with the firmware mod. The motion is detected instantly after even a long idle period. The blue light blinks after the motion is detected but this behavior does not interfere with detection time. Are you still having problems with the firmware mod?

There is a hardware mod explained in this post. You should also use syssi’s custom code to use the new feature. The hardware modded component is not compatible with main HASS code.

I tried but it did not work. still 120s

Did you solder those 2 pins rogether on sensor itself?
It’s working here

It’s working well here with the hardware mod and syssi’s script ! Only one thing… how can I turn off the chinese “every hour” warning from the iOS Mi Home app? I can’t find the option

There is no option to turn it off. So the best way is to lower the notification volume of the hub to zero.

What I mean it’s that in the iOS app I can’t find the notification volume slider.

Never mind. Found it! In iOS app it’s kind of hidden:…

Info about updating to 0.88
for everyone using the software mod and @syssi custom component, should change the name of the folder from binary_sensor to xiaomi_aqara and the name of the .py file from xiaomi_aqara.py to binary_sensor.py.
There was a change to custom component structure that should only give warnings for the moment, but it seems that the warnings only works for new components.
Since there is already a version of binary_sensor in the original xiaomy_aqara component, the custom one gets ignored using the old structure

1 Like

so from now on begin with 0.88 we have to change:

home/homeassistant/.homeassistant/custom_components/binary_sensor/xiaomi_aqara.py
--->
home/homeassistant/.homeassistant/custom_components/xiaomi_aqara/binary_sensor.py

I’m I correct?

Correct. cp. https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/xiaomi_aqara

Dear syssi. I’ve just update my HA to 0.88. After mod hardware. I will download the binary_sensor.py from your link here:

https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/xiaomi_aqara

and copy it to my

home/homeassistant/.homeassistant/custom_components/xiaomi_aqara/

folder. is that correct?

Can you tell me what this version does more in confront with the default one?

hello syssi. I copy the binary_sensor.py file from your link and compare with mine in

but it’s the same. can I use this py file with my moded hardware sensor ? Thanks