Xiaomi & Aqara Devices - Pairing & Keeping them connected

This has already been done, which is how the sensitivity level setting method was discovered. But a sniffer might help to see if certain messages coming from or going to the sensor are being ignored or not passed on.

1 Like

If you guys are willing to out an extra effort I also will try to help were possible... But I'm no coder.

Just got a couple in the mail today, so hope to be helpful soon.

I feel bad now. :frowning:

I ported over the ST code for the vibration sensor to HE.

At first I set it up on my washing machine/dryer to try do laundry notifications. But like you said, because we can't adjust the sensitivity they were pretty useless.

I then moved them to my garage doors. I use them as tilt sensors. They are working great but I had to adjust the margin of error (e=20) as it seemed it wasn't sometimes reporting closed. I think when the door closed it doesn't close exactly the same and adjusting that allowed it to properly report open/closed. Otherwise I got unknown. They have been working great on my garage doors though.

Don't, moving forward always has ups and downs. If we all work together we can make it work as intended. Certain of it :wink:

This is one of the most complex sensors ever released by them. It can do so many stuff and possibilities are endless. We just need to make it work :wink:

I'm going to continue the Vibration Sensor beta driver-specific discussion back over at the Xiaomi / Aqara device drivers thread, with this post.

1 Like

So based on recommendations form @SmartHomePrimer I picked up 4 of those ikea outlets to test as repeaters. I also have the sylvania outlets that I have been using.

I removed the sylvania outlets and added the ikea outlets.

These are the real deal. Instantly my xiaomi devices started showing up and jumping over to these routers. I used my xbee to verify this. There were a few that took their sweet time but almost a day later and they are all back online and routing without any intervention.

Previously, whenever I did the mesh scan with the sylvania plugs it would take a long time before anything being routed through them would show up. With the ikea plugs they show up pretty much instantly.

I do recommend them and for the price you can't really beat them.

Few things to note. They don't have a physical switch on them (zigbee control only), they don't report power and they also are just a bit bigger than the outlet. So you can't plug two of them into the same outlet but they don't totally block the top outlet either.

2 Likes

Thanks for confirming Gavin. Yeah, things are unbelievably solid with these. I don't even have the XBee running. Honestly one XBee probably would have served my small house, but these don't raise and WAF flags.

I pull the XBee out every so often to see how things are doing, but it's just another tool. Everything is working so well. Now if I could just get my additional Xiaomi devices I ordered. Everything is so backed up with Canada Post now!

WHAT. Did you have to re-pair the devices? I have never seen a Xiaomi device voluntarily jump to another router without me trying to make it (e.g., keeping it nearby, unplugging bad ones elsewhere, staying far from the hub, etc.). You might also be the first person to confirm that it they do this.

But it's good to hear people are having luck with the Ikea Trådfri outlets! While they're a bit bulky, they are cheap (even the outlet plus Ikea's small-parcel shipping in the US is less than most other ZigBee outlets and I think any Z-Wave outlet I've seen), and it and can actually serve a function (smart outlet). With an XBee (a fantastic device that can route a lot of devices, and even the PCB ones seem to have an attractive signal), you really only get routing and mapping unless anyone has figured out a way to extend them with sensors or whatnot usuable on Hubitat (probably possible), and you have to hide them somewhere you hope people won't notice. :slight_smile:

Are these ugly? yeah the ST are really pretty lol

I've never had to repair my devices once I got the network stable. I only have 5 sengled bulbs (that don't route), 4 Ikea outlets (was Sylvania), 1 xbee and 50+ Xiaomi devices. I've seen them move from one router to another in their own even when I had the Sylvania outlets plugged in. I could unplug one and the devices would adjust. Sometimes they take a bit of time though but they always did in their own.

My most troublesome device was on my garage side door. I moved a router closer to it and it hasn't dropped since.

This setup has been solid through the summer up to now. Just need to stock up on batteries now for when they decide to all die at the same time.

Most of my Xiaomi are running now for over 14 months😂.... No battery swaps yet. Well I move the battery of a button to an humidity sensor yesterday's.

1 Like

Another update.

The Xiaomi devices check in every hour. If you look on the devices page you should see them all have last activity at max around an hour ago.

With my previous setups, these checkin messages sometimes got dropped. So sometimes the hub wouldn't' receive a message for up to 3 hours but the devices were still working just fine.

I noticed with the Ikea routers these messages don't get dropped and my devices are checking in pretty much every hour. Sometimes at 50 minutes, sometimes at 70 minutes but very reliable.

I have a script that runs that notifies me if they don't check in within that time and I haven't gotten any notifications since switching over to the Ikea outlets.

They are the real deal. :slight_smile:

3 Likes

I wonder if this has something to do with the zigbee radio.
@bobbyD just something to consider during troubleshooting of my case.

This is very specific to the Xiaomi devices. They are a different breed of zigbee and very finicky to get working properly. They are a community supported device just because we like to suffer, I don't think HE support should have to feel our pain with these as well.

My other zigbee devices (really only the bulbs I have in the basement) have never given me issues. But I also think they follow the zigbee protocol much better.

1 Like

There has been several issues reported with zigbee, some users don't even have Xiaomi devices. Another Example my radio just showed unitialized. What I hinted to Bobby was to consider if there was too much traffic heading to the radio and the radio could not handle it. Not asking him to investigate Xiaomi in specific. I never had any issues with my Xiaomi devices (Same devices on same exact location) in ST for over 18 months.

I dont know if HE should suffer or not with Xiaomi devices, proper support of such devices would expand greatly their user base. But... that's their choice and is not upon us to tell them what to do or what to support.

It's not even entirely up to them. They made changes to their original ZigBee software stack due to community feedback that, as they thought, might help Xiaomi devices stay connected. Beyond that, there's little within their control. Xiaomi devices use a proprietary/custom ZigBee profile, though it happens to be close enough to HA 1.2 that HA 1.2 controllers like Hubitat are usually able to pair to and communicate with them. What messages they send has basically been reverse-engineered by dedicated community driver writers (mostly just one lately) since Xiaomi only officially supports these devices on their hub/gateway.

The best Hubitat could really do is include the drivers natively, but I think that would be a bad idea since people might imply that as official support, whereas the devices are problematic if you don't have the right kind of ZigBee routers (Hubitat can't change those devices' behaviors--I'd say that's the biggest remaining problem now, and it's entirely out of their control). Adding a custom driver isn't that hard, and it's probably a good way to keep people who aren't good at reading directions away from trying them and causing more headaches for themselves. :slight_smile:

Also, I have seen another person or two say they've had better luck on ST with Xiaomi even though "everything is the same." It is, of course, not, since the hub (and its radio) are different. The ZigBee radio on the Hubitat stick is likely (guessing based on community experience) not quite as powerful as the one built-in to ST, or at the very least it's almost certainly oriented differently. I actually have had better luck on Hubitat since now I know what repeaters work well--my guess is many people could pair them directly to the hub before and never had to worry about this but now do since the end devices might find one of those routers instead.

2 Likes

This is my whole point,
If the radio is weaker let's assume it's limitations and either suggest a more powerful radio for people to buy as an addon or suggest in the documentation that repeaters are required as the radio signal is weak. However this is only speculation on our end until HE identifies the radio limitations and let us know.
What I believe HE is doing is trying to maximize the radio as much they can. However there is a point where they can't do much more as the HW/build has it's limitations.

14 months!? OK, you really need a battery tester. No wonder you're getting weird drops after 20 seconds. I'm fairly certain you're running into issues due to low battery. The readings from the driver may not be accurate. You need to test them or simply replace.

Here's the type I use. It's not as accurate as a ZTS, but it's good enough for regular lithium cells and affordable.

Thats an erroneous assumption on your end.
Why are you doing assumptions without knowing for example the battery reads?

In fact these sensors use a 3V CR2450 battery, I did a test (you can see that I also swap batteries between 2 devices) the readings on the Aqara Sensor (brand new) was 3.02 and the reading on the original motion sensor was 2.64v so both still had plenty juice level.

So let's not assume things. We can ask people to test the battery levels for example but let's not say that is for certain this or that without that data to corroborate. I have used a multimeter.

But thanks for those links it might came in end as they seem easier to use than a multimeter.

Besides a bad battery on one or two devices would not make them ALL disconnect like it was the case on the second time that devices dropped out.