Xiaomi & Aqara Devices - Pairing & Keeping them connected

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.

2 Likes

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.

I was just letting you know they've been resilient in my setup. I think there is merit to your theory, evidenced by something I saw after getting an Xbee. I was rebuilding the mesh, hub powered off, mapping the network when an Aqara contact sensor established a connection with a Cree bulb, or vice versa, in another room. After the hub booted, that connection was dropped in favor of a direct one with the hub.

So, a question. Do you think it is possible your button tried another route after the checkin was not acknowledged because you were updating? And stuck with a repeating device that, more than likely, doesn't play well with Xiaomis?

I wish I knew more about Zigbee and Z-wave behaviors!

That's possible, but since the hub was only offline for a brief time I don't think it should have been long enough for it to try to start searching for another parent. But since Xiaomi has its own unique profile, who knows.... the documented stuff is hard enough to keep track of let alone Xiaomi's quirks (Silicon Labs has a bunch of good Zigbee documentation. Here's a helpful overview document; there are other architecture specs that provide more detail:

I also found that plowing through section 3.6.1.4 of this http://www.zigbee.org/wp-content/uploads/2014/11/docs-05-3474-20-0csg-zigbee-specification.pdf gave me a little bit of understanding of what happens in the join process. But it's like trying to take a sip from a firehose...

1 Like

was searching the web and found reference on an arduino forum to this unit that they say is always on and can output and charge at the same time but I have not tried it myself.

raspberrypi forums are using this one

2 Likes

Really good info here! It's eye-opening to see the complexity and amount of communication in a "simple" network. Thank you.