[RELEASE] Aqara P1 Motion Sensor (RTCGQ14LM)

Update (2)
With 2.3.5.113, everything seems to be working with all my Aqara P1’s online and functioning. Have even learned the hub mesh system and have both my C7 & C8 linked.

Next challenge will be the Aqara FP1 I just received & setting modes.

1 Like

When I look in HPM I see that I have V1.2.2 but this thread says it is up to V1.2.4. HPM Update check says this V1.2.2 is current. Am I missing something?
image

Yes, the current situation with this driver version is a bit messy at the moment... : (
There are 3 versions in use:

  • release version 1.2.2 (2022-08-21) - if installed via HPM before 5th of February.
  • release version 1.2.4 (2023-01-26) - if installed via HPM after 5th of February or installed/updated manually from the link in the first post
  • beta (dev. branch) version 1.4.1 (2023-03-25) - if installed/updated manually from the development branch link.

Unfortunately, I forgot to increase the version to 1.2.4 in HPM when I merged the latest code at that time... And now, the differences between 1.2.4 and the latest development branch version become too big. Before pushing any automatic updates from HPM, I need to find the time to test how the update will go.

There are potentially breaking changes in the latest version 1.4.1 - the previously misused Presence attribute is now replaced with another custom attribute, synchronized with the roomState/roomActivity attributes names in the new Aqara FP1 driver, that is currently in a beta testing stage. So I think that the best time to push the latest version via HPM will be the time when the new FP1 driver w/ regions support will be published.

If you are using this driver with the P1 motion sensor, any previous driver version should work. However, if any bugs are found or new features are needed - this will be done based on the latest development version.

1 Like

Thank you for the information. I understand what I am seeing now.

I am on a C8 and have the Aqara P1 it operates correctly for a few hours and then stops working. I tried the same with another Aqara P1 with the same results.

To make sure there is no issue with the Aqara P1 in install it on my Smartthings Hub where it works without any issues.

Aqara drive installed

  • ver. 1.2.4 2023-01-26 kkossev - renamed homeKitCompatibility option to sendBatteryEventsForDCdevices; aqaraModel bug fix
  •                             TODO: Regions            
    

*/

def version() { "1.2.4" }
def timeStamp() {"2023/01/26 7:32 PM"}

My C8 hub is running version: 2.3.5.131

here is the the Hub for the Aqara

State Variables

  • rxCounter : 89
  • driverVersion : 1.2.4 2023/01/26 7:32 PM
  • txCounter : 1
  • notPresentCounter : 17
  • lastBattery : 100
  • motionStarted : 1683167252690

current state info

Current States

  • battery : 0
  • batteryVoltage : 3.197
  • illuminance : 44
  • motion : inactive
  • powerSource : unknown

log info
dev:292023-05-04 04:25:39.469 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 03:25:39.407 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 02:25:39.334 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 01:25:39.264 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 12:25:39.195 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 11:25:39.112 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 10:25:39.053 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 09:25:38.982 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 08:25:38.886 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 07:25:38.786 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 06:25:38.702 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 05:25:38.627 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 04:25:38.539 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 03:25:38.448 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 02:25:38.334 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 01:25:38.244 AMwarnAqara P1 motion #2 Aqara P1 motion #2 forced battery to '0 %

dev:292023-05-04 01:25:38.228 AMwarnAqara P1 motion #2 is not present!

dev:292023-05-04 01:25:38.214 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-04 12:25:38.149 AMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-03 11:25:38.081 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-03 10:28:32.259 PMinfoAqara P1 motion #2 Motion reset to inactive after 60 s.

dev:292023-05-03 10:28:02.338 PMinfoAqara P1 motion #2 Motion is active 30s

dev:292023-05-03 10:28:02.208 PMinfoAqara P1 motion #2 illuminance is 44 Lux

dev:292023-05-03 10:28:02.199 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E1201232C000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:0001002C, clusterInt:64704, attrInt:274]

dev:292023-05-03 10:28:02.190 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E1201232C000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 2C000100

dev:292023-05-03 10:27:32.695 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 10:27:32.461 PMinfoAqara P1 motion #2 illuminance is 42 Lux

dev:292023-05-03 10:27:32.443 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E1201232A000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:0001002A, clusterInt:64704, attrInt:274]

dev:292023-05-03 10:27:32.431 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E1201232A000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 2A000100

dev:292023-05-03 10:25:38.018 PMdebugAqara P1 motion #2 pollPresence()

dev:292023-05-03 09:53:20.616 PMinfoAqara P1 motion #2 Motion reset to inactive after 60 s.

dev:292023-05-03 09:52:50.652 PMinfoAqara P1 motion #2 Motion is active 30s

dev:292023-05-03 09:52:50.578 PMinfoAqara P1 motion #2 illuminance is 44 Lux

dev:292023-05-03 09:52:50.571 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E1201232C000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:0001002C, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:52:50.562 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E1201232C000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 2C000100

dev:292023-05-03 09:52:20.888 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:52:20.842 PMinfoAqara P1 motion #2 illuminance is 104 Lux

dev:292023-05-03 09:52:20.835 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012368000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010068, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:52:20.827 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012368000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 68000100

dev:292023-05-03 09:52:13.182 PMinfoAqara P1 motion #2 Motion reset to inactive after 30 s.

dev:292023-05-03 09:51:43.199 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:51:43.146 PMinfoAqara P1 motion #2 illuminance is 104 Lux

dev:292023-05-03 09:51:43.140 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012368000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010068, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:51:43.129 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012368000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 68000100

dev:292023-05-03 09:51:41.394 PMinfoAqara P1 motion #2 Motion reset to inactive after 30 s.

dev:292023-05-03 09:51:11.427 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:51:11.350 PMinfoAqara P1 motion #2 illuminance is 102 Lux

dev:292023-05-03 09:51:11.346 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012366000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010066, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:51:11.340 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012366000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 66000100

dev:292023-05-03 09:51:09.284 PMinfoAqara P1 motion #2 Motion reset to inactive after 60 s.

dev:292023-05-03 09:50:39.312 PMinfoAqara P1 motion #2 Motion is active 30s

dev:292023-05-03 09:50:39.247 PMinfoAqara P1 motion #2 illuminance is 104 Lux

dev:292023-05-03 09:50:39.241 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012368000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010068, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:50:39.221 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012368000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 68000100

dev:292023-05-03 09:50:09.574 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:50:09.512 PMinfoAqara P1 motion #2 illuminance is 102 Lux

dev:292023-05-03 09:50:09.506 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012366000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010066, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:50:09.499 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012366000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 66000100

dev:292023-05-03 09:50:09.411 PMinfoAqara P1 motion #2 Motion reset to inactive after 30 s.

dev:292023-05-03 09:49:55.878 PMinfoAqara P1 motion #2 LED is Disabled (0)

dev:292023-05-03 09:49:55.867 PMinfoAqara P1 motion #2 (tag 0x6A) sensitivity is medium (2)

dev:292023-05-03 09:49:55.854 PMinfoAqara P1 motion #2 motion retrigger interval is 30 s.

dev:292023-05-03 09:49:55.817 PMinfoAqara P1 motion #2 illuminance is 106 Lux

dev:292023-05-03 09:49:55.810 PMdebugon/off is 0

dev:292023-05-03 09:49:55.809 PMdebugAqara P1 motion #2 unknown tag=14 dataType 0x20 rawValue=0

dev:292023-05-03 09:49:55.807 PMdebugAqara P1 motion #2 unknown tag=13 dataType 0x20 rawValue=0

dev:292023-05-03 09:49:55.805 PMdebugAqara P1 motion #2 unknown tag=0C dataType 0x20 rawValue=1

dev:292023-05-03 09:49:55.803 PMdebugParent NWK is 974A

dev:292023-05-03 09:49:55.801 PMdebugAqara P1 motion #2 unknown tag=08 dataType 0x21 rawValue=262

dev:292023-05-03 09:49:55.799 PMdebugRSSI is 1 ? db

dev:292023-05-03 09:49:55.797 PMdebugAqara P1 motion #2 unknown tag=04 dataType 0x21 rawValue=0

dev:292023-05-03 09:49:55.779 PMinfoAqara P1 motion #2 Battery level is 100% (3.197 Volts)

dev:292023-05-03 09:49:55.771 PMdebugdecodeAqaraStruct len = 98 valueHex = 3001217D0C0328160421000005210100082106010A214A970C200113200014200064100065216A0069201E6A20026B2000

dev:292023-05-03 09:49:55.762 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC068F700413001217D0C0328160421000005210100082106010A214A970C200113200014200064100065216A0069201E6A20026B2000, dni:B822, endpoint:01, cluster:FCC0, size:68, attrId:00F7, encoding:41, command:0A, value:01217D0C0328160421000005210100082106010A214A970C200113200014200064100065216A0069201E6A20026B2000, clusterInt:64704, attrInt:247]

dev:292023-05-03 09:49:55.754 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC068F700413001217D0C0328160421000005210100082106010A214A970C200113200014200064100065216A0069201E6A20026B2000, dni: B822, endpoint: 01, cluster: FCC0, size: 68, attrId: 00F7, encoding: 41, command: 0A, value: 3001217D0C0328160421000005210100082106010A214A970C200113200014200064100065216A0069201E6A20026B2000

dev:292023-05-03 09:49:39.408 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:49:39.369 PMinfoAqara P1 motion #2 illuminance is 105 Lux

dev:292023-05-03 09:49:39.365 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E12012369000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:00010069, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:49:39.355 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E12012369000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 69000100

dev:292023-05-03 09:49:31.559 PMinfoAqara P1 motion #2 Motion reset to inactive after 60 s.

dev:292023-05-03 09:49:01.568 PMinfoAqara P1 motion #2 Motion is active 30s

dev:292023-05-03 09:49:01.522 PMinfoAqara P1 motion #2 illuminance is 106 Lux

dev:292023-05-03 09:49:01.518 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E1201236A000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:0001006A, clusterInt:64704, attrInt:274]

dev:292023-05-03 09:49:01.512 PMdebugAqara P1 motion #2 parse: description is read attr - raw: B82201FCC00E1201236A000100, dni: B822, endpoint: 01, cluster: FCC0, size: 0E, attrId: 0112, encoding: 23, command: 0A, value: 6A000100

dev:292023-05-03 09:48:31.855 PMinfoAqara P1 motion #2 Detected motion

dev:292023-05-03 09:48:31.804 PMinfoAqara P1 motion #2 illuminance is 106 Lux

dev:292023-05-03 09:48:31.791 PMdebugAqara P1 motion #2 parse: Desc Map: [raw:B82201FCC00E1201236A000100, dni:B822, endpoint:01, cluster:FCC0, size:0E, attrId:0112, encoding:23, command:0A, value:0001006A, clusterInt:64704, attrInt:274]

Any ideas?

Thanks

1 Like

Hi @user5034 ,

Please update to HE platform version 2.3.5.135 and pair the P1 sensor again to your C-8 hub.

After re-pairing, you can search the device live logs for the text "Parent NWK is"
This is the short address of the Zigbee repeating device that P1 is using to connect to the hub. Due to security concerns it is not possible to obtain the device name from a user driver, but you can find what this repeater is by searching for the Parent NWK 4 digits ID. In your case :

Parent NWK is 974A

Go to HE Settings -> Zigbee details and search the web page for 974A.
This is the repeater used by P1 to reach the hub. Make sure this device is operational / online / not switched off.
What model/make is it?

Can't believe it, the P1 has gone offline for the first time on C8 2.3.5.146 (never happened on C7 hub).

Logs

dev:15352023-06-16 11:32:50.118 AMinfoAqara P1 :trackball: ping...

dev:15352023-06-16 11:32:48.248 AMinfoAqara P1 :trackball: configure...fullInit = false (driver version 1.4.2 2023/05/21 10:48 PM)

dev:15352023-06-16 11:11:48.227 AMinfoAqara P1 :trackball: ping...

dev:15352023-06-16 10:03:53.878 AMwarnAqara P1 :trackball: healthStatus changed to offline

dev:15352023-06-16 07:21:32.599 AMinfoAqara P1 :trackball: Motion reset to inactive after 16 s.

dev:15352023-06-16 07:21:22.634 AMinfoAqara P1 :trackball: Motion is active 6s

dev:15352023-06-16 07:21:22.571 AMinfoAqara P1 :trackball: illuminance is 108 Lux

dev:15352023-06-16 07:21:20.698 AMinfoAqara P1 :trackball: Motion is active 4s

dev:15352023-06-16 07:21:20.584 AMinfoAqara P1 :trackball: illuminance is 109 Lux

dev:15352023-06-16 07:21:18.610 AMinfoAqara P1 :trackball: Motion is active 2s

dev:15352023-06-16 07:21:18.558 AMinfoAqara P1 :trackball: illuminance is 107 Lux

Device Health app

If you press the physical button on the device, will it bring it back to life?
Or you need to pair it again to HE?

I just paired it again.
I did notice that the LED was still blinking when motion was detected but not reflected on software.

As I remember, when just paired the LED will always blink when the motion is detected in the first 5-10 minutes, no matter how the LED option is set. This is the time frame in which the P1 sensor also accepts configuration commands without the need to press the device button at the same time.

If you look at the Zigbee map, is the sensor now connected directly to the hub or via a router?

1 Like

Went offline yesterday morning and it was still blinking in the evening when motion was detected, I guess, but was still offline.
I see that it is now directly connected to the hub and settings were reset when I paired it yesterday evening.

Use the community app, not the built-in one.

I noticed this ''(tentative)' label on the built-in map for the first time now :

Another hint to determine whether the Aqara P1 is connected directly to the hub or through a router :

Enable the Debug logs, then press the button on the back of the device shortly. Observe the live logs:

This is the router NWK reported by the sensor itself!
In my case E038 is the Tuya Repeater address.
NWK 0000 means the Aqara device is connected directly to the hub.

1 Like

Yes, the P1 is connected directly to the hub.
Note that it is not showing in the community app map although it is listed as a child in the data section.

Community app


Logs

You can experiment with pairing it through a routing device of your choice - just bring it extremely close to the mains-powered router and pair it again (without deleting it first). You may need more than one try until it changes its path to HE ... Now we have tools to know whether it is paired directly of via a repeater (router).

But actually, this is useful only for the older generation Aqara devices, which used to 'stick' to one repeater/router forever.

Aqara P1 is using the newer '3.0' SoC and actually doesn't need this 'sticking' procedure IMO.

1 Like

Thanks will try this on two of my older aqara sensors.
I gave up trying to keep them connected, and I am now bringing them in to HE via Zigbee2QTT/Home Assistant.

Nooooo ! :slight_smile:
All my old Aqara sensors (motion and contact sensors) are rock solid - just forcibly pair them via a compatible repeater/routing device.

I counted 24 Aqara devices, no one is giving me any trouble.

Summary

The old Aqara contact sensors are the ones with a highest WAF - almost invisible, and I have not changed the batteries for probably 3 years now!

1 Like

Thanks for the tip.
I paired the aqara devices, including a few devices which were showing outcost of zero close to a repeater of choice and I believe they have paired to these respective repeaters.
Will monitor and see how they behave!
Also, you are right the community Zigbee app is more reliable; it was correctly showing offline or zero outcost devices in grey colour, the system app gives no hint!

I bought two of these and got them installed yesterday running the latest version of HE (2.3.5.152), but I could only get them to work using the Pair while trying to avoid Zigbee 3.0 repeaters option (which I don't recall seeing before). I had pulled all of the nearby Zigbee repeaters and even tried pairing right on top of the hub, but simply could not get all of the states to show up until pairing this way. Not sure if there is anything to it, but they've been rock solid and very fast to respond since then. I bought a third just to be sure, and it paired first time to full state reporting on the first try.

1 Like

I picked up 2 earlier this week on Prime day. Installed without any special handling and operating splendidly. I’m sharing to provide a recent purchase experience for anyone that may be curious on these.

I installed it in a temporary location in my home office triggering a simply TTS announcing motion to test before I most it to the permanent location. I set my motion reset to 10 seconds and it’s working as expected. I would however expect the 5 yr battery life estimate to be at the default 30 seconds.

1 Like