[RELEASE] Aqara / Xiaomi Motion Sensors driver

not that I noticed. I'm pretty sure about the motion detector. For the light sensor I cannot confirm 100%.

1 Like

I have merged the latest dev. branch version 1.4.2 ( dated 2023/05/21) into the main branch (was 1.2.4 dated 2023/01/26)
There are the major changes :

  • added capability "Health Check" and healthStatus attribute
  • removed capability "SignalStrength" (never made it actually working)
  • added attribute 'rtt' (round-trip time)
  • the 'presence' attribute (present/not present) is removed and substituted with attribute 'roomState' (occupied/unoccupied)
  • the 'presence_type' attribute is removed and substituted with attribute 'roomActivity' - possible values "enter", "leave", "enter (right)", "leave (left)", "enter (left)", "leave (right)", "towards", "away"
  • added alternative fingerprint for Mi Light Detection Sensor GZCGQ01LM lumi.sen_ill.mgl01
  • removed the experimental code for the Aqara contact sensor
  • added configuration preference for the illuminance sensors - illuminanceMinReportingTime, illuminanceMaxReportingTime, illuminanceThreshold

These changes were made a long time ago, matching the agreed new attribute names with Jonathan's 'Aqara Human Presence Sensor FP1' driver (available for installation from HPM).

Switching from "Aqara P1 Motion Sensor" version 1.2.4 to version 1.4.2 is a breaking change in regards to the (mis)use of the 'presence ' attribute, so for now I will not push the latest version for a forced update via HPM. Anyone using the old 1.2.4 version will not receive update notifications from HPM. For new installations, the version will be the latest 1.4.2.

The old version 1.2.4 is also available for download from Google Drive :

3 Likes

Can I just replace 1.2.4 driver code with the new 1.4.2 driver code? I see its a breaking change, not sure what that means. Do I just need to configure, or do I need to clear all states with "device" driver first?

Hey guys,

I have a RTCGQ11LM, it was set up for about a year on an app that I made for simple motion "Lights On" etc. All of a sudden it stopped working. I tried to troubleshoot but my knowledge is somewhat limited so bear with me. I was previously using the OhLaLa driver that I had found somewhere. It had the "Presence" indication that I see you had mentioned in previous posts. For some reason I had a Last Check In date of Feb 21st. I figured it might have been a dead battery so I replaced the battery and then deleted that driver and replaced it with this driver.

For some reason I still can't get the device show motion. I reset the device type to the Aqara P1 Motion device and tried to configure but to no avail. I wanted to see if you might be able to see what I'm doing wrong before I delete the device from my system fully and re-add it. Thanks in advance

Have you already installed the Zigbee Map app ?

Do the following :

  1. pair the RTCGQ11LM very close to the hub. Make sure it works. You may need to pair it 2-3-4-5 .. times, Ensure it changes motion active/inactive reliably.

  2. Check the Zigbee Map - you will probably see the motion sensor paired directly to your hub. This is the problem - Aqara older generations battery-powered devices must be paired via an compatible Zigbee repeater (router)

  3. Without deleting the sensor, pair it again, but this time very close to a mains-powered Zigbee repeater (router). By 'close' I mean nearly touching the repeater, so that its signal is so strong, that the Aqara sensor does not hear anything else, except that repeater.

  4. Refresh the Zigbee Map. You must see a picture like this - the Aqara sensor is now communicating via your repeater of choice :

  1. If the map still shows a direct connection to the hub - pair it again very close to the hub (step 3).

  2. Verify that the sensor still works.

1 Like

I gave that a shot and couldn't get it to pair for some reason. I now realize why it dropped from my network, I had Sylvania Smart+ flood lights that must have been acting as the repeater for the sensor that I just changed out the other day (which is right around when my issues started). I'm not sure why the sensor won't re-pair to the Hubitat when I am pairing it right on top of the thing but I will keep trying.

I also have a bunch of Aqara water leak sensors in the house that I am worried are acting up now but aren't as noticeable as the motion sensor.

I checked on one of my Aqara sensors in Hubitat and it says

Not Present Counter: 3618

Which makes me think that something is wrong with the device. However, further down the page it says the last activity on the device was from this morning, meaning I guess it pinged the hub with its hourly check. Does the not present counter mean the device isn't working properly or is that just a bogus number?

Sorry for the novice questions, I couldn't find an answer. I just liked the Aqara sensors as I needed 20 or so of them in my house and they were by far the cheapest option

I am 99% percent sure that this is the reason.

Aqara battery-powered devices from the 'old generation' like the RTCGQ11LM are well-known to 'stick' to the Zigbee repeater(router) and to not re-pair automatically to another router.
This is Aqara 'specific' and can't be changed, it does not depend on the HE driver used.

The other questions are related to the Marcus's driver specifics. Let's use this driver for troubleshooting :

  1. Assign temporarily the Hubitat inbuilt 'Device' driver; click on all the buttons to clear all of the old states, variables, etc.
  2. Switch back to the 'Aqara P1 Motion Sensor' driver.
  3. Pair the RTCGQ11LM motion sensor again to your C-8 hub.

Does it work? Even temporarily, for an hour or two?

Please choose just one of the many RTCGQ11LM sensors that you have. You can't fix everything at once - it must be done one by one.

Also, install the Zigbee Map application that I referenced in my previous reply,
Post your Zigbee Map - we need to see your available routers. I think the Zigbee bulbs should not be trusted to work as repeaters. What other mains-powered Zigbee devices do you have?

Sorry for the delayed response, I have been super busy at work all week. I tried your method of setting the device driver to generic "Device" and pushing all the buttons to clear the sensor, then I switched it back to the Aqara P1 Motion driver. Now the "Current States" list is empty so I'm not sure if it's connected to the network. It doesn't show on the ZigBee map so I would assume it's not connected. I've tried connecting it directly next to my Hubitat hub about 30 times and I can't get anything to show.

My ZigBee map is pretty simple, I have about 70 devices on my network but the vast majority of them are Z-Wave as I've found those to be much easier to use with a generic hub. The reason the Aqara sensors were so appealing to me is that they were less than $10 each, which was great because I needed 15 leak sensors for the different sinks and toilets in the house. The leak sensors (Aqara model SJCGQ11LM) aren't showing on the ZigBee map either so I assume they must have also dropped off the network when I removed my ZigBee flood bulbs that were acting as repeaters.

I'm assuming with the specific drivers for each Aqara device that there isn't currently a way to bridge the Aqara hub to Hubitat.

Do you have an Aqara hub?

No but I would be happy to get one if I could bridge it to Hubitat. The leak sensors are most important to me because I have rules set so that if one of them detects moisture, my Z-wave water shutoff valve and Z-wave well pump switch will trigger

Unfortunately, the leak sensors are not exposed as bridged devices via Matter by Aqara ... : (

I think that you need at least one or two mains-powered zigbee devices to act as Zigbee routers (repeaters) for the Aqara leak sensors.

Get a Zigbee 3.0 mains plug or a dedicated Zigbee repeater - the Tuya ones have proven to work very well.

Sounds good I will definitely check that out. Thanks for the advice :smiling_face:

1 Like