Xiaomi & Aqara Devices - Pairing & Keeping them connected

Suddenly I am losing my Aqara wireless switches, dual and single, the wired switches still seem ok, sometimes you just have to press them 3 or 4 times and they suddenly work again, but sometimes you have to reconnect them. It really is such a shame as they are great switches and nothing can touch them on price or looks. I see they are supported on other Hubs so why can they not be supported here.

What other commercially sold hubs (that are not Xiaomi) offer native support?

This is almost always a mesh issue: if you have repeaters that aren't verified to "play well" with Xiaomi devices, you'll run into problems. The first post in this thread summarizes current findings in this area. If you have anything to contribute based on your experience (what Zigbee routers are you using, and have you done a scan to see what the Xiaomi devices were routing through?), feel free. The other possibility is that they are simply on the fringe of your network's range and "falling off" like any Zigbee device might do for that reason.

SmartThings is the only other commercial hub I'm aware of where these work at all (besides Xiaomi's own), and it's the same situation as Hubitat--not natively supported (requires a custom DTH/driver) and subject to the same Zigbee issues (really a result of them not completely following the ZHA 1.2 standard, which there is little Hubitat or ST can do about--both have already made firmware changes, intentionally on the Hubitat side and perhaps accidentally on ST's, that keep them from falling off when directly paired to the hub).

Some other DIY platforms like Home Assistant and Domoticz offer (also unofficial since there is no documented API on Xiaomi's side) support for these devices through the Xiaomi gateway. This is a LAN connection, not Zigbee, so it's totally different but would also be possible on Hubitat if someone thought it was worth the effort (not likely when most work natively if you're careful about your repeaters--and you could even get a second Hubitat and devote it entirely to Xiaomi-compatible devices if you wanted to be extra sure). Some of these also offer limited support for directly pairing the devices via Zigbee but again with the same limitations as above, not all entirely within the hub/software's control.

What other platforms are you aware of where these are "supported," and in what manner?

Good Morning

The other platform that apparently works with Xiaomi is the Homey by Athom, this is sold over here in the UK and the distributors say is completely compatible with the Xiaomi range. My wireless switches are only 10-30ft from the hub some with near line of site. I do also use the IKEA outlets and don't have any issues with these. It predominately is the Wireless switches that give me grief (well actually she who must be obeyed) I have lots of No Neutral double wired switches and these seem to work OK. Will start enabling logging on all the wireless switches and see if I can correlate what is happening. As I said earlier sometimes you can bring it back by repeatedly pressing the switch and suddenly it works other times you have to reset and rediscover. There seems to be know time limit I have walked past a switch and pressed it to test and it works walk back 1/2 an hour later and it doesn't. Just a thought on the UK version we have two dongles sent, I guess one is a Zwave and the other is a ZigBee is this correct?

Correct.

I have been on channel 20 since April 2018. It has been working great for me. My advice based on experience and everything I've read says to avoid the highest channels, particularly 26.

In choosing channel 20 for myself, I looked at trying to keep interference from my 2.4GHz WiFi at a minimum. See my post here for an initial explanation of how ZigBee and 2.4GHz channels overlap, but there's loads of more detailed info among the Hubitat forums and elsewhere.

Probably, but unless you've got an XBee or the Hubitat getchildandrouteinfo feature (view http://your.hub.ip.address/hub/zigbee/getChildAndRouteInfo, see here for more info) works to see if newly paired Xiaomi / Aqara devices are connected via your Swann Smart Plug, there's currently no way to positively confirm the outlet is not a "friendly" repeater.



The reason why Xiaomi / Aqara devices work on Homey is, as I understand it, that modifications to the ZigBee stack can be community driven. So they were able to bend and break rules as it were, to force compatibility by making exceptions to how certain aspects of ZigBee is meant to operate.

A number of key Homey users have also spent countless hours reverse-engineering how Xiaomi / Aqara devices communicate with a native Xiaomi / Aqara Gateway hub through trial, error, and guess work, all because Lumi United Technology opted to create proprietary formats for many of the ZigBee messages the devices send and receive, instead of following the published specifications by the ZigBee Alliance.

Hubitat is a private company, and so they are free to choose which devices they support, and the honest truth is that Xiaomi / Aqara devices are a hot mess in terms of providing support while at the same time maintaining support for the vast numbers of ZigBee devices that follow the publish spec.

If there were ways to help towards full compatibility in the Hubitat drivers you can bet I would have added that ages ago. But unfortunately, Xiaomi / Aqara devices are completely inflexible in allowing their networking parameters to be adjusted.

It's important to mention that Athom's ZigBee implementation for Homey is far from perfect and has its own host of issues. And if you go searching, you will find that the same issues Xiaomi / Aqara devices have with most repeaters also exist on Homey. See here, for example:

Athom is not using Zigbee Shepherd; an open source implementation of Zigbee for Homey.
This was one of the fastest, and at that time best, options to implement Zigbee on Homey...

Zigbee and Z-wave appear quite similar, but the Z-wave association certifying devices is controlling the implementation more strictly then it’s counterpart for Zigbee...
a result is that the Zigbee devices have more custom implementations; the Xiaomi Zigbee devices are a typical example of it...

In order to be able to support all these custom implementations, Athom already updated it’s Zigbee Shepherd implementation to a level that it is no longer compatible with the open source branch....

From specification perspective Z-wave and Zigbee are quite similar; Z-wave with their command classes and Zigbee with their clusters...

The Zigbee re-write will therefore (most likely) mean a complete re-write of the Zigbee core (abandoning the Zigbee Shepherd) and Zigbee meshdriver, but based on the latest Z-wave core structure, approach and meshdriver...

That quote is from a year ago, and as far as I know, Athom hasn't finished their ZigBee core rewrite and users are still having mesh issues. Also, IAS support, needed for smoke / gas detectors and some other devices, isn't implemented.

TL;DR: Hubitat doesn't support Xiaomi / Aqara devices because those devices don't fully support all aspects of the ZigBee specification. And if you read through their forums, at this time Homey is not looking so homey for Xiaomi / Aqara devices either.

I have a number of the Aqara Wireless 2-button Switches, both the 2016 and 2018 revisions, and I have only seen them drop their connection a few times. Count on one hand few. And response time is immediate; the first time I press after days of no use, the lights turn on / programmed action is taken.

As @bertabcd1234 says, the issues you're describing with your Aqara Wireless Switches sound like a problem with repeaters that don't work with Xiaomi / Aqara devices. Although in most cases, the repeater drops the Xiaomi / Aqara devices' connection (and the Xiaomi / Aqara device does not rejoin as asked to), I have also personally witnessed a repeater only sending some messages from a Xiaomi / Aqara device onward to the hub.

So what ZigBee repeater-capable devices do you have?

3 Likes

Im moving to iris v2s. If anyone in Australia wants my xiaomis for cheap they'll be up for grabs in a week. (13 of them)

Good info. They do not appear at all on the table. But the weird thing is I had three working great on the same setup with ST.

I tried same channel that st was on and a few others. Same repeaters as well. I've given up on these and looking forward to trying the iris V2. Got a bunch for 100 bucks aud not bad.

I'm sorry to hear the Xiaomi devices haven't worked out for you on Hubitat. That is really frustrating.

it's not your fault mate! no need to be sorry. but it has been annoying indeed. I feel good with the sentiment on the v2 iris ones so am excited to get it working right again.

Hi guys,
I'm new HE user and have 3 Aqara sensors for now and they work pretty great for me.
I have a plan to use Zigbee radio only for Xiaomi/Aqara and Tradfri (IKEA) devices, no other brands.
All the rest of system will be based on LAN, ewentually Z-Wave devices.
What do you guys think about that, will this configuration be stable in your opinion ?

I have two Ikea plugs, so last night I reset my channel to 13 and set all my WIFI to channel 11 went round and rejoined everything, whilst doing this I had a thought, what order should this be done in, do you set up the Ikea plugs first as these can act as repeaters? or leave them to last? I do still have my Smartthings hub running and the Philips hue hub running could these be interfering? Can you turn off the ZigBee on the smartthings as I have nothing connected to it that uses ZigBee. So far all appears OK but we shall see :slight_smile:

Outlets first so they can route yes. Or pair everything and shut the hub down for 20 min (although I’ve heard that does not necessarily work with Xiaomi). Yes you can and should shut off the SmartThings Zigbee Radio if you’re not using it.

Hue will not interfere if your HE is on channel 13. My first HE hub is on channel 13, The second HE hub is on 20. My Hue bridge is on 25. No issues and they are just 6 inches from each other.

There is one other solution. It’s a bit much for some people, and out of the question for others, but it works and it’s very reliable. The Aqara HomeKit Hub. Link it to HE with virtual switches via HomeKit automations. Works fine for Switches, Buttons, the Xiaomi dual relay, Contact sensors and Motion. Temp sensor would be a challenge, and I have not tried the vibration sensor. I was only having recurring issues with the contact sensors, which are solid on the Xiaomi hub.

It is ideal if both the SmartThings and Phillips Hue hubs are operating on different channels than the Hubitat Hub.

I don't know of any way to turn off the SmartThings hub's ZigBee radio, but you can check its chosen ZigBee channel by logging into the SmartThings Groovy IDE, going to the My Hubs tab and then scroll down to the ZigBee section to see the channel.

If by some chance, the SmartThings hub ZigBee channel is also 13, you could try shutting it down, removing the batteries for a minute, and then starting it up again, which may force it to choose a different ZigBee channel when it sees another hub is using that channel. Otherwise, it may be necessary to do a hard reset (one user mentioned it quite a while ago here, but I don't know how much that messes up user settings. I would search the ST forums to be sure.

I don't use a Hue Hub, but I remember reading the channel can be changed via the Hue App.

As @SmartHomePrimer stated, repeaters should be paired first when building a ZigBee mesh. Please also see this Hubitat support page: How to Build a Solid Zigbee Mesh

To change SmartThings hub zigbee channel just email SmartThings support and tell them it is conflicting with your other zigbee devices. They will change your channel.
That is how I changed mine.

2 Likes

I never have ANY issues with my v.2 Iris motion sensors. :blush:

1 Like

I have had a experience I'd like to share with others here, in regards to "keeping them connected".
I specifically changed out a number of my zigbee devices, for the Ikea Tradfri repeater, and control outlet. As well, I also put in a number of the 2018 Samsung ST outlets. I believe that I have a stronger zigbee mesh.
I noticed that a number of my Xiaomi Aqara sensors all stopped reporting at one particular date/time. It was in the last few days, but I'm not sure if it was a

  1. hub shutdown
  2. zigbee shutdown
  3. some other event
    that caused those devices (motion detector, leak sensor, temp/humidity sensor) to go "off the mesh".

Anyone know of a particular event that would causes these devices to go "off the mesh"?

I have found ST outlets to be poor repeaters for Xiaomi devices. Since I removed these outlets my mesh has been solid.

That would be the problem, if I were to guess... I mainly use Trafri outlets/repeaters. But when I had the 2018 samsung outlets in my house I had Xiaomi issues. I specifically tried a few after someone said they didn't interfere with their Xiaomi devices - well they did with mine. As soon as I removed them my Xiaomi devices went back to being reliable...

1 Like

I've found the newest/2018 generation to work fine for me--most of my repeaters are either those or the Ikea Trådfri outlets. I don't have a lot of Xiaomi devices anymore, but I had a couple paired through the the new ST outlets that both Hubitat's route info page and my Xbee never showed again, so I couldn't verify where they were actually still routing, but I've never had a Xiaomi device change routes when I was able to check (some have), so I'd guess they didn't. (The Trådfri outlets are also pretty unappealing compared to my other repeaters for most devices that I can see...)

Still only one data point and a questionable one since I quickly lose the ability to verify their route. I wish this didn't happen.

My apologies if my observation was not correct and has caused problems for other people. (Though it would be nice to verify the route info instead of guessing. An Xbee should work, though it doesn't always get my entire network, and Hubitat has had a built-in tool for a while now too. After pairing you could at least use that to see where it's routing--it should be new enough that it still shows. Physical proximity doesn't always predict Zigbee routes.)

No problem, and not interpreted in that way! :slight_smile:

1 Like

I still use mine, but they are at the physical periphery of my zigbee network (monitor washer/dryer). There's only one Aqara sensor close to them, and as you'd predict, it falls off periodically.

I hope the next gen Aqara have power monitoring and a more accessible on/off switch.