[Deprecated] Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)

Was looking at the Alliexpress ad for those, and it says “for Xiaomi” instead of “from Xiaomi Ecosystem”. Wonder if this is a translation error. Maybe they meant that they are compatible with the Xiaomi hub? That would be fine with me. We will know in about a month when I receive mine.

From the reviews section on this Ali Express page:

Seems not to work with zigbee 3.0

it's NOT Zigbee Protocol! It doesn't work with a CC2531 stick which can pair EVERY Zigbee device! Seller doesn't help at all; just saying it works with the Konke Hub!

From a Deconz thread about trying to add support for the sensor, this post:

Yea, to be honest the sensor is quite bad. Slow reaction. And no “no motion” trigger.

Also a small fov. I hoped it would be like 160 degrees or so.

However the Ali Express seller does state this:

Support:tuya , Philip HUE ,CC2531 etc, all ZigBee 3.0 device & HUB。if cannot connect We will refund the money.

Honestly, it doesn't sound like the device is worth trying to make a Hubitat driver.

Nevertheless, @SmartHomePrimer, since you've decided to keep your order, I'd be curious to hear as to whether it works acceptably with your Aqara Gateway.

As best I can tell, the company is completely different: Hangzhou Konke Information Technology Co., Ltd. They are listed as an "Adopter Member" on the Zigbee Alliance site; however, they have no products listed as ZigBee Certified.

2 Likes

:joy: Totally want to cancel now, but I will proceed, otherwise we’ll never know. I could not find any posts about anyone trying them or actually using them with an Aqara or Mijia gateways.

@bertabcd1234, would you say the reaction time is slow? Because that I’m not interested in, even if they did work 100% with the Xiaomi gateway.

Having followed this thread for some time and reading people's comments I was just after some advice. So I want to get contact sensors that'll work with hubitat. I used the Xiaomi Aqara one which as mentioned previously, worked fine for a month and then stopped working. I haven't got any repeaters in use so it was connected directly to the hub and isn't too far from the hub.

Are there any alternatives? Though xiaomi devices are cheap, they're not always cheerful and without the ability of linking the Xiaomi gateway to hubitat (not an iOS user here) what alternatives are there that I could use?

I don't think I noticed slowness when I was trying to write a driver, but I'm using it outside now so can't speak to how it behaves in real life (that's where I don't care if slow things go, Monoprice sensor...).

I see the quote above says it should work with Hue. I never tried that, not that it would do me much good on Hubitat, but maybe someone could figure out how "inactive" works if it works properly there.

Nearly any Z-Wave or Zigbee contact sensor would work, but to be safe, stick to those from the supported devices page (or search the Community if you find one you like otherwise). You have a lot of options. If you want a lot and for not much money (maybe that's why you went with Xiaomi), one seller currently has a lot of 10 used Iris v2 sensors on eBay: https://www.ebay.com/itm/Lot-of-10-Iris-3320-L-Zigbee-Door-Window-Contact-Sensor/153441332525?hash=item23b9d0ed2d:g:~E0AAOSw9dBcp5g7#viTabs_0. However, they come without magnets (you could probably re-use the Xiaomi one if it lines up well enough and is strong enough--anyone tried?). This seller or others also has Iris v1 sensors, which do work with Hubitat now, but people seem to have mixed luck with those. But again, you have a lot of options--used or new.

1 Like

Visonic mct-340 are usually cheap new, or on eBay. And fully supported.

1 Like

Yep. Only $20 if you're in the US. Not too bad. Unfortunately, they're $60 if you're in Canada! :roll_eyes: The Samsung SmartThings and AduroSmart ERIA are also just $20 each.

1 Like

I sometimes get the following error on my aqara motion sensors:
image

That error is nothing to worry about, as it's caused by a message which serves no purpose, and the driver will simply continue working just fine with all the messages that are useful.

One of these days, when my life settles down a bit, I'll release an update to the driver that just ignores those occasional non-useful messages which cause the error.

2 Likes

The Konke motion sensor finally arrived yesterday. One of the longer wait times, but Banggood apparently didn't have them in stock for 15 days after my order, so actually not too bad.

The size is tiny. Not the nicest looking, but not bad. Same diameter as the Aqara and Mijia motion sensors, but half the height. Exact same battery as the Xiaomi.

Battery had a pull tab and measures 100% on my ZTS MBT-1, so didn't have the low battery issue @bertabcd1234 experienced.

This does not pair with my Aqara Hub. I tried the Mi Home App and the Aqara Home app set to mainland China which shows the maximum devices available to the hub. Will not pair. Maybe a Mijia Gateway would :man_shrugging: Also tried pairing to Wink Hub using Generic Zigbee. It pairs, but does nothing.

I have my main hub still at at 2.1.3.128 and it would not pair, but my Test Hub is on 2.1.5.117 and it pairs immediately. None of the repetitive pairing button press hoops you have to jump through with the Xiaomi sensors. I can also confirm that Generic Zigbee Motion Sensor only shows Active state, so maybe a driver that manually sets inactive after a timeout like you have done for the Aqara and Mijia sensors. I tried every Zigbee Motion and Multisensor driver in HE, along with the Xiaomi driver and only the Generic Zigbee Motion Sensor driver shows Active and battery status as Robert confirmed.

However, I do have this working. On a hunch, I tried "Samsung Zigbee Button" and that does work. You get a button 1 press, with motion. I can confirm that the timeout before active again is 20 seconds, but I will also confirm that indeed, there must not be motion for 20 seconds, otherwise the hardware does not re-arm, and you will never get another button 1 press if you have constant motion. For now, I simply wrote a rule that uses the button press as the trigger, then Activates a switch that turns itself off after 5 seconds. I noted that at one point during testing, it suddenly wouldn't give a button 1 press, but after I clicked refresh in the driver, it responded again. So I included a refresh of the sensor after 15 seconds in my rule. This seems to be working to keep it consistent.

This isn't a particularly sensitive device, but it does work as a ceiling mounted sensor. and that's where I have it now. It's actually pretty decent for my use. Small room and my ceilings are only 10 foot. A more sensitive motion sensor would be problematic every time we walked by the open door, so this works fairly well in this scenario, where you actually have to walk into the center of the room before it reacts.

A driver would be nice, especially if it's possible to gain control over the no-motion requirement before re-arming. For that reason, I wouldn't buy another one of these if there's no driver available. However, I'm still offering to help where I can if you want to take a crack at a driver for this one.

1 Like

It doesn't report inactivity? And it also doesn't periodically report if there is constant motion? Correct me if I'm wrong here but isn't inactivity like half of a motion sensor's job? This would never work in a high traffic area. You'd have lights turning off on people all over the place.

It's possible it just needs the right configuration sent to it to do that, but as both of us have discovered, no, it does not seem to. I have no idea what traffic it sends when used with the manufacturer's specified hub, so someone could probably figure out what's really happening if they did that. I'd hope it does, but who knows. I don't get any Zigbee message to parse in the driver when inactivity strikes, which I also discovered is around 20 seconds (but it needs inactivity before it will re-send activity).

I know it would make sense if it did do that (unlike most, the Xiaomi ones don't send inactivity but are predictably timed and re-send activity), but it doesn't. :slight_smile:

I can also test the Xiaomi smart outlet, I have two that were working with Shinjiang's drivers in ST, this is the DH: XiaomiSJ/devicetypes/shinjjang/xiaomi-plug-sj.src at master · shin4299/XiaomiSJ · GitHub

Anyone have any tips on getting Wireless Remote Switch two button to pair? I seem to always have to most problems with this one. Motion sensors and contact sensors no real problems but this one I spent almost hour now trying to pair it!

I assume there is no sign of the "-T" temperature/humidity sensors yet?

I looked around, but didn't find anywhere to order them, so I assume they haven't hit the retail channels yet (even the Chinese ones)?

They are still in beta testing. During which time, beta testers are supposed to use them with just the new Aqara M2 hub.

1 Like

Just a quick note of thanks for the Xiaomi motion sensor and button drivers. I purchased 4 of both of these based on the great experience I've had with the Xiaomi cube (which just stays connected all the time, no issues). I've found the exact same thing with these new devices. Completely reliable. I'm 'gob smacked' to be honest, given some of the stories from others. The job lot of Iris v2 motion sensors I bought off eBay have been a complete joke with over 50% of them getting stuck active on a regular basis or not triggering reliably. The Xiaomis' on the other hand are completely reliable in comparison so far (albeit ever so slightly slower to respond). The buttons are great with single press, double and long press all working fine and staying connected no problems. Now I'm finally managing to get motion based automation to work properly after weeks of frustration. I'm going to double down on the Xiaomi motion sensors I think, right around the house.

Thanks again for your hard work on these excellent drivers!

@veeceeoh
Hi Keith, I am using an Aqara Smart Curtain Motor - Zigbee Model: lumi.curtain in Hubitat with the SmarttThings driver from ShinJjang, and it works great. An error "java.lang.NullPointerException: Cannot invoke method endsWith() on null object" may appear on the logs, will try to update the device driver and debug this and I will post it in the forum.
.

In addition, it's worth noting that Xiaomi Aqara Smart Plug (lumi.plug) works well with Hubitat. I modified the bspranger's device driver from ST to avoid some errors that may appear in the logs, and my current version works fine without errors, but there is still a small glitch with the reported temperature (higher than it should be). Will post the modified device driver soon.