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

How did you get the lux value to show on hubitat. I have one and it will only show movement. I am new at this. Thanks

There are two models, the Xiaomi Motion Sensor (RTCGQ01LM), and the Aqara Motion Sensor (RTCGQ11LM).

Only the Aqara model has the light sensor to give lux readings. Which one do you have?

I have the Aqara Motion Sensor (RTCGQ11LM)

Using the correct driver?

Edit - the original and Aqara versions use different drivers.

1 Like

I am not sure I know it says device

Okay - sounds like you don't have a driver installed. Read this post by @veeceeoh, and install the correct driver for your lux/motion sensor:

Also, read this post:

1 Like

Or the driver may have been installed, but it didn’t automatically select it on pairing, so it needs to be manually set and saved in the device settings.

1 Like

This is freaking awesome. Thanks @veeceeoh and to @guyeeba.
Xiaomi needs to put you guys on the payroll or at least get you some free chinese food

Ha ha ha, free Chinese food. Love that idea.

Not a good idea ight now :sweat_smile:

1 Like

Oh yeah, good point. Definitely avoid the bat soup. It's a sad and quite scary situation right now :cry: Hope the authorities can get it under control soon.

[UPDATE] v1.0.1 of Xiaomi/Aqara Temperature Humidity Sensor device driver for Hubitat

User @pat.molloy noticed that pressure events were not being posted correctly, and after checking into it, I discovered that my change to the driver to use the attribute pressureMeasurement based on the Hub version 1.1.0 changes for developers announcement was in error.

Based on Hubitat's Driver Capability List - Hubitat Documentation the correct attribute to use is just pressure, as it was in the driver previously.

So I have changed it back, and everything is working as it should.

The updated driver code can be grabbed from here, or if you are currently using v0.9 or v1.0 of the driver, you are welcome to take advantage of Hubitat's semi-automated Import Code from Website feature to skip the manual copy and paste procedure.

changelist

  • Fixed issue with pressure measurement events not working correctly by reverting back to attribute pressure
5 Likes

Is there anyone who has an Aqara Smart Wireless Curtain Motor model ZNCLDJ12LM (the one with battery) who could help me test the driver I'm writing? I'd like to finish it up and clean up the code, but without testing on that model as well, I can't be sure things work as expected. If you do have one and want to test, there's information in my thread about what needs to be tested for now. There will be follow-up testing needed as well since I don't have this particular model and it doesn't accept the same commands as the one I have.

Hi,
Motion sensor seems to be working great, however it does not show (at all) in the zigbee routing table at http://192.168.1.x/hub/zigbee/getChildAndRouteInfo all the other devices are there except of this motion sensor... any reason for this?

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