SmartThings Community

Xiaomi devices all offline

Hi, I’m on holiday and noticed all of my Xiaomi devices went offline at the same time, that’s two door sensors one temp sensor and one motion sensor. I have reset the hub remotely but baffled as to why this is? Any clues appreciated and anything I can do as I’m away for another week. Thanks

Which app are you using… Classic or STSC? If using the STSC app, try installing the Classic app and logging in as New to SmartThings and see if your devices show as offline there.

1 Like

Hi thanks for the reply
No Classic app, never installed the new one…

Only other thing that comes to mind - click on the refresh button on each device.

Well I added insecure rejoin in the app and restarted the hub again. Went to bed and they were all back? I have no removed the insecure rejoin back to its default. I’ve no idea if this fixed it or there was something else going on. Thanks for your replies BTW

My insecure rejoin is enabled. I can’t recall if or when I enabled it. All my zigbee devices are Aqara/Xiaomi.

Enabling insecure rejoin is highly recommended when using Xiaomi / Aqara devices.

Hopefully turning it on has resolved things and they won’t go offline again!

If they do, then I would look at what mains-powered ZigBee devices you’re also using, because most mains-powered ZigBee devices (except some smart bulbs like Sengled) act as ZigBee repeaters, performing a similar function to WiFi extenders, and the vast majority of ZigBee repeaters are not compatible with Xiaomi/Aqara devices.

1 Like

Thanks Keith. Yes good idea. I’ll get a couple of the ikea plugs just to extend the range.

1 Like

Just other thing that rings a bell - click on the invigorate catch on every gadget.

This has happened to me recently as well. All devices working perfectly then all Xiaomi devices go offline all at the same time, they come back online after a day or two but my house is all automated so very frustrating? Funnily enough this only started to happen after i turned ON insecure rejoin? Any thoughts as i don’t really want to go back to Xiaomi hub but leaving me with little choice…

There should be a long post about issue with Xiaomi Zigbee devices maintaining connectivity due to associating itself to a Zigbee router that is not compatible with it.

A Zigbee Router is a Zigbee device that typically ac or dc powered. In its firmware, it has routing function that can help passing data from one device to another.

One thing that make this case unique is that the information about insecure join allow in some case the Xiaomi to be back in. Most people have to manually re-pair the device typically. It may still be possible that you may have different issue because of this.

I think the best thing to do when you are using Xiaomi is to surround your home with Xiaomi compatible routers.

The next best thing in mixed of compatible and non compatible router home is to have Xiaomi associate to one of those which compatible router and maintain that connection.

I could not find a thread with a list of compatible Xiaomi router. @veeceeoh may have that list. I also make Zigbee module that happen to be a Xiaomi compatible Zigbee router.

1 Like

Around mid April some of my Aqara door sensors and motion sensors started becoming unavailable. I figured that for devices priced less than $8, one and a half years is what you get. Tried dropping and reconnecting, some of them stayed connected, others failed within an hour. It’s not random devices, but only certain ones that keep failing every time, even though the ones right next to it works. It is not a range issue in my case, I have a new door sensor sitting 6 inches from the hub that goes unavailable after an hour. My “Insecure rejoin” has been enabled for a while now.

Considering the fact that most people started having similar issue around the same time, this might not be Aqara related, but related to a Smartthings update.

My plan is to change all my Aqara motion sensors with Iris motion sensors, bought 16 of them right before Lowes stopped selling them, for less than $10 each. Now I need to figure what to replace my 40+ door sensors with, without breaking the bank.

In Zigbee there is a concept of parent-child relation. This is important when you deal with Sleepy end devices. Parent-child with sleepy device is unique that the parent may need to buffer packet send to the child. The reason is the child may sleep when a packet is sent to it. The child is ideally wake up the radio portion every x milliseconds (configurable) and poll its parent whether it has data for it. If it does, it will take it and may wake the rest of the system to act on the packet.

Doing the above, A zigbee end device can be built to run on battery (in theory) for years.

However, there is a draw back. The parent now will need resources to buffer those packet (in addition maintaining the above tables). The design of most Zigbee ecosystem is that you have the big MCU like Raspberry PI. Then, they have Zigbee implementation in what you can think as Zigbee co-processor. This zigbee co-processor has to maintain the buffer above. They typically implement a limit of x number of child (sleepy one). This Zigbee co-processor typically is comparable to small Arduino vs a Raspberry PI. In more generous design, someone could have split the stack between the main MCU and the co-processor. But, this is different story for different time.

Now, what is it got to do with your issue? One of your sleepy device connect to a compatible router (or hub). Yes, hub is compatible with Xiaomi (long story of its own). In Zigbee mesh, a hub is typically a coordinator of Zigbee mesh. In this scope, it is just another router. A next sleepy device (1 or 2 inch a part, distance does not matter) may have to connect to another router which is not compatible with Xiaomi because that compatible router/hub has already full of sleepy end device. This is why you may see one Xiaomi device can maintain connection and other cannot.

How a device connect to which router is quite random. You may have some control. For example, you can try to force a device to associate to compatible router by pairing it as close as possible to the router. However, if the router is full, it would not be able to pair to that router anyway.

As to solutions, I think the best way is to run home with Xiaomi compatible router only ideally. If you can’t, perhaps you can try to make your Zigbee more dense with Xiaomi compatible router. You will play statistic game here. If you have more compatible router, you have better chance of your Xiaomi devices to connect to the right one.

You can also change your sensors. If you are early and have not invest a lot, this make sense. However, if you already have existing sensors, typically, there are more sleepy end devices compared to routers in a home. Replacing Zigbee Routers to compatible one or Adding more compatible router, in this case, can be more economical solution than replacing the end devices.

I hope it help.

Thanks for explaining in such details.

I realized I have over 40 ZigBee devices. I do have a Tradfri plug upstairs, the few door sensors I have on the second floor must be connecting to it. I guess it’s time to buy a second one and plug it somewhere downstairs. Does Aqara sensors play well with Securifi Peanut plugs ?

Better long term solution is probably adding a few ZigBee switches. All my switches has been Z-wave till now.

Unfortunately, they do not. I tried using a Peanut Plug and saw that messages from the Aqara / Xiaomi devices connected through it were being dropped. So, the Peanut Plug is not a reliable repeater for Aqara / Xiaomi devices.

In addition to my SmartThings v2 hub, I also use a Hubitat Elevation hub, which is similar in many significant ways. In my opening post of a thread dedicated to Aqara / Xiaomi pairing and connectivity issues, I maintain a list of “compatible” and “incompatible” ZigBee repeaters, in addition to other troubleshooting information:

Personally, to maintain “strong” ZigBee mesh networks that include over 35 Aqara / Xiaomi devices, I have had good luck using a number of XBee devices and a IKEA Tradfri outlet as repeaters.

Thanks, will check the thread. Can you point me to the XBee device you use ?

I picked up three XBee Series 2 modules (part # XB24-Z7WIT-004, with attached wire antenna) on eBay for about $15 each.

To provide power (and optionally a data connection) to XBee modules, a host board commonly known as an XBee Explorer Board is required. I separately bought XBee Explorer Boards with USB Mini adapters on eBay for around $9 each.

Here’s what the XBee and Explorer Board look like:

37%20AM

The XBee needs to be configured to join your hub’s ZigBee network and to allow Aqara / Xiaomi devices to remain connected to it. This is accomplished by flashing it with specific firmware and changing certain settings, all done through the Digi International’s free XCTU software.

In addition to using the XCTU software to set up the XBee module for use with your hub’s network, it also provides a very useful feature: ZigBee mesh network mapping, which shows you exactly which end devices are connected directly to your hub and which ones are connecting via a repeater. Here’s a screenshot of an example map:

There a A LOT of XBee ZigBee modules which can be used with a SmartThings setup, and a lot of potential settings to change, so I recommend looking at these SmartThings / Hubitat Community threads for more information and details:

If you decide to go with an older Series 2 module, I have posted a breakdown of the meaning of the model code designations, so it’s clear what you’re looking at buying:

Once the XBee is properly configured and confirmed to be connecting to a hub’s network, it can be unplugged from the computer and then powered by a USB power supply wherever it’s needed in the home. They are quite small and can be hidden behind furniture, or stuck into a homemade case / box. I have one XBee plugged into a powered USB hub so that I can then plug my laptop into the hub to access the XBee for network mapping when desired.

Note that after the XBee modules are plugged in, nearby Aqara / Xiaomi devices should be re-paired to make sure they connect through the most suitable repeater, as sometimes they are “stubborn” in automatically changing their direct connection to the hub.

1 Like

@rumrunner424 Just a quick note, most Zigbee Routers are DC or Main powered. If your home will be a mixed Compatible and Non-compatible routers, you may want to consider a back up power. In the case of power outage, Zigbee end device will look for a new parent. In this type of home, it can by mistake connect to a non compatible router.

Again, this is rare event. However, if you have plenty of xiaomi devices, this can cause some inconvenience.

This is why I make my own Zigbee module that work as repeater and build in battery power.

Thank you so much for guidance. This post made getting XBee up and running a breeze.
Now I have a lot better understanding of my network.

Thanks
Dave

1 Like

Thanks for your ZigBee module, it is working great. I can see devices connecting to it. Absolutely helps keeping my Xiaomi modules connected.

Thanks,
Dave

1 Like