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

That's what the zigbee.readAttribute is supposed to help with!

I'm just confused about the catchall response being different lengths every other time, alternating between ending in 01 01 or 04 01 00 after the 115F manufacturer code.

I suspect the second to last value tells us the current sensitivity level, but need more evidence...

We're talking about Aqara devices... and their manufacturer-specific attributes. All we can do is guessing...

But both the hub and the app had several updates since then, so maybe tomorrow I'll rejoin the sensor to the Aqara hub, and sniff the communication again...

1 Like

With the xiaomi button and aqara one, do they only have the ability for a single button press, no a double press or hold ?

Anyone getting errors with the xiaomi devices in the logs. I'm getting them for temperature and contact sensors.

I was getting optimistic reading "official", lol. My contact sensors have been alright so far, but I'm always uneasy with the unofficial-ness. And my tradfi has been flaking out on me. Here's to hoping they actually come out soon and are still reasonably priced... I need a few more motion sensors, lol.

Xiaomi "original" Button

model WXKG01LM

9ae0d6b75d903bceaddc258e2a0a7d7ea946ca8f

Functionality Chart

Action Hub Event Notes
Single press button 1 pushed
Hold button 1 held Event comes after button is released ~
Double-click button 2 pushed
Triple-click button 3 pushed
Quadruple-click button 4 pushed
Shizzle-click button 5 pushed 5 or more multi-click
~ Note: The default minimum time required to hold the button for the held event is 1 second, and this can be changed in the preference section of the device's details page in the Hubitat Web UI

Aqara Button

models WXKG11LM (original / new revisions) and WXKG12LM

e433080a803c42e7a7ffffc93af7be279787a551

Functionality Comparison Chart

Action|...11LM (orig)|...11LM (new)|...12LM
---|---|---|---|---
Single press | button 1 pushed | button 1 pushed| button 1 pushed
Hold | | button 1 held | button 1 held
Double-click | button 2 pushed | button 1 doubleTapped| button 1 doubleTapped
Triple-click | button 3 pushed | |
Quadruple-click | button 4 pushed | |
Shake | | | button 2 pushed
Release |button 0 pushed | button 1 released | button 1 released
Notes on hold & release for Aqara Buttons:

  • Model WXKG11LM (original revision):
    The driver includes an automatically delayed button 0 pushed event that by default occurs 2 seconds after a single press. The length of the delay can be changed in the preference section of the device's details page in the Hubitat Web UI.

  • Models WXKG11LM (new revision) / WXKG12LM:
    These two models send a "held" message when the button has been held for 400 milliseconds. This timing is hardware-based and cannot be changed, but the button can be held as long as liked. With both models a "released" message is only sent when the button is actually released.

1 Like

I may be able to help, but I really need to know what errors you're seeing.

Could you please post the log message text or a screenshot of the errors with some of the other messages both preceding and following them? Having debug log message output enabled would be best, thanks.



The Tradfri Outlet or bulbs? What kind of issues?

I have come to dislike very much the tradfri plugs. The bulbs are okay(a19 white). Signal is poor on all tradfri devices including the new USB repeater. I'm taking my plugs back to ikea, they have a 1 year return policy. Everytime my tradfri plugs flake out I lose my hampton bay fan controller and some xiaomi devices. I now have 5 xbees to support my Xiaomi devices

sorry if this was listed and I didnt do enough research.
Apologies - I did buy the Aqara now I know you support it.

Hi Guys,

How come there is no driver for Xiaomi Smart Plug?
This one is both a Switch for plug on/off and a temperature sensor in 1 Zigbee device.
This is Zigbee and quite stable on Smartthings. Below is DH.

Cheers
G

Just note that the temp on the outlet is wildly inaccurate due to the heat produced from the outlet itself when in use. May be useful for something, but not actual temperature measurements.

There is no Hubitat driver for the Xiaomi Smart Plug because I don't own one and so I have no way to test the driver. There are enough differences between the way the code of SmartThings and Hubitat device handlers / drivers needs to be written that it's not guaranteed that a SmartThings device handler can be used on Hubitat without any modifications.

Also, there hasn't been any demand for a Xiaomi Smart Plug driver for Hubitat.

Would you be willing to test a Hubitat driver?

Hi guys
I managed to pair ZNCZ02LM with the Generic-Zigbee-Outlet driver
The socket reports status when turned on or off with hubitat, reports the status after manual switching.
procedure of adding:
turn on the power, hold the button until the diode flashes red and then blue - then it will release.

Hi Mate,
Definitely happy to test it.
Just don't have the skill to transfer DH to Driver. :frowning:
Thanks
G

Can someone tell me what governs the polling time for the Temperature/Humidity sensors? 2 days ago I started using one to run a dehumidifier and most of the time it seems that it won't transmit until there's a large difference from the previous value. Sometimes HE won't hear from it for hours even though the humidity has gone up over 5% (if I moisten my hand and cover it, it immediately sends a signal, so it hasn't dropped off.). Then today it wont shut up and transmits for every .3% change, every few mins or so. I have 2 others in different parts of the house and it seems they talk every 5-10 minutes as well, but sometimes hours would go by without a peep.

@BakaMonogatari,

It is not really polling if I am not mistaken.

In Zigbee, there is a command called "configure reporting". This command should control when (or how much of a change) a device should report its attribute. A Zigbee device should proactively send the attribute (temp or humidity) based on the configuration parameter.

@veeceeoh or other member here may be able to tell you in more detail whether an Aqara Temperature sensor will comply with this command.

Can confirm it paired with generic ZigBee outlet also. No temp sensor obviously.
Will check in in next 24 hours to confirm if they stay online.
Again happy to test a dedicated driver. Tnx G

I have one of the temp/humidity sensors, and mine has very intermittent reporting also. I tried to use it for a bath fan sensor, and it was too slow to be of use. Sometimes it will go days without reporting even though I know the bathroom humidity has risen and fallen significantly.

I have plenty of Zigbee repeaters nearby, so I don't think that is the issue. I don't think this is a driver or Hubitat issue, I think the devices are just not all that well built or at least not consistently built.

Great! I'm hammering out a new beta of the Gas Detector driver, and then I can put together a Smart Plug driver for you to try. It will take some days, as I'm pretty busy, it being summer and all here north... :wink:



The official word from Lumi on the reporting of the Aqara Temperature / Humidity sensor at least is:

When the temperature and humidity sensor detects temperature changes over 0.5 degrees or more than 6% humidity change, a report will be sent. The atmospheric pressure value will be sent along with the temperature or humidity report. The Temperature and humidity sensor also reports the current temperature, humidity, and atmospheric pressure values during each heartbeat.

The only thing I could improve in my drivers is to parse those temperature, humidity, and atmospheric pressure values sent "during each heartbeat", which is what I call the "check-in", that occurs every 50-60 minutes. Otherwise I have zero control over controlling how often both the Xiaomi and Aqara sensor models report, because it's "locked" in their hardware, as it were.

Since these are "sleepy" ZigBee end devices, in my experience they also seem to employ some "tricks" to save on power usage, meaning they don't seem to report as often as would be implied by Lumi's statement above. For example, it appears they may skip reporting if the check-in time interval is coming soon, because that includes a full set of report values. Also, I have read that temperature reports may take priority as part of the power-saving scheme, such that sometimes a change in humidity isn't reported until there is at least a 0.5° C change in temperature. Only Lumi/Aqara's hardware engineers of the sensor would know...

Another very important point to remember is that the driver is set up not to generate events with redundant repeat values. So for example if the most recent temperature event was 25.4° C and a message is received from the sensor reporting 25.4° C again, no new event is generated because there has been no change in temperature since the last report. This is normal accepted behavior on the SmartThings platform device handlers, and Hubitat follows suit on that.

In addition to it being normal behavior on the platform, quite a few Hubitat users have a strong opinion on keeping the number of events devices produce at a minimum by not generating repeat value events (for things such as battery level, temperature, etc.), but if enough people are interested, I could see about adding a preference to toggle that behavior. However, I'm not sure that will help you with your particular use case / needs.

I really wish there was a PCB "hack" to get temperature / humidity reporting every X minutes like there is for the Aqara Motion Sensor.

1 Like

Hi. I'm using Aquara sensors for a month, and one of them to control bathroom fan. Reaction for fast increased humidity is about couple of second. This is very nice. But last updates doing something wrong with communication with them. After last update (2.1.3.125) all Aquara sensors stop reporting humidity (!), but temp and pressure ok. I try everything: removing, adding again, reseting and no result. Then I'm get back to 2.1.3.120 and everything working again. Strange.