Xiaomi & Aqara Devices - Pairing & Keeping them connected

I never understood if my Ubiquiti APs should be one the same channel or different channels. Right now they are spread out which makes Zigbee difficult.

I have 2 AP Pro (basement and 2nd floor) and one Mesh (will mount outside once warmer)

It’s been a bit over a week, and all my Xiaomi devices have remained connected with one exception: My two round “original” Xiaomi Buttons.

I have been working on an update to the SmartThings device handler code, so as part of that testing, I’ve been going through the process of pairing those buttons to SmartThings. They pair easily and quickly, always on the first or second instance of putting the button into pairing mode.

However, they will no longer pair with my Hubitat. I don’t even see the Zigbee ID appear, and no related entries in the Zigbee log.

Thinking it may be related to my choice of Zigbee channel 13, I powered down my SmartyThings hub, disabled the 2.4Ghz radio of my WiFi router, and tried pairing the buttons with the Hubitat Zigbee stick set to channels 11, 12, 15 (same as my ST hub), 25, & 26 (my Hubitat’s previous channel). None of those channel changes worked. I have probably long-pressed the reset buttons over 150 times by now, all in vain.

So I’ve contacted the folks at Hubitat to check whether there have been any recent changes that may have affected Zigbee pairing.

On a positive note, however - after changing my Hubitat’s Zigbee channel back to 13, all of my Xiaomi devices resumed their connections without the need to re-pair, and of my other Zigbee devices, there were just two Sengled Classic bulbs that needed to be re-paired.

1 Like

Lucky 13! :wink:
Both my Xiaomi Aqara Leak Sensors are still connected on Zigbee Channel 13. Not a single issue.

after about a week on channel 20 all of a sudden at pretty much the same time a lot of my zigbee devices fell off. not just the Xiaomi but all of my plugs as well and a few other devices I assume due to SmartThings hub also on channel 20. A few other zigbee devices did stay though.
I contacted SmartThings support and apparently only they can change the zigbee channel. They changed it to channel 22 for me.
I also went through every zigbee channel as a test and tried to pair a device on each channel 3-4 times to see which channels saw the device right away if they didn’t see it after 3-4 attempts I moved on to the next channel. I did this with a water and a motion sensor. My best results were on channels 14,15 and 20 but channel 20 still gave me the best results.
I preformed this test a few times and went back and focused on the 3 main channels and tested again.

I also moved 2 more plugs to Hubitat to test with. An iris 3210 (with the zigbee and zwave in it) and a SmartThings plug (F-CEN-APP-1)
So I divided all my Xiaomi devices into 4 groups (the iris plug, SmartThings plug, SYLVANIA plug and directly to the hub) I left the Orvibo out as they are at the far edge of my test area really just testing with my SmartThings Arrival sensors which I paired through the Orvibo outlets.

I have also turned off most of my 2.4 wifi
during the setup I noticed that the plugs if left unplugged to long would not always come back by themselves. I had to discover devices and then push their pairing button and they would then come right back (no need to remove and repair) and if the devices that were paired through them did not come back right away then do the same just go into discover devices an push their pairing button and they appeared right away. (again no need to remove and repair) The interesting thing is they would always stay with the router/repeater devices they had initially been paired though. (unless you removed them and went through the entire pairing process again)
The worst plug so far is the SYLVANIA but once it pairs correctly it does work. even after it was paired correctly when I left it unplugged for awhile and it would not always come back and function correctly right away. I had to go back into device discovery and push the pairing button. Sometime I had to do this a few times until I saw that it’s on/off was functioning correctly and then it worked (had the same issue as when I initially paired it).

So as far as using plugs as repeaters goes I would recommend putting them on a battery backup supply in case of a power outage may cause issues.

Will see how each plug type fairs

So I have about 12 motion sensors and 6 temp/humidity sensors which I migrated to Hubitat and they all stayed connected without issue for about a week. Since they stayed connected that long and were working locally I decided to move the rest of my contact and moisture sensors over from ST which consist of ST contact, Visonic Contacts and Centralite Moisture.

Once I did this my Xiaomi devices started to drop off. I’ve since then changes my WiFi to channel 1 (used to be auto) and changed my zigbee channel to 25. All my non xiaomi moved over to the new channel ok but my Xiaomi only a handful of them seemed to have moved over and are reporting events.

Is there away to manually rejoin the Xiaomi Sensors without having to remove and repair them?

Follow the steps here:

1 Like

Basically just put the hub in “Discover Devices” mode and follow the same steps for pairing, but without removing them from the Hubitat’s device list.

There’s no feedback that the device has rejoined in the “Discover Devices” window, so I would recommend also opening up another browser window with the Zigbee logging page (found in Settings -> Zigbee Information --> Zigbee Logging). When the device has rejoined, there will be Zigbee log entries under its name.

Great, got them all paired back up without having to remove them. Hopefully they all stay on on the new channel…

So I rejoined everything but then the problemmattic xiaomi sensors dropped off again even after changing the zig bee channel. Is it the same in Hubitat like it was in ST where it was recommended to not have any repeater devices on during pairing?

Personally I have no experience as I’ve just bought my first Zigbee repeater and managed to get it to pair with my Hubitat a couple days ago. It’s worth a try to unplug all repeater devices though.

If you scroll up through this thread, look for @NoWon’s posts about his ongoing tests with different repeaters.

How can you tell wether it paired to the hub vs a repeater? I have a few PEQ smart plugs which is a rebranded Centralite 3-series plug, same as ST, LOWE’s etc., plugged throughout the house for various things like coffee machine and space heaters… So I’m wondering if these repeaters arent good with Xiaomi devices. Right now all my non Xiaomi devices stay connected with no issues, and about half my Xiaomi devices stay on. So i’m wondering if the ones that are dropping off are paired to repeaters, jut don’t know how to tell.

When connected to the hub and working properly (responding to commands).
If you unplug the smart plugs do the devices stop responding to commands?
If they do then they (the signal) are going through the smart plugs.
If they continue to work normally then they are not going through the smart plugs.

If they are not going through the smart plugs
You will have to remove the devices from the hub and then with the smart plugs plugged in re pair the devices back into the hub. Then test them to make sure they are going through the plug again.
Best way is to remove power from all repeater devices that you do not want to go through and then pair the device. then restore power back to the other repeaters.

Other than @NoWon's suggestion of unplugging repeaters to see if devices still respond to commands (or in the case of Xiaomi devices, send reports, because they don't respond to commands), there's nothing available from the Hubitat hub interface to help.

I have read on the SmartThings forum that using an XBee module and XCTU software, a Zigbee network can be mapped, which shows exactly which devices are connected through repeaters:

I have just ordered an XBee myself, so I am going to be learning about this in more detail soon!

So after all the problematic sensors were rejoined they all fell off again. So i did a remove and repair to see if that would be better now that all the zigbee repeaters (centralite plugs) were also plugged in an powered. They all fell off again. I’m going to change my zigbee channel and try again. Next i’ll try without repeaters like I did with ST. ST worked fine with all my sensors. So far with Hubitat as soon as I added the non xiaomi sensors most of my xiaomi sensors started to fall off…

for my problematic devices I did not remove them from the hub.
I put the hub in pairing mode and then with the battery cover off of the device very quickly lifted the battery slightly to remove power and put it back. Basically a reset and then pushed/held the pairing button until it flashes 3 times. It has been a few days and they have stayed.
Not just my xiaomi zigbee devices.
doing it a few times just to make sure you got it to reset does not appear to hurt.
I suspect like my SYLVANIA plug the other zigbee devices may not be pairing completely/correctly but once partially paired you can then complete the full pairing.
Just like my SYLVANIA plug which once completely/properly paired has been fine for 10 days now.

I also noticed that when discovering a device and a device was stuck in initializing that doing the battery reset made them complete.

I got my XBee connected last night, and had a look at my Hubitat’s Zigbee mesh map.

It turns out there’s just two Sengled bulbs connected through my Securifi Peanut Plug. But at least now I can do some experimenting with how well Xiaomi devices work/stay connected when paired through the Peanut, or if connected to the Peanut after first pairing directly with my Hubitat hub and then rebuilding the mesh (by turning off the Hubitat’s Zigbee Stick for 20-30 minutes).

I didn’t mention it before, but an XBee can also work as a standalone ZigBee repeater. I’m looking into whether I can power it using a powered USB hub and then when I need to map the mesh network, I could just plug in my laptop to access the XBee.

It will take a while for me to get back with some reports on my Xiaomi device & Zigbee repeater experiments though, because I have been experiencing a number of issues with my Hubitat in the past week. Just last night I discovered events on all devices that Apps were subscribed to were being completely ignored - WebCore, RM, etc., and it was only resolved with a reboot of the hub. Also, a number RM rules have not been working this week as they have, despite no changes. It’s very frustrating and I am really glad that I’m still testing out my Hubitat with a limited number of devices and just a few rules rather than having completely moved over everything immediately from my SmartThings setup.

damn the wife is going to kill me but I ordered the 100 mW version to help extend my coverage area as well.

I’m finding that my Aqara sensors never drop off my network but the original Xiaomi ones do.
I never had any problems with ST. All types were rock solid.
Both my ST and HE hub are using zigbee channel 20.
Would that cause an issue?
I’ve just changed my HE hub to channel 21 to see if it makes a difference. Just waiting for things to check in then we will see what happens.
Is anybody else having similar issues? i.e. Aqara OK but Xiaomi flakey?

From everything I have read, yes, that creates potential for issues due to interference, especially if the two hubs are located nearby. Also, if you’re now using channels 20 & 21 for Zigbee, your 2.4GHz WiFi should be set to channel 1 for the least interference. See my earlier post in this thread here (if you haven’t read it yet.)

As for Aqara sensors vs original Xiaomi ones, I have a bunch of each of Door/Window Sensors and Temp/Humidity sensors, and haven’t seen any trend for one type or the other dropping their connections.

My SmartThings hub, which is in the same centrally located room as my Hubitat and my 5GHz/2.4GHz WiFi router, is on channel 15, and I also never had any Xiaomi devices (original or Aqara) drop off.

Here’s what I’ve tried for channels with my Hubitat Hub so far:

  • Channel 26 - Most Xiaomi devices paired relatively easily, and out of 21, just a nearby Aqara Leak Sensor and a more distant original Xiaomi button lost their connection after 3-4 weeks. I did some reading on Zigbee & 2.4GHz WiFi interference, and after l checked the WiFi channels used by neighbors and read up on how my WiFi router handles its 2.4GHz high-speed mode (see my post here), I decided to change my WiFi 2.4GHz to channel 11 and my Hubitat to Zigbee channel 13.

  • Channel 13 - I got impatient waiting for devices to “find” the new channel after changing it, so I sped up the process by manually re-joining them, which went quite smoothly. But then about a week later, when I was trying to re-join a couple of original Xiaomi buttons that I had temporarily moved over to my SmartThings hub for some DTH code testing, my Hubitat just wasn’t “seeing” them.
    I also wasn’t able to pair a number of other Aqara buttons, including two of the brand new Aqara model WXKG12LM that I had been able to pair with the Hubitat just some days prior. I even tried temporarily changing to a number of other Zigbee channels to see if the devices would repair, but with no success. After another week, after Hubitat staff confirmed there hasn’t been any changes in recent hub updates, and I also wasn’t able to pair a Securifi Peanut Plug I bought, I decided to reset my ZigBee stick and start all over again.
    Due to a glitch with manual Zigbee Channel selection not working correctly after the stick reset, I landed up on channel 20 (but thinking I had chosen channel 13) and suddenly I was able to pair all the devices that had been refusing to pair. Interestingly, before I had reset the Zigbee stick, I had tried pairing devices with the channel set to 20 with no success. So it seems that something had gone wrong with the configuration or data stored on the Zigbee stick that was only cleared out by resetting it. With channel 20 chosen, I then needed to change my 2.4Ghz WiFi channel again, so I’ve set it to Channel 1 for the least interference.

  • Channel 20 - It’s been about a week, and so far, so good. The Xiaomi buttons and the Peanut plug paired easily, as was re-joining all the other Xiaomi devices and my Sengled bulbs that were still on my Hubitat’s device list. Since I now have an XBee that allows me to look at the map of my Zigbee mesh, I will be experimenting with Xiaomi devices connecting through the Peanut Plug (which works as a Zigbee repeater). I’m crossing my fingers that I don’t run into the same troubles as mentioned above which required a Zigbee stick reset to get things working again.

Quite the journey you’ve been on with your Zigbee devices! Lucky 13 still serving me well, including with the two Xiaomi leak sensors and my new Aqara button. Probably because I don’t have that many devices and nothing really that far away from the hub. :man_shrugging:

Download the Hubitat app