[RELEASE] Aqara P1 Motion Sensor (RTCGQ14LM)

This is a new thread for the Aqara P1 Motion Sensor, that are supported by the Aqara P1 Motion Sensor driver initially published here. As this driver supports several different models of Aqara motion sensors, mixing the updates and the comments for the different devices is somewhat confusing for most of the forum users, so it was decided to split the initial thread into several individual new threads.

The recommended method for installing this custom driver is to use the community Hubitat Package Manager (HPM), search for "Aqara P1 Motion Sensor" or by Tag 'Zigbee'.

For manual installation, the last stable version code is here: https://raw.githubusercontent.com/kkossev/Hubitat/main/Drivers/Aqara%20P1%20Motion%20Sensor/Aqara_P1_Motion_Sensor.groovy

Device Links
Aqara High Precision Motion Sensor RTCGQ14LM
Battery: 2xCR2450
Supports: battery voltage/percentage, detection interval, motion sensitivity, occupancy, LED configuration
Battery life : 5 years
Review: link
Aqara site : link
Manual : link
Amazon .com : link, Walmart .ca : link Homedepot: link
Amazon .co.uk : link, Vesternet: link
Amazon .de : link
Domadoo .fr : link
Aqara Australia : link
AliExpress: n/a

Versions history

1 Like

Reserved #3

Could you please advise regarding the raised alerts for spammyDevices:

Device info



Hi @iEnam ,

HE 'spammy device' alert feature has done a very good job in your case! Yes, there is something wrong with the way this P1 sensor was paired to HE ( the application should be 06, not that long string). The 'application' value is filled in by Hubitat system during the device discovery process, not by a custom driver.

From the logs it is seen that the device sends motion detected and illuminance data every second. This is not normal.

My advise will be to delete it, and pair it again (P1 requires pairing twice) to HE. Pair it close to HE hub, then move the sensor to the same position where it was before and check again the application version and the number of the events.

1 Like

Thanks for the quick reply.
I have deleted and paired it again.




Seems OK now.

With 'Motion retrigger interval' of 5 seconds and 'Motion Reset Timer' of 25 seconds, you should be able to see much longer motion detection periods, if the P1 sensor is activated again from a movement between the 5th and the 25th second.

With my rather agressive settings ( 1 second retriggering, 15 seconds reset) the normal Info logs look like this:

Remember, that when changing the sensor parameters you need to press the pair/reset physical button on the sensor at the same time whe you click on "Save Preferences".

1 Like

I also emulated your aggressive settings of 1 second retriggering and 15 seconds reset.
I believe that my post above, 2 days ago, is also based on an 1 second retriggering.
Unfortunately, I received another pushover alert yesterday.
Could it be the 1 second retriggering causing the issue?


All pushover alerts

Note: I did not check what device sent the alerts prior to the 24th, but I presume that it is most likely the P1.

Most probably the 1 second re-triggering time is outside of the device specifications… if you set the parameter to 2 seconds, does it stop sending motion events?

1 Like

Thanks, I will test later today.

@kkossev, I have updated to 2 seconds, see logs below.
Note that the default and minimum detection interval on Zibgee2MQTT is 2 seconds.
Also, the 18no. instances on the 10th December is when we had a lot of traffic in the hallway corridor due to kids running around all evening :joy:
Will see if the alert is given again, thanks.

Home Assistant/Zigbee2MQTT

Back to HE

1 Like

Looks much better now! I have limited the minimum value of the re-triggering interval to 2 seconds in the dev. branch version 1.2.3.

1 Like

Thanks for your driver for the Aqara P1 motion sensor. I've set it up and have not been able to detect the battery level. Is there something I need to do?

The P1 sensor battery level (in percentage and voltage) should be received and recorded as events every 52 minutes). If this is not the case with your device, you can try pairing it again to HE (close to the hub), then check after an hour whether the battery level will show up.

Thanks for your update on this. The battery level has appeared and your driver works just fine.

I don't think this is a Aqara P1 motion sensor to Hubitat problem. However, I am not sure where to turn to figure it out.
Setup: I got the P1 (v6 code) working with the Hubitat. I can see triggers for motion and motion set to inactive. I connected it to my Amazon Alexa to try some automation. When it sees motion, it turns on lights (Sylvania Smart WiFi) with no problem.
Problem: when I try to set an automation up in Alexa to trigger when no motion is detected, it doesn't work (not turning the same lights off).
I did set up a simple rule in Hubitat that when there is no motion for 1 minute turn off a different light that is controlled by Hubitat. This works just fine.
It seems that Alexa isn't seeing the right signal that there has been no motion.

Has anyone gotten this kind of thing to work?


I am able to pair my new P1 sensor, but I go to device details and don't have the information/motion doesn't actually seem to trigger?

I tried "set motion" and whether related or not, the first time I ended up seeing motion:active but nothing for lux. I also don't think it ever became inactive?

Then I removed device and started pair again... and now I'm seeing no status for it.


dev:292023-02-02 03:10:44.892 PMdebugMotion P1 sending ZigbeeCommands : [he raw 0x87D4 1 0x01 0xFCC0 {04 5F 11 00 00 02 01 0C 01 52 01}, delay 200]
dev:292023-02-02 03:10:14.950 PMinfoAqara P1 Motion Sensor RTCGQ14LM (parse attr 5) device lumi.motion.ac02 button was pressed

dev:292023-02-02 03:10:14.948 PMinfoAqara P1 Motion Sensor RTCGQ14LM (parse) device model is LUMI

dev:292023-02-02 03:10:14.939 PMdebugAqara P1 Motion Sensor RTCGQ14LM parse: Desc Map: [raw:87D40100003C040042044C554D4905000042106C756D692E6D6F74696F6E2E61633032, dni:87D4, endpoint:01, cluster:0000, size:3C, attrId:0004, encoding:42, command:01, value:LUMI, clusterInt:0, attrInt:4, additionalAttrs:[[value:lumi.motion.ac02, encoding:42, attrId:0005, consumedBytes:19, attrInt:5]]]

dev:292023-02-02 03:10:14.926 PMdebugAqara P1 Motion Sensor RTCGQ14LM parse: description is read attr - raw: 87D40100003C040042044C554D4905000042106C756D692E6D6F74696F6E2E61633032, dni: 87D4, endpoint: 01, cluster: 0000, size: 3C, attrId: 0004, encoding: 42, command: 01, value: 044C554D4905000042106C756D692E6D6F74696F6E2E61633032

dev:292023-02-02 03:10:14.690 PMinfoAqara P1 Motion Sensor configure...(driver version 1.2.4 2023/01/26 7:32 PM)

dev:292023-02-02 03:10:14.674 PMinfoAqara P1 Motion Sensor installed() model lumi.motion.ac02 manufacturer LUMI driver version 1.2.4 2023/01/26 7:32 PM

Edit I think I got it on the 3rd time. Despite the 30s motion timeout+retrigger, the log was showing a trigger every second basically, as I picked it up and moved it around/"played" with it. I think this is due to the lux changing, though? Does it make sense this would still trigger every second? If the lux changes by just 1 or something, that seems like a lot of extra triggers.

And using this in a room to turn on the lights, it seems every single trigger would be AT LEAST twice? Trigger when you enter + trigger when its brighter now

Yesterday my P1 motion sensor fell off the Zigbee network... : (
This happened for the first time since I have had it (about 7 months now). The day before I added 5..6 more Zigbee devices to the C7 hub where the P1 is linked to, so undoubtedly the Zigbee routing map has changed... but P1 should not fall off this way.

It wasn't easy to bring it back to the main hub. What worked was:

  • removed the P1 batteries for 1 minute (caution, the battery holder seems fragile)
  • rebooted my C7 hub
  • paired the P1 device twice

So the sensor is working again now, but what happened is disappointing for me.

@Kaitlyn I have noticed a similar effect - frequent illuminance events which happen only during the first few minutes after P1 was paired to HE hub. As the sensor 'settles', the lux will be reported much less frequently. The important lux update is the one which is sent a few hundred milliseconds before the 'motion active' event. Then, when and if the lights turn on based on the movement and the lux changes it may be reported again.

1 Like

Ignore me… I finally understood what you meant by “pair it twice” and now they all work again.

For anyone else a bit dense…

Hold the reset button til it blinks
Pair it
Name it
Save it
Don’t remove the device like I did
Hold the reset button til it blinks
Pair it
Click the link for the device already paired (should be whatever you named it.)

1 Like

Looking to replace my (many) aeotech multisensor6 which are eating batteries like hell) I was looking at that P1 device. I have 2 questions:

  1. Are they good and fast with this driver ?
  2. The battery seems to be as good as advertised ?