Aqara Motion Sensor stuck initializing

I'm having trouble pairing a motion sensor from Aqara. I have several working well already, but the pairing process has always been difficult. I hold the button down to factory reset the motion sensor each pairing attempt, and sometimes it goes right through, but most of the time (like 20 times in a row now...) it fails by getting stuck at this step:

I have tried looking for errors in the logs, and tried both the "keys in the clear" option and the "avoid repeaters" option but neither help.

Is there some way to debug this? Or is it an Aqara issue that hubitat can't overcome? Is there any logs I can share with Hubitat support to improve hubitat's side of the pairing process?

There are at least 5 or 6 different motion sensors made by Aqara.. and their behaviour is different. wWhat model is the problematic one?

Don't know if this helps but I just went through the same sort of thing with Xiaomi/Aqara.

1 Like

1 Like

Interesting. So my experience with these motion sensors is every blue moon, the pairing works and they work after that no issue at all for me. I'm wondering how this virtual device work around works?

I will look at the logs again, maybe I missed it. In my quick look I didn't see anything.

I have a half dozen of these working without any problems on my C-8 hub.

The key is to pair them via a repeater/router, never directly to the hub.

Remove the battery for a few minutes, then before reinserting the battery back, start the Zigbee pairing in the normal mode.

Pair the sensor again, very close to a mains powered Zigbee device nearby - a zigbee plug as an example. Keep it extremely close,’even touching the zigbee repeater.

If (when it pairs) check the zigbee map - does it show direct connection or via the repeater if your choice? If needed, repeat the same pairing procedure several times, until you see in the map that the older generation Aqara sensor is paired via the repeater.

These old Aqara sensors are ‘sticky’ - once paired via repeater, they will stay connected this way.

Do the press and hold to reset and then when it says initializing, tap the button (do not hold) on the sensor again. It wakes back up and finishes the initialization.

this sounds very promising. I do recall trying a lot of slow (presses of the button every 1-2 seconds) after a factory reset before, and it seemed like that helped once, but I can't seem to get it to work again here.

So there is a long press (> 5 sec) that results in a 3 slow blink pattern from the device with the button still held, then on button release it lights one more time, and then after 5-6 seconds it lights one last time for a bit longer. This is the factory reset.

when I tap the button (instead of long press for > 5 seconds) I get a fast flash from that press, and then (similar to factory reset) after 5-6 seconds it lights one last time for a bit longer.

So is it "awake" I assume during these 5-6 second periods, able to pair/initialize?

Even so, it's been tricky to get the "Found a Zigbee device, initializing..." to show in the first place. And after it does, it seems like I must keep it awake or keep tapping (not long hold as you said).

It feels like there must be some perfect timing sequence to keep alive at just the right times but I have yet to find it.

Note I am using this option:

"[Pair while exchanging keys in clear ]- try if a device is found but gets stuck in the initializing stage."

Ha I don’t know what that option is. I am still on a C7 but I have all my aqara stuff connected to a hubmeshed C5.

I have found the method also worked with some other battery zigbee devices as well. If I seee it seems stuck on the initializing step to long, I poke the button again and it seems pretty repeatable.

Note: yeah now that you mention it, the last two aqara motions that I added, I did have a hard time getting the hub to see the device in the first place. I had to repeat it a couple times.

How many Zigbee devices you have connected to your hub? I think the maximum number of direct paired devices is 30 for the C-8 model. All above must be paired via a repeater.

What is your Zigbee radio power level?

image

I have 40 devices but looks like 8 of those have last msg as "N/A"? so maybe I am hitting a boundary (I have the C-8 hub) but several of these are through a main powered device.

You can open the ZB Beta graphing under Settings and see whats attached directly to the hub.
It takes a bit to populate so I generally let it run for 30 minutes min.
I have 52 devices but only 12 report directly.
FYI I have my ZB power set at 12 and 3 or 4 well place Tuya repeaters. These thiongs are the bomb for signal strength :wink:

Thanks @dnickel, I have added 2 more plug in outlet repeaters since I last posted here, and raised my power to 12 on the hub. I have started also removing a few old devices I wasn't using. The direct connection to the hub is definitely much less than 32 for me as well.

But after all of this, I still can't get past the stage of "initializing". It's even a bit tricky to get to that stage.

So I'm wondering:

  1. are there any deeper logs or maybe some sniffer tool to watch what's happening with this process to see why Hubitat struggles so much during this pairing?
  2. I can try reaching out to aqara to see if they have any special way to make the device stay awake longer?
  3. does anyone have a write up on this already about why it's stuck in initialization? Given the "try this in the clear without security" button that Hubitat provides for this specific issue, it seems like this has at least been discussed?

Ok, after seeing other posts around C8 and the zigbee 3.0 issues, I figured I would try doing the pairing again with the "avoid 3.0 repeaters" option. It worked. I held for 5 seconds to get the 3 slow blinks, and released at the same time as clicking ok to start the pairing timer. I did tap the button maybe twice 3-5 seconds apart to try to nudge it awake again.

When the paining works, it does not sit on the "initializing" prompt for long at all.

Still not sure though what really made it work this time.

I see this in logging , but I don't see any more details about pairing?

Check the Zigbee map - is it connected directly to the HE hub or via an router/repeater?