Xiaomi & Aqara Devices - Pairing & Keeping them connected

It can take up to 24 hours or longer depending on the device. It usually should be less than 60 minutes for most devices depending on their reporting frequency.

I would NOT recommend disabling and re-enabling Zigbee Radio nor rebooting immediately after changing the channel. You need to just give it time to update all the devices that the channel has changed.


Thanks @patrick. I changed the channel back to 12 and a lot of the devices started reporting immediately.

Will update my previous post to reflect your advice.

1 Like

Just received my second Xiaomi Aqara leak sensor today. I can confirm that once again, pairing was absolutely no problem using the following sequence:

  1. Hold pairing button for 10 seconds and release
  2. Wait 3 seconds, then double short-press pairing button
  • Sensor shows up with “Initializing”
  1. Wait 3 more seconds and double short-press paring button again
  • Sensor successfully paired and also automatically selected the Xiaomi driver (already installed).
  1. Saved and tested. Wet detected immediately.

I’m going to test this one in the basement to see if it drops off. It’s actually not far from the hub, maybe 25 linear feet.


As Xiaomi devices are designed to work with a Xiaomi hub, I wouldn’t be surprised that they don’t reconnect to the Hubitat after a change of Zigbee channel. Some manual “prodding” may be necessary (as I found I needed to do in my circumstances).

That article on MetaGeek Support by Joel Crane that I linked to a few posts up makes it clear that for best performance of 2.4GHz WiFi and Zigbee Mesh networks in the same space, some planning and testing of an optimal choice of channels may be necessary.

I figure that if I can determine which channel works in keeping all of my Zigbee devices connected all the time, it will be worth the effort.

1 Like

I have the 72922
The hubs (SmartThings and Hubitat) see the device very easily but pairing correctly was a bit hit and miss. You have to make sure the plug functions and reponds to commands correctly. If it does not pair correctly it initially appears correct but does not respond to commands or sometimes only partial commands (ex. on but not off).
To pair it you put the hub in discovery mode, hold the button and then plug it into the wall and keep holding the button until you hear a click. The hub should see it right away. (it may take 3-4 attempts to pair correctly)
I would still like to let this run 3-4 more days to confirm nothing falls off. Usually unplugging and replugging the device back it is fine but once it did fall asleep when I put back in. Similar to the Xiaomi to wake it up I had to put the hub in discover mode and with the plug still plugged in just push and hold the plug button until it clicked and the plug woke up. I had to the same to the Xiaomi devices I had running through it at the time, With out having to re-pair them. They may have come back by themselves but I want to run a week long test with out touching them to see if everything stays connected.
I wonder what range of channels the Xiaomi hub uses.

I have also noticed 99.9% of the time devices when pairing will always go to the repeater device versus the hub. The key is making sure they go to the repeater you want.

DH for the SYLVANIA plug

replace physicalgraph with hubitat
the generic zigbee plug or switch DH would work but always leaves the plug status as unknown and it would not log any events (maybe due to not pairing correctly).

1 Like

I’m not sure if this has been mentioned yet, but Xiaomi devices can be added by monitoring the Zigbee logs and manually entering the DNI using the Add Virtual Device option.

I have used this in cases where the device fails to initialize.

1 Like

Just to update on the progress. My hubitat is back to running on channel 12 and all 3 Ubiquiti APs are running on channel 11. Both Xiaomi sensors have been performing great with hourly updates. It’s been a week and things seems a lot more stable. fingers crossed :slight_smile:

1 Like

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.

Download the Hubitat app