Aqara (Xiaomi) temperature and humidity sensor

Hi,

Recently I've purchased 2 Aqara (Xiaomi) temperature and humidity sensors model WSDCGQ11LM.
To get these working in Hubitat the drivers from veeceeoh have been installed.

Although the units are of the same type the behaviour in Hubitat is different.

The first sensor ZBTHB01 shows up with these details.

The second sensor ZBTHB02 show up with different details. More buttons in the preference section, and less data fields. The second sensor is not sending the battery level to HE tiles in the dashboard. That's the only thing I see differently in operation.

Should I treat the second sensor as faulty?

Thanks.

I wouldn't give up on the device just yet. maybe you switched drivers which left some legacy values behind?
I checked mine, I recently put 3 of these devices into play and am having great success with them - but comparing your setup to mine there's a big difference - I'm using a completely different driver.

I'm using with great success: Xiaomi Aqara Temperature and Humidity Sensor WSDCGQ11LM driver from @birdslikewires - See this thread:

Of course, now you need to watch out for ghost attributes/values etc. Use the "Device" trick to possibly clear your ghosts.

@jshimota Thanks for your help. I've installed the other driver you mentioned in the post.

In the HE log I see a problem with the calculation of the pressure variable in the driver. Need to have some time to see whether this can be solved or will ask the developper of the driver.

Give me a shout about that, happy to correct it if there's something wrong.

BTW, if you hit Configure while my driver is installed it'll reset any odd variables and device data states left by other drivers. I'd recommend doing that whenever you switch drivers.

3 Likes

I see the issue were are I'm going wrong.

First the configure button, that one I missed completely.

The values of the sensors on the HE are being passed over through MQTT and Node-Red to Domoticz. For the pressure units I use hectoPascal (hPa) instead of the kPa in your driver.

It seems hectoPascal (hPa) is nowadays more the standard for air pressure.
For me the kPa is ok and I can translate the value in Node-Red to hPa.

Maybe it's just a matter of flavour, not everyone is using the same units.

I should make that more clear in the setup instructions.

Ahh, that would be the difference! :slight_smile:

Hmm, I was going to say that kPa was the value expected by the PressureMeasurement capability, but I am incorrect. It seems to encourage Pa or psi, two 'unrelated' units. I vaguely remember seeing that and thinking "ah, forget it, clearly the unit is arbitrary" and going with kPa as that's what I'm used to seeing. It may even be the default from the sensor, I don't remember without checking.

image

As for hPa... times by ten. :wink:

@birdslikewires As long as the humidity of the sensor is presented in Pa(scal) an easy change in multiplying will do the trick.

Thanks for your help!

1 Like

@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.

Download the Hubitat app