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

And they work brilliantly. :grinning:

1 Like

Hi Bogdan,

I just thought it would be more convenient to have a screen. Didn't really consider the battery depletion rate. I've Grafana set up so the screen is not a necessity. Thanks, I'll check the "WSDCGQ11LM" out :slight_smile:

Any idea when the code for this will be available? It's one of the most affordable smart window treatments in the global market. I plan to have them all around my house. Hubitat driver would be a godsend...

Hi @veeceeoh
I have just had an Aqara motion sensor 'drop off' after only being re-paired earlier today.
It was not reporting motion or checking in.
When I wandered past the sensor the blue LED flashed quickly 3 times. The hub did report that it received a message from the device as it threw an error.
I'm just wondering if this is useful information as to what could be happening and whether it can be resolved.
The driver is : -

  • Xiaomi Aqara Motion Sensor - model RTCGQ11LM
  • Device Driver for Hubitat Elevation hub
  • Version 0.7.2

The error is this.
image
Thanks.

Vibration sensor - Cannot find “activityLevel” > or < on aqara sensor - driver limitation?

I need to automatically roll my blinds in when it gets to windy. The acceleration and movement is to sensitive so I need to get the blinds to roll back when the activity level goes above 120. However, I cannot find the > or < in the custom attribute (see picture).

Any advice on how to find this setting?

It looks like the activityLevel attribute is declared in the code as a string rather than a numeric type, so arithmetic operators are not available. That being said, from what I can see in the code, the sensor does indeed report numeric types for this (and the driver even converts them to an Integer when parsing). Until the actual maintainer of the driver has a chance to look at this, my suggestion in the meantime would be to edit the line in the driver that looks like this (on line 43 in the current version but may vary on others):

attribute "activityLevel", "String"

to look like this:

attribute "activityLevel", "Number"

This is assuming there isn't some other reason this is declared as a string. I don't have one of these devices and can't test for sure, but it looks like the assumption elsewhere is that this will always be an integer value from the device.

I don't know nearly as much about these as Keith does, but since you haven't received a reply yet, here's my take on this:

  • I think I've seen that error a time or two, especially if I just paired the device. Xiaomi device drivers parse the data received back manually instead of relying on built-in Hubitat methods due to the fact that they will occasionally send data that the Hubitat methods can't handle. Without debug logging enabled and the corresponding output (probably right before this, but again, debug logging needs to be on) from what it was trying to parse, I don't think it would be possible to say what this might have been, but the device was likely sending something that never came up in regular use and so wasn't being handled right. It could have also been sending garbage data for some reason (dying battery?).
  • The "falling off" is likely to be a different issue. A driver can't cause a device to fall off, though if it's not parsing the data correctly, an event may not get generated. If you haven't seen this thread (mostly just the first post), it's pretty much required reading for using these outside Xiaomi's own system, e.g., on Hubitat: Xiaomi & Aqara Devices - Pairing & Keeping them connected
  • I'm not sure what three flashes of the LED means, but my guess is either that the device can't find the parent or hub (only suggesting that because it's consistent with what you noticed) or maybe low battery. If you haven't checked the voltage (I'd do it manually instead of trusting the driver) or just replacing it to see if it helps, that would be worth doing and then re-pairing. But again, a re-pair won't help if it's not either consistently within range of the hub (probably risky) or routing through "compatible" repeaters (and having any that aren't is also risky) per the thread above.

The battery is a brand new panasonic.
TBH I'm not that fussed as I have all my Xiaomi/Aqara devices connected to my hub using Mi-Connector.
I just left this one to see how it was performing.
I kept moving it around my house to see how it behaves but it just keeps dropping off the zigbee network.
As I have 2 hubs I have now re-enabled the zigbee radio on the 2nd hub and paired it to it. It has been rock solid on the 2nd hub in the same physical position that it keeps failing on hub 1.
Hub 1 is using zigbee ch 20 and hub 2 is using ch 22. My router is using fixed ch 1.
Ironically hub 1 has 3 devices that repeat (2 x Salus outlets and 1 x Aone dimmer) and hub 2 has none. Could it be the repeaters causing the issues? I'm not convinced as my zigbee network was rock solid until about 3 months ago and then started playing silly beggars hence my move to using Mi-Connector.
I only posted the info in case anything could be gleaned from the error code.

Thanks for the comprehensive response though. :+1:

Had just a few Xiaomi motion sensor devices drop off at the outer limits of my house (monitored using Device Watchdog, an excellent app). Decided to get 2 IKEA Tradfri zigbee repeaters. Very nice little devices and a reasonable price too. Hooked them up and noticed several Xiaomi motion devices then disconnected from HE (not just those nearby, interestingly). Just left everything alone for almost 24 hrs expecting all devices to find their new route. Didn't happen. So I've just reconnected them with a short press to their reset buttons while in discovery mode. They all reconnected nicely. Now to see if they stay connected better than before!

1 Like

Changet the string to number and now it works fantastic!!!! :slight_smile:

THANKS!

1 Like

A version with MQTT publishing built in

Useful if you are using MQTT and Node-red in conjunction with HE

https://github.com/nickatredbox/Hubitat/blob/master/Xiaomi%20Temperature%20Humidity%20Sensor%20-%20With%20MQTT%20publishig.groovy

@veeceeoh any plans on adding support for Hubitat Package Manager?

2 Likes

Sadly not. In fact worse.
What a strange world.

@veeceeoh in case you want to add the two types of Aqara curtains to your list I have now released a feature complete driver:

Just a question here if I may...

"Once you put in monitoring" - is this an XBee thing or can the Xiaomi devices be configured to check-in periodically? I have a few Xiaomi devices that have been dropping off lately, even the 'last activity', on the device page, does not always seem to be reported correctly, but the device still works ok.

Thanks

Hi, If this is not the correct place to ask this question please let me know.

I have setup a Aqara Vibration Sensor (DJT11LM) in my test environment and had a lot of success pairing and setup. I can see the sensor changing state from inactive to active and I believe I have set the "Closed Position" to Active and the "Open Position" to inactive. The issue I am having is that the contact state moves to Closed when the Active state is achieved but never returns to Open when the Inactive state is achieved. I want to use it as a vibration sensor on a clothes dryer to control a fan in the laundry room. Is this a limitation of the device or the driver. I am using the latest BETA release.

Hi,
Have this device, (Honeywell zigbee Fire Alarm Detector.)
Start zigbee pairing in hub,

Pressing on the button in the front (The one with the red led)
And it is just changing the sound volume
Pressing 3 times, 4 times, long press, ...
Nothing happened. it is not discovering.
Have I done something wrong?
Thanks

@veeceeoh hasn't been on this forum since the end of February.

@WetCoaster What is referred to here is one of the ways you can monitor devices using either an App or RM.

@craig.allen.20 I might have time to look at that driver in a week or two, but as it is I don't think there is anyone on this forum who can answer you without checking the code. Patience :wink:

@9999341 I have one of those device but haven't even begun to look at it. I'll try to pair it soon and see what is up. One thing I can say is that these devices can be VERY sensitive to how good the mesh is. Especially during pairing. Try pairing it in close vicinity to the hub, if that resolves the issue it is a mesh problem. Ask about that in one of the proper threads :slight_smile: You can @ mention me there and we can take it from there.

1 Like

Hi
I should be receiving these 3 items tomorrow as I wanted to check if they would be "reliable" and stay connected to the HE. What I wanted to find out was what drivers I should be using for these

Mi Wireless Switch :YTC4040GL
Mi Window and Door Sensor: YTC4039GL
Mi Motion Sensor :YTC4041GL

Thank you

These model numbers don't make sense, must be a sales model number used by someone, I think after checking the model numbers on the actual devices you will see which drivers will fit. YTC4040GL is most likely WXKGL01LM for example. The contact sensor is probably MCCGQ01LM and the motion sensor RTCGQ01LM.

2 Likes

Hi markus

Okay thanks, I should have them tomorrow and I will have a look for the model numbers.