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

I'm just posting this for information.
I have a Mi Home hub and I have an Aqara light switch in a cupboard with a door contact sensor.
Both are connected directly to the Mi Home hub and using the automation that are native to this hub.
Usually the light comes on as soon as the contact sensor changes to open.
Very occasionally it can take over a second.
I believe this is because the sensor has to wake up. Not sure though.
The reason for posting this information is we usually blame our zigbee network when this happens. I believe this is not always the case.

Does your MI Home Hub connect to HE directly? Are you using Mi Home App to connect devices to Mi Home Hub? please elaborate it..

In this case these 2 devices are paired to the MI Home hub and this is what is controlling turning the lights on and off. (Using automations in the Mi Home app).

As an aside, I have connected the Mi Home hub to HE using an RPi.
So all my Xiaomi/Aqara devices are paired to the Mi Home hub, which are then ported through to my HE hub via an RPi. I then control/use the Xiaomi/Aqara devices through rules on my HE hub. Works very well with no drop offs of the devices. I used to get them falling off occasionally when paired directly to HE.

The 2 devices mentioned above are NOT ported through to HE and are working exclusively on the Mi Home hub. I just thought I would mention that the contact sensor does go to sleep sometimes and it is not always a flakey zigbee network that is causing issues with these devices.

Hi, out of curiosity, you running HomeBridge on RPi?

No. This is how I'm doing it.
Does work well.
Courtesy of @Royski

2 Likes

The getChildAndRouteInfo feature does not always show all devices connected to the hub's ZigBee mesh network. This has been mentioned elsewhere in the forums (here, here, and here, for example).

The best way to view all devices and the routing of the ZigBee mesh network is with an XBee device.

4 Likes

@veeceeoh
Hi Keith,
So I have 5 Xiaomi Temp/Humidity sensors and I have never really used them for automation just reference. However, I started to utilize their temp, and humidity in a custom application to control my aprilaire humidifier.

I have noticed for a long time that my furnace humidity is way different from my smart sensor humidities (Xiaomi and Zooz 4in1). But I always thought my furnace was wrong because the other sensors were all "close" to each other.

As you can see the sensors are all close but far away from the furnace.

I have had some issues with some moisture on my windows so I thought again the furnace was wrong.

So as I started to use the average of my smart sensors to control my humidity, I am noticing that the humidity is way to low now and my guitars are starting to get buzzy bridges.

So I did some more research and started to wonder if the smart sensors are not reporting Relative Humidity and instead Specific Humidity. Even though all documentation says Relative Humidity.

I found some formulas that convert from Specific Humidity to Relative humidity using Temp, Pressure, and Specific Humidity, the result is something remarkably close to my furnace...

From My Log:

app:8832020-02-10 08:31:01.151 pm debugAverage Outdoor Humidity: 79

app:8832020-02-10 08:31:01.133 pm debugAverage Outdoor Temp: 23

app:8832020-02-10 08:31:01.126 pm debugAverage Indoor Pressure: 29.03

app:8832020-02-10 08:31:01.104 pm debugAverage Indoor Humidity: 39.7777777778

app:8832020-02-10 08:31:01.062 pm debugAverage Indoor Temp: 68.1433333333

Using the above data and putting it into the formula I found I get a Relative Humidity of 21.55. My Furnace reports 21.

So I am not sure what to make of this but it all seems very interesting...

2 Likes

This might be the case. I do notice in the Aqara Home app that the sensors will show offline when they have not been triggered for a while. Once they are triggered, they show online again (if I also unblock the hub internet access too :stuck_out_tongue_winking_eye:). However, I have not noticed a delayed response with the Aqara hub. Maybe this is a Mijia hub thing? :man_shrugging:

Good observation though. I will keep a closer eye on my sensors and their reaction time. From what I have seen and experienced in HomeKit though, they are near instant, regardless of the sensor brand (Aqara or Mijia) or how long they have been "sleeping".

Just as a data point, here is what my thermostat says both on the display and in Hubitat. It is a Honeywell Prestige IAQ, so pretty top of the line. relativeHumidity : 50

My Aqara says humidity : 49.5 Most of the other sensors in the house read in the low 50s on the same floor as the thermostat.

21% humidity would be absurdly low, I don't know how you would get there unless you have massive air leaks in your house or something.

Also took a look at immune. I have an ecobee where the humidity Sensor is on the main floor (top reading).

The xiaomi sensors are scattered through the house mainly upstairs and in the basement.

They are all close. I use them in automations for my bathroom fans.

Tempted...

https://www.amazon.com/Boveda-One-Step-Hygrometer-Calibration-Kit/dp/B000A3UBLA/ref=lp_13825071_1_8?s=lawn-garden&ie=UTF8&qid=1581399630&sr=1-8&th=1

2 Likes

That is tempting...

Throw the sensors in and adjust.

What if the bag is not calibrated correctly and there is an 'R' in the month?
:smile::joy::thinking::wink:

2 Likes

Of course, I would first calibrate the bag with this:

https://www.amazon.com/Fluke-971-Temperature-Humidity-Meter/dp/B01CFXJIP2/ref=asc_df_B005T5JW2S/?tag=&linkCode=df0&hvadid=312152817250&hvpos=1o17&hvnetw=g&hvrand=12064160068354266511&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9010759&hvtargid=pla-458962573377&ref=&adgrpid=61525452389&th=1

I am not an amateur! :laughing:

2 Likes

And from expierence, the only attribute more frustrating to calibrate than temperature is?

3 Likes

I know you're saying that humidity is the only thing worse than temperature. In my experience, Indoor lux is also horrible to calibrate. I can have two identical lux sensors (Fibaros as it turns out) sitting next to each other. One of them is reading ~100, the other is reading ~700 ......

2 Likes

That's a whole-house humidifier unit, right? Did it come with its own hygrometer / humidity sensor(s)?

What's the furnace brand? What kind of sensor does it have? Does the furnace's documentation claim that it's presenting RH or Specific Humidity (or something else)?

You mean you thought the furnace was reporting RH too low, and as a result your humidifier was adding too much moisture to the air?

Acoustic guitars, right? I don't play acoustic guitar, but I understand buzzing frets / bridges means the RH is probably way too low, so Xiaomi/Aqara and Zooz sensors are reporting RH too high.

A quick search produces recommendations of an RH from 45-55% as being ideal for acoustic guitars.

Have you tried using another type/brand of digital hygrometer in the place where you store your guitars? So far, it looks like you're comparing just 3 data points (the three brands of humidity sensors).

Okay, but this is based on one set of readings, and as I understand it since Specific Humidity is in part calculated from Relative Humidity, and RH is calculated in part based on the temperature, both of them will change as the temperature changes. So more sets of readings as data points would be needed to correctly establish correlation.

I imagine this would be pretty tricky to do without a tightly controlled environment, so perhaps it's better to contact The Smartest House to confirm that their Zooz sensor is definitely reporting RH and not Specific Humidity. If they responded that it indeed is, then your furnace's sensor would be the outlier and what would be needed is to increase the target RH in your custom automation application.

Yes, the sensor reports relative humidity.

2 Likes

UPDATE
--- FIXED ---

I'm sure my problem is simple, however I have a QBKG12LM and one side of the switch works perfectly with a generic, but not the second.

if i install the driver

I can see status and changes, but cannot activate a buttons, the driver sees it as a button, not a switch and when pressed, it returns an error;

java.lang.IllegalArgumentException: Command 'push' is not supported by device. on line 5346 (appButtonHandler)

this is where i am stuck! :grin:


So i found after a lot of searching that I had to install the Child Device

https://github.com/guyeeba/Hubitat/blob/master/Drivers/Generic%20Child%20Switch.groovy

All is good!! :ghost::ghost:

1 Like

Hi
First time on this forum. Hence sorry for any errors in advance.
Many thank to veeceeoh and rest of the contributors for developing the Hubitat driver for WSDCCQ11LM Xiaomi temperature humidity sensor. I've tested last night with a a similar new sensor fitted with an LCD screen which I believe is non-branded version of the Blitzoolf BW-IS4 LCD Screen Smart Home Temperature Humidity sensor. Almost looking like the Xiaomi bluetooth units but being Zigbee. All went well with the above mentioned driver and the only parameter that I cannot get is the battery but nevertheless the unit is displaying this on the screen. I'll try now to attach some photos as well.

2020-02-13%20IMG_8625