Aqara (Xiaomi) temperature and humidity sensor

@birdlikewires I am getting this error often - about every 15 mins or so. can you take a look?

I have hit the 'configure' button. I've disconnected and reattached it.... not sure where it comes from... I just checked your github - it says v1.03 but... I don't think my 1.03 is the same as what is there... should I update from HPM or hand override?

@jshimota I've seen in some occasions errors in the HE logs earlier. I wasn't able to pinpoint the reason for the errors at that time . And to my surprise they disappeared the next day automatically. These errors weren't linked to the Aqara drivers. I've had them with other drivers as well. It sounds strange but it looked to me as the start of the driver wasn't done correctly. I'm not sure but I might have done a reboot of the HE.

A couple of weeks ago I was in discussion on the forum because of the units of pressure etc. in the Aqara driver. I've made myself the modification to the code replacing kPa for hPa. This is for me the more common unit for representing the pressure.

@jonjon the driver I have has kPa. Did I misread your statement or are you suggesting to replace kPa with hPa? sorry, I'm stumbling over the wording

@jshimota The driver code is functional. I’m using hPa to indicate pressure at my home. Pressure in kPa is also ok but for me a matter of flavour to prefer hPa for the units.

I just got 2 of the WSDCGQ11LM sensors. Which driver to use? A little confused.

If you have a Xiaomi/Aqara compatible zigbee mesh, then use the driver from @birdslikewires, linked to below:

Thanks! How do I know if I have that mesh? The initial pairing went fast.

Basically, the Xiaomi stuff is very fussy. If you have something on the same mesh they don't like (and that includes some of their own range) then they will be unreliable and drop off all the time. Nightmare. Their own hubs must have some "special sauce" to keep it all ticking over.

I now only use their battery powered devices on a Hubitat hub dedicated to running them, using only IKEA E1746 repeaters (which they seem to love). Plus side is, doing it this way, I've been using all of the kit I've written drivers for since December last year with no faults. None. Zero. Not a sausage. Every button press has been perfect.

Have a read of the first post from my driver thread, see what you think.

Thanks! It's actually been rock solid since paired. I use Peanut plug repeaters and have had great luck with them.

1 Like

@birdslikewires Hubitat Package Manager tries to update this driver but fails every time. see log and screen shot.

19852022-11-30 10:29:13.615 AMinfoFatal error occurred, rolling back

app:19852022-11-30 10:29:13.019 AMinfoUpgrading Xiaomi Aqara Temperature and Humidity Sensor WSDCGQ11LM

app:19852022-11-30 10:29:12.589 AMinfoDownloading Xiaomi Aqara Temperature and Humidity Sensor WSDCGQ11LM

app:19852022-11-30 10:29:12.171 AMdebugnull

app:19852022-11-30 10:29:11.927 AMdebugPerforming update

app:19852022-11-30 10:28:54.991 AMdebugprefPkgVerifyUpdates

app:19852022-11-30 10:28:53.340 AMdebugUpdates available

app:19852022-11-30 10:28:43.101 AMdebugUpdates available

app:19852022-11-30 10:28:41.292 AMinfoChecking for updates for Xiaomi/Aqara Contact Sensor

app:19852022-11-30 10:28:41.051 AMinfoChecking for updates for Sonoff Motion Sensor

app:19852022-11-30 10:28:41.048 AMdebugUpdates found specificdriver for https://raw.githubusercontent.com/birdslikewires/hubitat/master/xiaomi/packageManifest.json -> Xiaomi Mijia Smart Light Sensor GZCGQ01LM (force production: true)

app:19852022-11-30 10:28:41.044 AMdebugUpdates found specificdriver for https://raw.githubusercontent.com/birdslikewires/hubitat/master/xiaomi/packageManifest.json -> Xiaomi Aqara Wireless Remote Switch WXKG06LM / WXKG07LM (force production: true)

app:19852022-11-30 10:28:41.039 AMdebugUpdates found specificdriver for https://raw.githubusercontent.com/birdslikewires/hubitat/master/xiaomi/packageManifest.json -> Xiaomi Aqara Wireless Mini Switch WXKG11LM / WXKG12LM (force production: true)

app:19852022-11-30 10:28:41.034 AMdebugUpdates found specificdriver for https://raw.githubusercontent.com/birdslikewires/hubitat/master/xiaomi/packageManifest.json -> Xiaomi Aqara Temperature and Humidity Sensor WSDCGQ11LM (force production: true)


@birdslikewires Do you have an idea why?

Which version of HPM do you have installed? Only the latest version will update drivers which use libraries.

Give that a check and try it again.

I added one of the WSDCGQ11LM sensors a couple weeks ago. I initially went with the birdslikewires driver, and all was working fine until I checked it yesterday. I noticed the sensor was being reported as not present. I ended-up having to reset the sensor and re-pair into my system. After re-pairing, I noticed that I was not longer seeing battery voltage being reported. Temperature, Humidity and Pressure all were being reported. I then tried the Oh-La Labs driver, but still no battery voltage reported. Does anyone know why this may be happening? I have updated the Habitat firmware a couple of times. Could there now be an incompatibility?

Do you have Zigbee repeaters that are known to work with Aqara/Mijia devices? It's crucial to keeping them connected. I have 2 of those same sensors and I keep them near a Ikea TRÅDFRI outlet to keep them on my mesh.

2 Likes

I have a number of Zigbee devices that I believe would act as repeaters. I even have an Aqara Contact Sensor which is operating fine in the same room as the Temp/Humidity sensor . The other strange thing is that the sensor was fully functional until a couple of days ago.

Before I had the Ikea repeaters, my Aqara devices would stay paired for few days to a few weeks, and then randomly drop. It's not just any repeaters, but specific ones that are known to work. See that thread.

1 Like

swap the battery if you have one - my aquara acted up and the battery was reporting at 70 so DW status said it was okay. I swapped battery - that was 5 months ago and zero issues with that device since.

@birdslikewires Hi. an issue or two to report.
While debugging my HE (c7) today - one device I have problems with since the spat of zigbee issues is an aquara sensor in my main shower.
Debugging - I found 'library' in the libraries code returned a '404'. the xiaomi library returned content. A refresh of the page gave me a result. I was able to repeat this but can't see a cause.
Ignoring the wierd library problem - On the device screen I use a simple label. I copy that label to Name and save. All is fine.
I hit configure and save preferences and the Device Name reverts to 'Xiaomi Aqara Temperature and Humidity Sensor WSDCGQ11LM'. I believe this is unwanted behavior.
Feature request - I feel a false (off) value of debug or trace bool should generate a loginfo event but not a logdebug or logtrace. I use debug and trace for notifications and this causes my application to report a problem that isn't there. Can you set an if/else around line 640 of the library?
image

I'm sorry, I don't really follow this, and from what I do follow I wouldn't make a specific driver change based on a personal preference. But you can make any change yourself and keep your own copy of the driver, no problem.

3 Likes

Okay- so - irony. I modded your driver as you suggested, fixed the Device Name problem, and modified the libraries as well.
Now the Irony. I was doing the programming work at my desk in my office, then I was very pleased and went to put it back in the shower I monitor. And I dropped it. Of course the shower was wet and the damn thing fried. Un-fricken-believable.
So, went on amazon and found a little deal on some 3rd Reality items and bought two. If Hubitat HE is pictured, I can't go wrong. right? I like the AAA batteries, and I can delete the rule where I ask Alexa to tell me what value Humidity is reporting since it has a display! Sort of excited. I've been trying to keep that aquara going for a while now - glad to be rid of it.