Xiaomi & Aqara Devices - Pairing & Keeping them connected

I recently changed my HE ZigBee channel to 21 and now I'm rebuilding since 26 didn't seem to be an optimal option.

Using your settings I was able to get the first XBee3 to join but when I use the same config but just changing NI the second one won't pair. Are there any other settings that need to be unique?

I had the same problem a few days ago It was like it was stuck
where the hub initially saw the device but I tried doing some other settings so removed the Xbee and then tried re-pairing it but it didn't finish pairing and then hub would not see the xbee but when I did a scan with my other connected xbees they saw it connected to the hubitat network even though Hubitat didn't see it.
not sure if using Xtcu to recover the xbee and rewrite it's firmware fixed it or setting the problem xbee to an end device and then re-pairing it fixed. After setting it to an end device and re-pairing it to Hubitat. Hubitat could see it then. I could then remove it from Hubitat and reset the xbee setting back to a router and pair it again to Hubitat
I would try the recovery firmware option first.
end devices settings and a few I have also adjusted to attempt improvement
NJ = FF (to extend the joining time might help so device pair to them first)
NH = FF (maybe so devices could travel farther by going through more routers)
AP = 0 (for an end device)
SM = 1 (has to be not 0 for end devices)

of course to pair it after writing all the settings remove power from the xbee then put the hub into pairing and repower the xbee.

Updated last night to the latest FW, and had several Xiaomi devices drop off (last events recorded just before the update), after being connected with no issue before the update. Anyone else suffered this? Hopefully this is the result of the hanging after at 15% which a fix has been released today, but still a little worried. Cheers

1 Like

Not have any issues after the update, but I have experienced Aqara Motion sensors not responding after a reboot. Infrequently though. A press of the pairing button creates a new checkin and then they work fine.

Cheers @SmartHomePrimer, I'm watching the logs like a hawk just in case. It wasn't all of them just some. I've just updated again, and watching..... again. Fingers crossed they start reporting soon.

1 Like

@veeceeoh maybe remove The Orvibo Zigbee Smart Outlets from the list of compatible devices as they appear to cause more trouble than they are worth.
The Orvibo Zigbee Smart Outlets were creating a ghost mac FFFF device that could only be seen with the Xbee scans and created interference with other devices.
They did work with Xiaomi devices but may cause random problems.

So I have had my Xbee3 connected And all devices working for weeks but then I had a power outage and only a few rejoined automatically. All my non xiaomi sensors rejoined ok but I have about 1/3 of my xiaomi’s rejoin.

Any ideas on ways to improve the rejoining process with out me having to rediscover/pair them again?

Do you have battery backups? Later this week when my Xbees get delivered, I hope rebuild my mesh with as many Xiaomi sensors routing through them as possible. One Xbee will be plugged into an inexpensive phone charging brick that will be always plugged in, and the other Xbee will be plugged into the UPS that the hub is already on. That's my plan-whether it works, we'll see.

1 Like

I’ll second the UPS recommendation and suggest not to assume you need to re-pair your Xiaomi devices that are not connected. This happened to me when I lost power for an extended period.

First, try just pressing the pairing button, and watch the driver settings page to see if you get a check-in. If you do, trigger the sensor and look to see if you get an updated event.

I use a couple of "low-power" UPS units, both of which have USB ports in addition to AC outlets, so that my hubs and two XBees can survive (relatively short) power outages.

I haven't tried it yet, but for my 3rd XBee, I plan to get a USB battery backup phone charger pack and leave it plugged in to AC. I just don't know if they maintain uninterrupted USB power supply if the AC power quits suddenly. Even if it leads to the Bee restarting, that should be fine, I've restarted them (powered off and then on) plenty of times and not lost any Zigbee device connections.

This often works as opposed to putting the Hubitat in discovery mode and single pressing the pairing button, just remember that pressing the pairing button on Xiaomi motion sensors puts them into "testing" mode, meaning the hardware motion detection timeout shortens to just 3-5 seconds for a period of several hours.


Thanks Keith! That's really useful information I was not aware of.

@veeceeoh regarding the usb battery backup I have one plugged to one of my Xbees and then always charging plugged to the wall and the Xbee stays on if I pull the wall power.

1 Like

Would you mind sharing brand/model you are using? I tried two different ones and neither would charge and discharge simultaneously. I really don't want to have to get yet another APC with USB ports. Thanks

I have a very nice Anker battery and it's true!! I start charging my phone and then plug in the wall wart to charge it and the phone's charge light goes out. :frowning:

So yea, which ones do both? :slight_smile:

I got this one 6 years ago from Costco in Canada. It does not have a brand name on it only says "portable battery charger model apb02f" which looks similar to and has the same specs as an Aluratek (model number matches) but have they update the electronics and will new version still work I do not know. It doesn't look exactly the same as mine so it has been updated.

I also happen to buy a couple of new battery packs on amazon prime day an Aukey and an ikits you are correct they do not work at all, neither works with the Xbee.
The Xbee actually powers off after about a minute whenever plugged in to these does not matter if they are plugged to the wall or not it is like the battery packs do not sense enough draw and they power off.

1 Like

Thanks for the reply. I'll do some research and see what I can find. I don't really have the want or need for a full-fledged UPS in the location I'd like to place my second Xbee. I'll post for others if I find anything that works.

As I'm not using an Xbee and still relying on having the Xiaomi remain an end device of the Hubitat, I suspect I may have a determined a cause for the one 'random' drop off that I've had since my (unrelated) total Zigbee meldown from several weeks ago... during one of the hub firmware updates that I have been doing recently, I think I happened to initiate one around the same time that one of my Xiaomi buttons was attempting to check in. From now on before doing anything that will take my hub offline, I think I will make it a habit to see if it will coincide with an hourly 'last checkin' time (as reported by Keith's driver). Not sure if one failed checkin will bounce it offline. Anyone know for sure?

@csteele @bjcowles and @veeceeoh
Just as a test I plugged a tablet into my dual charger ikits and then my Xbee and it stayed powered on so it is a low power draw that triggers the new battery packs to turn off. I could unplug and plug the ikits battery pack main charging power no problem and it would not affect the Xbee. But a minute after I pulled the charging from the tablet the battery pack would shut down to the xbee.

This may be comparing apples to oranges, but when all of my Xiaomi stuff was connected directly to the hub, I caught an Aqara Leak Sensor missing two check-ins. After I removed the giant can of hair product that was covering it, the next check-in was successful and it was business as usual.

Ah, so it recovered without intervention once the signal was no longer blocked. So maybe I needn't bother watching out for the check in time when I do my hub firmware updates.

Download the Hubitat app