Xiaomi Human / Body / Motion Sensor - Timeout

I need some time to overhaul the patch / to check what’s going on here.

1 Like

Thanks for your reply and your initiative.
Looking forward to the patch :wink:

In the meantime I have madded also the other two motion sensors (= now all motion sensors in my system are hardware modded).

I can see that it works in the mi home app.
Unfortunately still not in HA.

As you can see in the logs, your custom component will be used (no error in logs).

Is it really working for anyone here (latest HA)?
Imho my HA system is not very very complex currently…

1 Like

Oh boy im looking for a fix for this as well. Having to wait for 60 or 90 secounds every time makes me go NUTS

I´m getting this error
2019-08-30 18:50:29 ERROR (SyncWorker_2) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/xiaomi_aqara/manifest.json: Expecting value: line 7 column 1 (char 6)

Any help?

solved. it was my fault copiying the files. Works perfect!!!

did you get it to work on the latest version of home assistant 0.98.2

Maybe I overlooked something browsing through all 327 posts but I have a few questions.

  1. Is it correct understood that the timeout can ONLY be changed by modifying the sensor as described? The reason why I ask is because I see some of you who uses {“duration”: 5} to change the refresh time but this is not usable in the long run because it gets back to default setting after a restart or?
  2. I’m using the ConBee2 as gateway - do I still need to create the /custom_components/xiaomi_aqara/ folder with the init.py and binary_sensor.py or is that only applicable when you have the Aqara gateway?

I read almost all comments but some them are not relevant anymore because of some software updates. My case is that my hall or bathroom light does not power on every time. I can say its working 8-9 from 10 but that 1-2 times are freaking me out. Here is my automation.

Hardware:

  • Rasberry Pi 3
  • CC2531 USB stick

Software:
HassIO 0.98.2
HassOS 2.12
zigbee2mqtt 1.5.1.2

My general question is there known a good way to troubleshoot to find which is the cause of the issue. I tried to watch the logs without success of any problems.

  • Link quality
  • Sensors itself
  • HASS
  • zigbee2mqtt
  • CC2531 USB stick

I already plan to increase range with router CC2530

For now, I cannot catch what is the cause because of random behavior.
’Whenever the “robot” is pleased to serve you he is doing it perfectly’

  #Hall light
  - alias: Turn on hall light at 100% when there is movement
    trigger:
      platform: state
      entity_id: binary_sensor.corridor_occupancy_occupancy
      to: 'on'
    condition:
      condition: numeric_state
      entity_id: sensor.corridor_occupancy_illuminance
      below: '15'
    action:
      service: homeassistant.turn_on
      entity_id: light.hall
      data:
        brightness_pct: 100
  - alias: Turn on hall lights at 5% at night
    trigger:
      platform: state
      entity_id: binary_sensor.corridor_occupancy_occupancy
      to: 'on'
    condition:
      condition: time
      after: '00:30'
      before: '05:00'
    action:
      service: homeassistant.turn_on
      entity_id: light.hall
      data:
        brightness_pct: 5
  # Turn off ligts when there is no movement - PIR have 1 min sleep which does not measure
  - alias: Turn off hall light 2 minutes after last movement
    trigger:
      platform: state
      entity_id: binary_sensor.corridor_occupancy_occupancy
      to: 'off'
      for:
        minutes: 2
    action:
      service: homeassistant.turn_off
      entity_id: light.hall

Same thing happens to me too!
I thought it is something with my automation, but I’m using entity controller for my light’s , not automation… So it’s probobly becouse of hardware mod?

yes its working

So, after reading all posts in this topic, it’s still not clear for me if this is gonna work with Aqara motion sensors and Deconz/Conbee II.

I have to mod the sensor(s), but do I also need the custom component? Or do I just make the change in Deconz app, which will reset after re-starting Deconz?

hi, i have a pir modify (with zigbee2mqtt is work), i create the folder with the files.
but the pir return to “no motion” in 2 minutes…

can we help me?

You don`t have to create any folder and add this custom component.
You must change the configuration.yaml setting for this device and add this line occupancy_timeout: 10 - in zigbee2mqtt
Check this - https://www.zigbee2mqtt.io/devices/RTCGQ11LM.html

hi, thanks for the reply.

i dont want to use zigbee2mqtt, i want use this pir in the gateway xiaomi. its possibile?

Yes, then you must add the custom_component.

the custom component is create a folder with a name xiaomi_aqara e the files?
has already been done, but a sensor pir connected to the gateway it takes 2 minutes to change state

This is for me the best solution to get rid of the 120sec delay.
The only problem is when there is a motion after a while, the sensor blink and the gateway is talking. I don’t know why ?!
Other than that, it works perfectly !

so did the PIR connected to the gateway work? such as?

sorry, but does pir xiaomi work on xioami gateway and eliminated the famous 2 minutes?