Aqara Motion Sensor via Homekit Controller stopped working

Hi, i hope someone can help me with my problem.
I habe an Aqara M2 Hub with i integrated via Homekit Controller in HA.
All my windows sensors work fine but the Motion Sensors stopped working.
No Motion is detected, in the Aqara App the working fine.
Does anybody have an idea?


1 Like

The same happened to me after updating to 2022.3 yesterday. Also use M2 hub integrated via HomeKit Controller in HA.
Every Aqara door/window sensor, power-plugs and buttons works as normal, but the motion sensor stopped showing detected motion in HA. They shows up as usual, but they always report CLEAR state. In the Aqara app, motion is detected as usual. Please help anyone, since my automation is based on these sensors.

Thanks a lot.

Hi, i can confirm it has something to do with the newest Update. I am in the beta channel and can confirm it stopped working since 2022.3b1. Also sometimes there is a delay of 5 seconds with the windows sensors.

Thanks for the answer. I’m relatively new in HA, so I have not much experience. Do you think it will work if I install the partial Core backup(2022.2.9) or full backup made before the 2022.03 update? Just while we wait for a fix?
Thanks a lot for helping.


Same here - motion sensors not working in HA since update.

… i did wondered why it was dark in my bedroom when entering it last night :slight_smile: … that explain it

Hi Guys
I reported it to the DEV this morning strange behaviour as well

Github log see here

1 Like

Thanks a lot @thorrrr
Hope someone can fix this, and also fix so that the Xiaomi/Aqara integrations also will work with the Aqara M2 hub so we don’t have to go through HomeKit :slight_smile:

Hi guys - we are tracking the homekit_controller bug here: I only became aware of this when someone raised a bug 2 hours ago, so sorry you guys have been shouting into the void for 2 days :sweat_smile:

Theres also some talk bout motion sensors stopping working when used via other integrations (NOT homekit_controller). I can’t help with that. E.g.

So far what i’m hearing is that connections are still working and data is still updating, but that motion sensors and vibration sensors in particular are not working.

I have an Aqara E1 myself. As of this morning with 2022.3 it still works great, with contact sensors still working immediately. I don’t have motion or vibration sensors.

I’m currently blocked waiting for logs to see whats happening here.

I’m also unable to verify whether anyone who has this issue has working contact sensors. That would be a really useful piece of info.

You can track progress on GitHub.

Any particular problem with HomeKit @aileby? I know some people don’t like Apple and so refuse to touch homekit_controller. They get a bit irrational about it and would rather rely on close source cloud services. But it’s an entirely local protocol, (normally) pushed based. I was pretty impressed with the crypto they used. I use it with my Aqara E1 and never even had to get the Aqara app. And i definitely don’t have an account with either of them. And thats great because Aqara’s “HomeKit only mode” was because they weren’t sure they were GDPR compliant :laughing: . So if there are genuine bugs that I can help with i’d love to know. (Obviously I can only support what the manufacturer bothers to expose).

1 Like

so this is the 3rd, or 4th bug reported ( In few days ) in regards to Aqara-motion-sensors, under various “topic/integration”, might be a good idea to “Combine” them into 1, so different teams, bunch of Devs, are not working on same “issue” … and i see you “popped” upp i 2 others “bugg-reports” requesting people to continue in this “new bugg report” ? , have you and reporter found out that it’s in “your” component, and found the root-cause, or could it be that it’s actually somewhere else in the core - “flow” ?, i still don’t think keep reporting bugs, under each component is the right way( requesting as many Devs as possible, to look at it) , but im sure there is a Way, to Tell Devs, that’s the issue is present in several components. they might come to the conclusion, that it’s NOT in the componants, but else-where
Thou im glad to see that im not alone in regards to failing Aqara motion sensor
@Jc2k but as i’m using Aqara-M2, in Homekit-Controller, i’ll be happy to join this “topic” ( you can get my “analyses” from other bug-report) … i could add, i’ve even tried to reset “motion” device and added again in M2 , and several other “tests”, deleting/adding motion-device in Homekit-controller, dissable/enable device/entity/automation and even made new automation … only thing in common "and that i can’t “figure out” is that in entity-regetry/logs provided here and own findings, is that “Time-Stamp” ends with +00:00 … im sure that’s not where i am, not my server, laptop, phone, and not my setting in HA either … i Have no idea where HA gets this “time-stamp” from, and again no idea how HA works … just telling :slight_smile:
edit: PS: timestamp, i mean last_change/last_update … with a “timezone” hours from my system-settings/Ha -setting , im just thinking “abstract” if a motion-sensor has a timestamp last_updated, telling HA-automation( or other) , im in another timezone than you, do what you wanna do, my guess is HA-in timezone +1, do nothing


I just work on homekit_controller, and only in my free time as a volunteer. I’m not in a position to comment on the developer work flow of the whole project.

The comments I made were in tickets that had signs of being related to homekit_controller. I directed those uses to a ticket which was correctly file and already had some relevant debugging on it.



Thanks for the answers and your help. I am pretty new to HA, so I have not much experience and knowledge about different protocols and how things work. Still trying to learn. When I mentioned that I was hoping the Aqara integration to work with the M2 hub, it was just because I thought that was a better way to make it work in HA instead of through HomeKit. When that said, I have not had any problems with the HomeKit controller until know (only used HA for 2-3 months). So probably it is just in my head :laughing:
I really love HomeAssistant already and so glad I found it :slight_smile:
Again, thanks to everybody that use their spare time to help others and the community :slight_smile:

I installed the latest backup 2022.2.9 and the Aqara motion sensor started working again.

Thanks for the feedback!

The core HA team do push to use “native” protocols where possible. They are more likely to cover all the features of a device, and the people supporting them tend to have the same or similar devices. So often it is a better way.

The downside is sometimes they don’t use “async” API’s so they are slower, sometimes they rely on the cloud to work, and sometimes they don’t support events at all. I think HA could do a better job of helping users to pick the best integration for their use case :cry:

Because I only contribute to homekit_controller I use HomeKit wherever possible to “eat my own dog food”. So annoyed that despite having an Aqara E1 and contact sensors that wasn’t quite the right combination to pick this up in beta. :grimacing:

hi all thanks for above I can confirm also that I installed the backup 2022.2.9 and the Aqara motion sensor started working again so it looks like a problem with latest version and aqara motions
thanks for all the work into HA

Hi all og thanks a lot @Jc2k for the great work.
After updating to 2022.3.2 today, the motion sensors works again :slight_smile:

confirm today also 2022.3.2 working with Aqara motion sensors :grinning:

Good to hear everyone.

For anyone not following the GH ticket, it was a very silly bug. In HomeKit a motion sensor (and vibration sensor) are “boolean” characteristics. Thats the homekit version of a binary sensor. Typically in HomeKit a boolean is true or false. Turns out devices can return true or 1 for motion detected. It depends on what the vendor decides. We only expected true, and the devices I owned only return true. It was previously only working by accident.

We now explicitly handle 1 and 0 for all boolean characteristics in the underlying library.

1 Like