Xiaomi & Aqara Devices - Pairing & Keeping them connected

At least you know what you are getting into.

These devices are just a pain. The best results I have heard is pairing them with an xiaomi hub that can be connected to Hubitat. I don't know all of the details behind this in terms of what hub etc but that was the most reliable.

For direct integration with hubitat I recommend the following,

  • change your zigbee channel (I use 20)
  • inventory any devices that are zigbee repeaters and remove them if possible (not all work with xiaomi). If you can replace them with Ikea repeaters. They work the best.
  • be patient

I've been running them for a few years now and have scripts monitoring them all as they all report in every hour so I know as soon as they start acting up.

For the most part they are well, but every now and then (about twice a year now) they have a tantrum and a hub reboot and wait for them to connect fixes it.

I have slowly been replacing them though with zooz sensors. So much more reliable in my setup.

I've never had a problem with them since dumping smartthings

1 Like

FWIW I hsve dumped my IKEA repeaters as I was still getting devices drop off. I also hear they are quite a weak repeater RF wise.
I now have 3 Tuya 3.0 ZB in their place so we'll see what happens.
They got good praise here for being compatible and much stronger RF.

1 Like

Thanks, I've got an '11LM button, a '12LM button and an '07LM double wall button attached to Hubitat #3 using an IKEA E1746 - those four devices are the only things on the mesh and they're all working right now. I connected a "sanity check" '11LM button to my normal accessories mesh... it's already dropped and unresponsive. So at least I'm not going crazy.

The accessories mesh is already on channel 20 and the AlertMe kit is on channel 25, so my Aqara-specific one I've set to channel 23. Too much wifi noise down on the lower channels.

Got a link? What are these Tuya 3.0 ZBs of which you speak?

I have a drawer with spare E1746s because they're so cheap and convenient. Routing table is exactly this exciting right now:

Parent child parameters
EzspGetParentChildParametersResponse [childCount=1, parentEui64=0000000000000000, parentNodeId=65535]

Child Data
child:[12LM, 18FE, type:EMBER_SLEEPY_END_DEVICE]

Neighbor Table Entry
[Main Repeater, C608], LQI:255, age:3, inCost:1, outCost:1

Route Table Entry
status:Active, age:64, routeRecordState:0, concentratorType:None, [07LM, 8760] via [Main Repeater, C608]

Don't know where my '11LM is on there, but it's still connected and working. Going to add on the sanity check one now too, may as well get this party started.

They are also much quicker on Hubitat than on the native M2 hub. Not as fast as the AlertMe / Iris V1 or IKEA buttons, they take a fraction longer to wake and transmit, but still mighty swift. And I can live with that because I don't think I have ever changed a battery in one of these.

I've also connected them up with no special driver, just the system "Device" driver, because I was very curious as to whether they need special response codes to keep them happy and connected, or make them report in. It would appear that they do not. Fresh out of the box the '07LM reports in about every 50 minutes with what I'm guessing is battery data.

Naturally if this is the case I'll roll my own @birdslikewires drivers, because I'm like that. With so many driver alternates out there I just wanted to know if they do need special driver treatment, or if they just need a very particular mesh environment. Right now it's looking like the latter.

Here's the Ali Smart Zigbee Signal Amplifier Tuya Automation Modules Timer - AliExpress
Link in the forum Recommendations for sensors? - #79 by Krishna

1 Like

First driver supporting the WXKG11LM is up on GitHub now. It has received pretty much no testing; in fact, less than 60 seconds ago I saw it properly parse the FF01 attrId for the first time, which is the approximately-every-50-minute report the device sends in.

I'm starting out doing these differently to other folk; the code is heavily based on all my other button drivers and I'll tailor them specifically to each device (so there'll be another driver for the WXKG12LM). I might change my mind, but I like doing this because I end up with exactly what I want - such as a momentary press of the reset button actually registering as a fifth button press. :slight_smile:

I'll do a post and push to the package manager once I'm convinced it's working right, but this was a nice little jigsaw puzzle for this evening now I know I'm not just tail-chasing them falling off the mesh.

Turns out a quintuple-press of the button actually triggers the same behaviour as one short tap of the reset button, so I was uncharacteristically accurate on this occasion. :smiley:

There's only a few options that are worth pursuing. I've got plenty of rock solid performance behind that opinion.

The one I like the best personally is HA with a ConBee2. Everything pairs easily and stays. IKEA Trådfri outlets and repeaters work fine with it too. Home Assistant Device Bridge is simple to setup and very effective to bring the devices back into HE.

A variation on the above is to use the Mijia Multimode Gateway 3 with AlexxIT's integration. This gives you all the Mijia and Aqara devices, and you can also use BLE and Bluetooth Mesh devices if you want them.

You can also use Zigbee2MQTT with Node Red, but that's a steeper climb than the first two options, if your goal is to just connect Aqara and Mijia devices to Hubitat Elevation.

1 Like

Thanks, @SmartHomePrimer. My appetite for diving into HA is pretty low right now, but then I have been ill, so perhaps that's stunting my curiosity. I have one of those Mijia gateways somewhere and more Raspberry Pis than is healthy, so I guess it's just a matter of time.

In HE news, I'm happy to report that my simple mesh of 1x Hubitat Hub, 1x IKEA E1746 Repeater, 2x WXKG11LM buttons, 1x WXKG12LM button and 4x WXKG07LM wall switches is holding up very nicely indeed.

I've already replaced one wired switch entirely with a Samotech SM308 on my accessories mesh and a WXKG07LM screwed to the wall, looking indistinguishable from how it was before. I love Hub Mesh.

If you're in the market, watch out; Samotech do the SM308 (normal single channel switch module) but also the SM308-S (no-neutral single channel switch module) and they're sold in different categories of the website. I have need of some no-neutral control so will report on my findings somewhere; the SM308 is an excellent repeater and stunningly reliable, but I'm assuming the no-neutral version won't act as a router... but that is just an assumption, because the Aurora AOne dimmers are great repeaters and work without a neutral.

Anyway, back on topic, I've now managed to bash out drivers for those three Xiaomi devices. The WXKG07LM was surprisingly straightforward and the WXKG12LM was quite fun because of its silly accelerometer function. I also implemented level setting using timing of the hold-release messages, so the button can be used as a basic dimmer controller in combination with something like the Mirror app. :laughing:

1 Like

I have a few of the Samotech SM314 no-neutral dimmers. I bought one to try & liked them so much that I bought more. They work as repeaters and are also successfully repeating Aqara Opple 4 & 6 way buttons.

1 Like

I don't believe it, I genuinely have one sat right next to me and never realised it was a no-neutral model. I'd only ever wired it as a test using neutral on the common connector. :man_facepalming:

I love the the SM308 modules, I retrofitted one into the kitchen extractor because there's never a time we don't want those lights on when the room is occupied. They're now my yardstick of how well things are working because the PIR is an AlertMe model on Hub #1 while the SM308 is on Hub #2.

Well, a year later and I don't think they've ever failed to work.

I kept this post on topic by including the side of the WXKG12LM on the left of that picture. :wink:

1 Like

This new setup appears to be working very well. All of the Xiaomi battery devices are staying connected and working happily together, enough that I've removed them all from the M2 hub now and added them to Hubitat #3. The M2 only has the two remaining wired wall switches (because I haven't sourced a promising two-channel no-neutral module yet) which are being controlled from the buttons on Hubitat via Homebridge, plus one WSDCGQ11LM temperature and humidity sensor.

Speaking of which, I moved the other one of those WSDCGQ11LM devices onto Hubitat too, then rolled another driver for them. Took forever this afternoon for some reason, there was one stupid parsing problem that I just kept staring at! Anyway, looks decent now.

This one has the cute feature of "enabling" the reset button to be used as a standard pushable button (because you just never know, might be handy for someone) and inspired by @markus's driver it also reports absolute humidity, calculated from the reported relative humidity and the latest temperature reading.

Once I'm happy these readings are being processed correctly I may add them up to the package manager.


Feeling happier. Freezing my sensors so you don't have to. :wink:

The driver and the official app compare very well and within the design tolerance, so I think I have it right. The one on the official app went in a while afterwards, so it'll still be settling a tad.

I'll have a go, trying this out now

You probably already know, but if you're changing the driver from a different one, hit Configure once you've done it to set everything up correctly. Otherwise presence detection may be a bit wonky.

Yes all was done and is running fine :+1:


Just throwing another 2p into this pot. My new Xiaomi-only mesh, the backbone of which was simply...

...was working perfectly with all battery-powered Xiaomi devices I've written drivers for (ie. absolutely no mains-connected models). In a fit of enthusiasm, as they were largely controlling Samotech SM308 switch modules (which are in turn all routers) over hub mesh, I thought I would move an SM308 onto the Xiaomi mesh to see how things fared.

While not a disaster, I moved it back. Some devices dropped but re-established themselves, demonstrated by "lost presses" at first, then working perfectly again. Some devices required resetting and then they were fine too. Oddly, WXKG12LM buttons were the most upset and I found they would drop multiple times, but would re-establish a connection without resetting.

Instead I've simply added another Tradfri E1746 repeater to extend the range. Zero problems, zero drops.

1 Like

This is just another confirmation that Xiaomi/Aqara devices are finicky.

There was a time when Aqara devices were some of the most affordable devices on the market. However, with Tuya and eWeLink now developing devices that are fully Zigbee 3.0 compliant, and a variety of manufacturers introducing devices based on these platforms at pricing in the same range as Aqara, I now look for Tuya and eWeLink devices and only choose Aqara when they have a device that is not yet available on the other platforms.

I hope Xiaomi/Aqara starts introducing fully compliant devices. I did see an ad for an Aqara SmartHub E1 that claims to be Zigbee 3,0 compliant and used the Zigbee logo. Thus, perhaps my desire will come true.


They recently announced some new devices including a curtain controller (similar to switchbot) and motion detector that are all zigbee 3.0 compliant. No dates/prices announced though.

I know they also announced devices last year that are zigbee 3.0 compliant as well but I haven't seen them in the wild either.

1 Like

Hi guys, has anybody tried Blitzwolf sockets in combination with Aqara sensors as repeaters? Are they compatible? Or any other tip for 16A power meterting socket which would be for sure compatible as a router for Xiaomi sensors?

Download the Hubitat app