Xiaomi & Aqara Devices - Pairing & Keeping them connected

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.

image

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:

2 Likes

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.

4 Likes

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?

Hi - I was wondering if anyone has any recent experience with the Aqara natural gas sensor and hubitat. I just tried the Shelly version - it's a nice detector, but it requires mains /AC so you need to have an outlet in the appropriate location. I could probably add one but it's kind of annoying to have to do that for this purpose. I'd prefer a battery operated device that can be placed wherever is appropriate.

I know the Aqara devices have a lot of issues in terms of staying on the network. I also read that they were improving. Any experiences with these lately?

I didn't think any gas sensor could run on batteries. The Aqara one doesn't as far as I can tell.

Oh - I didn't know that - I didn't see anything in pics that made it obvious it plugs in.
I took a look - it's correct that the Aqara one uses power too, but it's via an AC adapter and a small power cord - ie you don't need to plug the sensor directly into an outlet. You'd still need to run a wire to it - but less conspicuous than a 120V cord.

I've just had to de-pair my Aqara vibration sensor. It was staying connected beautifully, but everything else that was hopping through the plug it was sharing was falling off the mesh, along with the plug repeater itself lol