Aqara FP1 and P1 motion sensors

Hello! I don't have this newer Aqara T1 sensor, so I can't test it but you are right - the Motion Reset Timer option is not sent to the device for this model !

If you press shortly the pair button (or is it a pin hole ?), do you see in the logs lines that read "received motion retrigger interval report: XXX" ?

Thank you for answer. A log of briefly pressing the pairing button and changing the option to 2 seconds.

1 Like

Please update the driver to the development branch version (link).
You should see now a preference parameter "Motion Retrigger Interval". Change it to a lower value, and when clicking on the 'Save' button you must wake up the T1 sensor at the same time (press the button on the device).

If thew new retrigger interval is accepted, you should see "received motion retrigger interval report: XXX" in the logs

Also, test setting the "Motion Reset Timer" value to 0. This is a software reset timer, if T1 sends a 'motion inactive' event then this software timer is not needed and I can hardcode it to 0 for T1 model.

thank you , the retrigger interval log seems to have gone up well. And I set the reset timer to 0.
It doesn't seem to change from active to inactive.


I'll try again when I get home. I asked my wife to press the button, so it may not be accurate.

1 Like

hello. When I got home, I paired the device again and changed the Motion Reset Timer option to 0. The motion does not change to inactive over time. I'm going to change the Motion Reset Timer and Motion Retrigger Interval options to 2 and use it. thank you so much. Thanks to you, hubitat hub has increased in value!

2 Likes

Hello kkossev and everyone.

kkossev, thanks for your contribution!

I just got my Aqara Motion Sensor P1 and it doesn't seem to work with your driver. Could it be because my model is new? I tried repairing it 6 times and each time the same result; see below. Thanks in advance for any/all help!


Name:

Aqara Motion Sensor P1

Model:

MS-S02

SKU:

AS038GLW01

Production:

06/2022

Logs:

dev:1842022-08-21 09:23:26.755 pm debugMotion sending ZigbeeCommands : [he raw 0x147E 1 0x01 0xFCC0 {04 5F 11 00 00 02 01 0C 01 52 01}, delay 200]
dev:1842022-08-21 09:22:56.799 pm infoAqara P1 Motion Sensor RTCGQ14LM (parse attr 5) device lumi.motion.ac02 button was pressed 
dev:1842022-08-21 09:22:56.797 pm infoAqara P1 Motion Sensor RTCGQ14LM (parse) device model is LUMI
dev:1842022-08-21 09:22:56.789 pm debugAqara P1 Motion Sensor RTCGQ14LM parse: Desc Map: [raw:147E0100003C040042044C554D4905000042106C756D692E6D6F74696F6E2E61633032, dni:147E, 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:1842022-08-21 09:22:56.781 pm debugAqara P1 Motion Sensor RTCGQ14LM parse: description is read attr - raw: 147E0100003C040042044C554D4905000042106C756D692E6D6F74696F6E2E61633032, dni: 147E, endpoint: 01, cluster: 0000, size: 3C, attrId: 0004, encoding: 42, command: 01, value: 044C554D4905000042106C756D692E6D6F74696F6E2E61633032
dev:1842022-08-21 09:22:56.731 pm warnAqara P1 Motion Sensor RTCGQ14LM if no more logs, please pair the device again to HE!
dev:1842022-08-21 09:22:56.662 pm infoAqara P1 Motion Sensor RTCGQ14LM device model lumi.motion.ac02 manufacturer LUMI deviceName was set to Aqara P1 Motion Sensor RTCGQ14LM
dev:1842022-08-21 09:22:56.641 pm infoAqara P1 Motion Sensor configure...(driver version 1.2.2 2022/08/21 9:01 AM)
dev:1842022-08-21 09:22:56.613 pm infoAqara P1 Motion Sensor installed() model lumi.motion.ac02 manufacturer LUMI driver version 1.2.2 2022/08/21 9:01 AM

Current States:

powerSource : ?

State Variables:

rxCounter : 1
driverVersion : 1.2.2 2022/08/21 9:01 AM
txCounter : 1
notPresentCounter : 0
lastBattery : 0
motionStarted : 1661142176663

Hi @dfacto ,
Yes, unfortunately, the pairing of your P1 sensor is not successful..
I will check later tonight if the latest driver version works with my P1 sensor, hopefully nothing got broken while adding FP1 support code.

What is your device 'ápplication' version? (this corresponds to Aqara firmware version )?
This is mine:

How close to the HE hub you are pairing the sensor?
Try to pair it really close, less than 1 meter away from HE box.

1 Like

Hi @kkossev; thanks for the quick response! Data is:

endpointId: 01
model: lumi.motion.ac02
application: 05
manufacturer: LUMI

Tried pairing <1m but still getting the same results. Procedure:

  1. Within <1m from HE C-7 hold button on P-1 sensor for 10sec until blinking blue.
  2. While still holding button, start "Find Zigbee device" on Hubitat.
  3. Release P1 button; sensor is found immediately.

Once pairing is complete I can collect the pairing info:

Device pairing info
Manufacturer:   LUMI
Endpoint 01 application:    05
Endpoint 01 endpointId: 01
Endpoint 01 idAsInt:    1
Endpoint 01 inClusters: 0000,0001,0003,FCC0
Endpoint 01 initialized:    true
Endpoint 01 manufacturer:   LUMI
Endpoint 01 model:  lumi.motion.ac02
Endpoint 01 outClusters:    0003,0019,FCC0
Endpoint 01 profileId:  0104
Endpoint 01 stage:  4

The difference that I see is that your P1 motion sensor has an older firmware version. Yours is 05, while mine is 0.6. I paired my P1 to Aqara E1 hub and checked that 06 is the latest/current firmware for this sensor.

When pairing to HE, this driver sends initialization commands to the sensor that I don't know the exact meaning of, it was copied while sniffing the communication to Aqara hub... So the difference in the firmware version may be the reason why your P1 doesn't send events to HE.

Is there any chance you can find an Aqara Zigbee hub and update the firmware?
This is the only idea that I have for the moment.

Thanks for checking! I'll get a router and just return it when done.

In the interest of helping others, can I sniff the packets somehow and we add that to your driver?

I have Aqara Smart Hub E1

I am using this method : Sniff Zigbee traffic | Zigbee2MQTT

The needed hardware is pretty cheap: https://www.amazon.com/Sniffer-Protocol-Wireless-Interface-Antenna/dp/B09C8J9GXK
(EDIT: changed the Amazon link, the previously posted one was BlueTooth version)

Sniffing, recording and analyzing ZIgbee traffic has a learning curve, but is something very useful if you ever decide to write or modify a Zigbee driver.

Thanks again kkossev. Finally got the P1 to pair and was able to successfully decrypt packets with wireshark. Thanks for the hardware/software tips!

It turns out your driver does work with P1 at version 5. The issue was that the P1 wasn't pairing unless the P1 was centimeters from my hub. I discovered this by accident when playing with the CC2531. Note: close proximity was required for pairing even after updating to firmware version 6 via the E1.

Despite the fun of packet sniffing and playing with drivers I am extremely disappointed with the P1. I get maybe 1 meter motion sensitivity range even when set to "High" sensitivity. A deeper read through of Amazon reviews reveals a similar experience among many.

The conclusion is that the P1 is a waste; a pity too: it would have been a welcome addition to my network both for its alleged functionality and its battery life.

...Perhaps we should stock up on other older Aqara devices now in anticipation of them "updating" these other devices. :frowning:

It’s a mystery for me why some Zigbee devices require pairing so close to the hub. The only logical explanation would be that there is a very short time critical window in which the device expects to receive some configuration or confirmation data from the Zigbee coordinator. This is most certainly true in the case with P1, as this driver is sending a ‘falsified’ Node Descriptor reply command, pretending to be an Aqara hub.. This was the only way to make it work with HE. However, such complex initialisation code has never been needed and never done for pairing to ZHA or Zigbee2MQTT or SmartThings.

I have not noticed so big lack of sensitivity with my P1. It is placed on a shelf in my living room, detecting the entrance from the opened door inside the room. So the P1 is used mostly to detect fast movement from right to the left, at a distance of about 3 meters.

See one comment here :

I wonder if the issue is that low power ZigBee might need to pair with a hub and not repeater. Perhaps proximity is required in my case because I have many other ZigBee repeaters nearby.

I have one devices that does this and never changes to leave
image

Does the presence clear if you power off/ on the device?

Anything that may keep it occupied like a fan, air conditioner, curtains moving?

1 Like

Going to have to move it to a different location in the room its got to be curtains, just can't be anything else

The positioning of these devices is critical for resetting the occupancy. I had to tilt one of my FP1 about 30 degrees down to the floor to avoid the interference from an air conditioner. No moving parts in the internal AC unit, just blowing cold air.

1 Like

Just got my first FP1 sensor in the mail today! I first paired it with my E1 Hub to see if there were any updates and to make sure it was working before trying it on HE. I was blown away to see that within the Aqara app, one can set up zones!

@kkossev , is this even a consideration for this driver (or separate app)?? This device is already a game changer but being able to block out a zone to 'hide' a ceiling fan would be game over! :hushed:

Thanks again for the great driver!

4 Likes

Download the Hubitat app