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

Ah! Be sure to join the Australia/New Zealand group. That will give your favicon the little flag so people know where you're from and can make appropriate recommendations. :wink:

1 Like

Done, added you. Welcome to the OzHubbers ship you scrurvy scoundrel. :wink:

Feel free to join the conversations over here as well Australia - Hubitat

1 Like

Lol thanks. I thought I had joined already ARRRRRRRRR

Update: Silly me , the activity level attribute is available, just a simple matter of changing its type to number in the driver. Now waiting for another washing load to test it out!

Hi Guys.
I've just fitted a QBKG03LM: two buttons, no neutral required wall switch.
image
I've loaded guyeeba's driver, ("Aqara Wall Switch (QBKG03LM, QBKG04LM, no neutral)") paired the device and assigned this driver to it. Manually pushing the button turns the light on and off.
The problem I'm having is trying to write a rule around this switch.
Here are the preferences I've selected.

I do not see it as a switch in RM but I do see it as a button.
I have written a quick rule for motion to push button 1 but nothing is happening.
Can anyone out there who has one on these guide me on how you have written rules around these devices.
Thanks.

EDIT: Forget this. I forgot to load the Generic Child device code. Oops.

OK. I've created the child devices but nothing is happening. Using on/off in the child devices does nothing.
Any ideas folks.
tagging @guyeeba & @veeceeoh

I see this in the logs when I hit the Turn On Child button in the parent device.
image

EDIT: Deleted everything and started again. All working now. Phew!!

I had a little faff with this. Deleted the child’s, set the buttons to 2 and saved, then recreated the child’s. Hit configure after and then wait a little. Then all good :+1:

1 Like

That I'm aware, the only Xiaomi / Aqara device that comes in other colors besides white is the Xiaomi Cube controller.

xiaomi-cube-smart-mi-home-5

Sadly, there isn't any way to disable the motion sensor in the driver. This would probably be best accomplished through Rule Machine.

I'm going to assume you tried setting the sensitivity level to high. I'm sorry to say that in all my testing, I did not find the activity level to be useful enough for anything other than general feedback of whether there was physical motion during a rough time period. The activity level messages seem to be generated sporadically and not based on any time interval, so it wouldn't be so helpful in being a timely method to indicate that a wash/dryer load has finished.

Yes I did

I see. Thanks for that. Might try the ST sensor or power meter approach then.

I've just done some laundry (aren't we the new age men :grinning:) and it seems the activity level updates about every 5 minutes when there's significant level of activity, as you've mentioned. The spin cycle generates the most (somewhere between 80 - 100+) as you'd expect. So I've created a rule to detect the drop in activity reported after this cycle is done. Hopefully it should be enough to do the job although there will be some delay before the rule triggers (about 10 minutes).

I just installed The Xiaomi Temp/Humity Sensor and driver. Using it to monitor the temp in my basement (since I don't have duel zone heating). It set up easy, got everything dialed in. Just a quick question. Is there a way to modify the refresh rate? It seems to be refreshing at diff rates and all over the place? or is there another problem I am having? the sensor is located literally one floor down below the hub...

I think Keith would be best placed to answer but my observation is that it updates when there is a change in any of the sensed parameters rather than at fixed intervals?

yea if I can get info on how it records the data, that would be awesome. I want to put it on my dashboard so I can take a peek and see what the temp is down there....

No. It will update when there's a change in temp or relative humidity (but not pressure). If there are no changes, it will check in approximately once an hour, and there is no way to change that refresh rate (it isn't determined by the driver, AFAICT).

The best documentation on Aqara temperature / humidity sensor reporting that I have found is here (located in the GitHub repository of the parent company Lumi United Technology):

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.

Note: when they say "temperature changes over 0.5 degrees" they are talking about changes in degrees Celcius. Based on my past "research" and direct experience, the Xiaomi temperature / humidity sensor also reports when there has been a change in temperature / humidity (though it may be a 5% humidity change rather than 6%).

Despite what Lumi states above, the reports are not as consistent as expected. I have seen the sensor wait to report on temperature changes in excess of +/- 5° C. Also, temperature changes seem to have priority over humidity changes. So the sensor seems to sometimes wait for a +/- 5°C temperature change before sending a report, even though humidity has changed more than +/-6%.

For those people who are trying to work with the reported values in a detailed way to generate graphs or look trends, etc., it's also important to understand how the driver generates events.

The sensor only sends reports for all readings (temperature and humidity for the Xiaomi model, and temp, humidity, and pressure for the Aqara model). It does not send individual readings. If you don't see readings arriving in groups in the logs, that means there is very likely some issue with the ZigBee mesh connection (i.e., dropped messages).

However, events for then Hubitat Hub are only generated when there is a change. If for example a new temperature reading is the same value as the previous one, no event is generated. This is by design, to avoid spurious redundant repeated values from cluttering the device's events list. It is of course in direct conflict with some people's desire to plot a graph over a specific interval of time, but then the sensor by design doesn't work that way. It reports based one changes, not time intervals - with the exception of the "heartbeat" reports (which I call "check-in" messages).

Unfortunately, the method to report temperature / humidity (& pressure) in the "check-in" messages is quite different than what's used for the change-based reporting, and due to the craziness of life in the past few months, I haven't had time to update the driver to include the "check-in" reported values.

@veeceeoh I've searched the thread (quickly though) and cant find any info on battery reporting accuracy or issues. All my devices have been staying connected for months even surviving power outages etc. Occasionally I have to repair the odd device here and there but its not as frequent in the past. So over all i'm happy with the device drivers and operations. Only thing i'm seeing is i've had these devices for over a year now and they all almost still report 100% which I find hard to believe. I have motions, temp/humidity and moisture sensors. Is there something specific I should be doing to get accurate battery readings? or is this a know issue?

Thanks...

I just had a temperature sensor drop off for the first time this year. When I looked at my battery monitoring app records I could see where I missed an alert on November 10 telling me this sensor was at 50%. Before that it had reported 100% since it was new around January 15th of 2019.

This one sensor dropped off the network on November 12th with the last battery reporting number in the device at 37%. I could not find an alert in the battery monitoring app for that 37% number, only the report of 50% I missed a few days earlier.

When I checked the voltage on this 10 to 11 month old battery it was showing 2.8v. This reporting over a year was consistent with what I've read others experienced.

In this one device experience the temperature monitor was in an environment where the temperature fluctuated quite a bit and based on both Rule Machine rule performance and Webcore piston performance, this temperature sensor was accurately reporting for the entire 10 month period.

For me the lesson learned is to watch for that 50% alert and change batteries at that point.

1 Like

I just picked up the Aqara temp, pressure humidity sensor yesterday and the temp, pressure and battery seem to be checking in, but humidity has only updated twice. Right now it shows 94.2%. It was as 51.9, but my wife was taking a shower and I had put another sensor in the room to try to calibrate it. That sensor showed 98.2% so I went in and resaved the driver and it updated to 94.2%. This morning the other sensor shows 55%, but the Aqara hasn't checked in since I saved the driver last night and still shows 94.2%. Battery, pressure and temp are all checking in pretty regularly, humidity has only updated 2 times in the 20 or so hours it's been in even though there have been wide swings in humidity. Thoughts? Maybe a bad sensor?

Hi, first of all , thank you for your great job in keeping all drives updated.
I've got a model: lumi.sensor_switch.aq3 (that is WXKG12LM if I'm not wrong).
Unfortunately the "pushed" device state get only the values 1 (1 click) and 2 (shaken). No way to get the devuce state 3. I cannot detect the double click as button 2.
=> This is the first question: is thh button expected to act in such a way?

I'm also trying to use the button to drive two lights:

  1. *the first one is connected directly to HE and it is working correctly (I defined a rule in RM to toggle the light);
  2. *the second one is connected durectly to Alexa and to HE via a "Motion with switch" virtual device. Unfortunately the virtual switch is able to trigger Alexa (the light switch on correctly) but not to toggle it (in order to switch it off).

=> Here arrives the second question: because I cannot use the button 3 function of the aqara device, how can I (if I can) switch the second light off?

Have you tried hitting CONFIGURE on device again? Maybe the reporting config for humidity didn't quite make it to the device.