Xiaomi Human / Body / Motion Sensor - Timeout

Hello guys ,

Any of you experience Motion sensor to start showing only “occupancy: true” all the time.

This is my 2nd sensor doing that just from nothing. I even put it in a box to be sure its not triggered by something.

Zigbee2MQTT:info  2021-10-08 00:41:27: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":31,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:42:26: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":34,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:42:26: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":34,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:43:28: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":31,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:43:28: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":28,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:44:23: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":28,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:44:23: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":28,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:45:25: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":31,"occupancy":true}'
Zigbee2MQTT:info  2021-10-08 00:45:25: MQTT publish: topic 'zigbee2mqtt/Hall', payload '{"illuminance":0,"illuminance_lux":0,"linkquality":28,"occupancy":true}'```

I have a sort of love/hate relation with these aqare Motion sensors…
Firstly I have about 4 at my place… they are all connected to deconz with combee 2. Most have the firmware 20170627

Sometimes they will work well, and trigger as soon as motion, other times they won’t trigger at all, even if you wave you hand in front to them. However when they don’t do a motion detecting, they will change the LUX setting, which means they are working and commincating.

I also have one which is in my main living room, which will sometimes trigger motion, in the middle of the night, even with all the lights off and nobody is awake…

So, they can be frustrating devices, I don’t use them for anything except for alarm motion. Except the living room, which turns on a light when the lux is low, but like I said, sometimes it will change but not trigger the motion to change…

Not sure if the latest versions are better or not…

Sometimes they will work well, and trigger as soon as motion, other times they won’t trigger at all, even if you wave you hand in front to them. However when they don’t do a motion detecting, they will change the LUX setting, which means they are working and commincating.

This is my exact issue! I also have 4 and 3 of them are acting how you describe. A friend of mine also has the same issue with his Aqara motion sensor.

I was using deCONZ and moved to ZHA hoping the issue would be solved, but it was not.

Does anyone have a fix for this?

Edit: my sensors reset as quickly as 70 seconds and never exceed a 4 minute reset.

I am using this sensors for my lights too. Someone told me a way around so I’m using that now.

I have 2 automations for lights:
1: If motion detected turn light on.
2: If ‘state’ motion sensor turns to off, then turn light off. Als put a delay for some extra mintues if you like.

The interval isn’t changeable far as I read online so this would be a way around.

Not really a fix, but read this post.

The Aqara sensors need a very good network. I changed from zigbee2mqtt to deconz and bought a few repeaters. I have still some Sensor which do not work perfectly, but I could improve the situation with investing into a few repeaters which work well with aqara.

Why wouldn’t Zigbeetomqtt work? It doesn’t fix your network connecting right?

I can’t tell you if it was deconz, the repeater or both. But the network is running better. It is more stable and I have fewer problems with aqara/Xiaomi devices.

I think both, because with the change to deconz I also changed the ZigBee-controller from cc2531 to conbee II.

What repeaters did you go with?

I use one Philips Hue Smart Plug Hue Smart Plug | Philips Hue
a few https://www.reichelt.de/de/de/smart-home-steckdose-smart-plug-osr-smart-plug-p269158.html?utm_source=Preisvergleich_&utm_medium=CPC&utm_campaign=Preisvergleich_&utm_source=psuma&utm_medium=idealo.de&PROVID=2378&&r=1
one Tuya Tuya Smart Zigbee Stecker 16A EU Outlet 3680W Power Meter Compatiable Mit Alexa Und Tuya Hub|Building Automation| - AliExpress
and waiting for two of these BlitzWolf EU Stecker Smart Buchse Zigbee 3,0 Steckdose Strom Monitor Tuya Fernbedienung Timer arbeit mit Alexa Google Hause|Electrical Plug| - AliExpress

Each of the repeaters which is already in use is connected to at least one xiaomi sensor. Mostly motion or temperature, some are buttons.

With zigbee2mqtt and the cc2531 I had problems with disconnecting xiaomi devices. Especially after a restart of homeassistant. Sometimes whe doing nothing. One of them where placed only few meters away from the controller.
Since the change I dont had a single disconnect. Sometimes the sensors reacting not instantly, but most of the time the are reacting and keep connected.

Can someone confirm that hw + (some) sw mode work at this moment?
I’m on cc2531/zigbee2mqtt and have several aqara sensors that need this mod.
Don’t know which way to go.
Any help appreciated much.

does this work for ZHA as well?

There will be no deconz.configure service with zha, so no.

2 Likes

Hi, I have made the hardware mod and can see in the Mi Home app that the motion sensor is triggering regularly. I also have the python script that resets the sensor state to off 5 seconds. However, I can’t see the sensor detecting motion in HA. It detects the first time but then you get the usual long wait until it detects again. I am using the Xiaomi Gateway integration (so not ZHA). Can anyone tell me if I need to do something else or if this hack just doesn’t work unless your using ZHA?

thanks

1 Like

Hi,

I have done the hardware mod on two of my sensors. Unfortunately, the same problem as ben.iffland. After I put the battery back in, the sensor works and passes the status every 5 seconds.
After a few hours, unfortunately, it no longer works.
The sensor detects a movement. After 5 seconds the status changes and then it takes about 60sec until a new movement is detected.
What are we doing wrong? I hope you can help.
Thanks

- alias: 'Xiaomi Aqara Motion Sensors duration fix'
  trigger:
    - platform: homeassistant
      event: start
  action:
    - service: deconz.configure
      data:
        entity: binary_sensor.motion_schlafzimmer
        field: "/config"
        data: {"duration": 5}

Here’s the actual working Node-Red in one single Screenshot…

Hi,
I have been reading all of the solutions in this thread and am a bit confused. Are you saying this is all I would need to fix the issue(and the HW fix of course), no Python scripts, just this Node-Red script. I am using ZHA, does that matter? I have not used Node-Red yet, but I will install it if this works.
Thanks

I am also using ZHA Integration and I only did the solder work and this Node Red entry.

Awesome, I’ll try installing Node-Red this weekend and give it a try. Hopefully this works, my wife is not happy with my sensor so far.
Thanks

This worked perfectly, thanks again.

For everyone using Z2M you can change the value inside the Z2M gui:

image

Have been looking for this, and didn’t realise it was a setting inside the gui of Z2M.