Xiaomi & Aqara Devices - Pairing & Keeping them connected

The only things I can add to @NoWon's thorough explanation are:

  • An XBee 3 isn't a requirement. An older Series 2 XBee device can be used. I am using three XBee S2 modules (model XB240Z7WIT-004) and they work wonderfully with all my Xiaomi and other Zigbee devices. My particular model of XBee isn't programmable, but that doesn't matter because they can still be flashed with firmware that allows the module to act as a Zigbee repeater (router) and also can be used to map your Zigbee mesh network using Digi's International's free XCTU software. For an explanation of how to decipher model numbers for older XBee modules, see my previous post here.

  • Using and XBee just requires a) An XBee module, b) an XBee USB host "Explorer"/Development board (which supplies power and a USB-to-serial connection for the XBEE without any soldering), c) an always on USB power supply, and d) the above mentioned XCTU software for initial firmware flashing / setup and also mesh network mapping. Because the XBee + USB host boards don't come with any case, some people have made a DIY case, and that's about the only DIY aspect of them. Seriously, they are not difficult to get set up and working, plus there's the advantage of being able to map your network to see which devices are connecting through a repeater along with signal strength.

  • The Securifi Peanut Plug does not work well as a repeater for Xiaomi devices, and I've even had troubles pairing my Sengled classic smart bulbs while my Peanut Plug is on. I don't recommend it if you're using Xiaomi devices / Sengled bulbs.

2 Likes

I'm worried more about longer power outages if I'm not around. But also, just out of principle, too. I've read ZWave is a bit more compatible since it's one company, but that has its own issues, too, lol.

And thanks for all the info; I will have to explore some more if I want to continue this route or just go with different sensors.

That's a pretty big debate. There are z-wave devices that pair easily and stay connected, and there are some that don't. I personally don't find one protocol favorable over the other. I'm not talking about a separate security debate. Simply in terms of usability and overall reliability.

Do you have step by step of how you connected the XBee3 to habitat and set it up as a repeater/router?

I use the xbee3 # XB3-24Z8ST and # 888-XB3-24Z8PT
I bought direct from Digikey (which I would recommend) or mouser
https://www.digi.com/howtobuy/buy-online?country=AU&pn=XB3-24Z8ST

A USB xbee adapter is also required to program the xbee device and power it.

here are my settings write these to the Xbee and pair it to the hub.
settings

If you have more than one Xbee device you will want to also change the name of the device in the settings.

I used a Waveshare USB adapter but I had some driver issues I did get it to work though.
I had better luck with a Grove USB board I bought from Digikey
Digi-Key Part Number 602-1979-ND

once it is programmed and paired as a device in Hubitat it will just work as a router you do not have to change the DH in Hubitat.

more info can be found at SmartThings

You only need it connected to your computer usb if you are using it to scan your zigbee network with the Xctu program.
It will still work as a router while scanning.
or (after programming and pairing) you can just plug it into a usb power supply (battery or wall) remotely but it will only be a router then.

1 Like

Ok I applied the settings but how do you get it to pair, i also have the grove board

That was 3 weeks ago I believe I just put Hubitat in pairing mode and applied power to the Xbee3 or you could try the reset button on the xbee
Sorry not at home now to try it again.
It may even be your zigbee cahnnel. What channel are you on?

channel 26 ya i tried reset.

I never had good luck with channel 26
I went through every channel one at a time to find the best channel for all my devices and ended up on channel 21.
to determine the best channel I went through each channel and attempted to pair with 2-3 different devices and if they didn't join with in the first 3 attempts I moved on to the next channel resetting the hub each time.After I had a short list of channels then I went through the short list again to determine which channel worked the best.
I also had my SmartThings hub off and had SmartThings support change their zigbee channel as it happened to be channel 21 as well.

Right now 26 has worked well for me, i've had all my devices motion sensors on it without issue, but I have some that drop off due to range issues, hence why i'm trying to get the X
XBee setup

you can just save a backup of Hubitat and then change channels and give it a try on 21 then you will know if it doesn't work just write the saved file back.
jv is still set to 0 correct?

I always found this page to be helpful, especially when messing with xbees:

http://cms.digi.com/resources/documentation/digidocs/90001537/references/r_channels_zigbee.htm

1 Like

FYI, the selected channel is stored on the Zigbee radio, not the database, so restoring from a backup will not change the Zigbee channel back to what it was when the backup was taken.

yes but is the device routing (Device Network Id) stored on the radio or the hub? If the other devices try to re-pair. I assumed the hub but I could be wrong I never looked at it that close.

Awesome this helped i have a non-pro XBee3 and SC was set to 7FFF so it wasn't scanning channel 26, changed it to FFFF and it paired... well its initializing taking long tho...

Ok it's stuck initializing any idea?

I have had other devices do that and they still showed up as already paired in the device list as a "device"
but it does not look promising using channel 26 in chuck.schwer link
you can look through the manual

or change channels

Ya i was hoping to not have to change channels as that means rejoining all my xiaomi sensors but I guess its the best thing to do right now.

you could try changing your SC to 8000 (channel 26 only)

I set all the settings back to default and only changed
ZS = 2
EE = 1
NI = Device 1
AP = 1

And it paired and passed initialization. I originally copied all your settings and it wouldn't initialize.

I changed the SP = AF0 and SN = 130 after it was Paired