Pretty sure this guy is going back. I did resolve my issue previously reported. Apparently for HA to discover the HomeKit device after it’s been deleted from HomeKit, it has to be on the same broadcast domain (same subnet). I can live with that. Now, I had it installed, it was in Home Assistant working fine until I use the Aquara app to create some additional Zones. As soon as I did that, and tried to reload the HomeKit device integration, it could no longer connect to the FP2. And if you remove it from HA, expecting it to be discovered again and hopefully showing your new zones, thou shalt be disappointed. It’s just gone, and you get to go through the while dance again. I am exhausted and I haven’t even created an automation to use it yet. This sucker may work with Home Assistant, but I’d not call it Home Assistant compatible.
Did we always have to remove a device from HomeKit to use it in HA?
Thanks, but no help for my situation. Addresses other Auara devices, and the Sleep mode of the FP2. I would not be using sleep mode. Still, I appreciate the response.
tl;dr blocking FP2 from WAN access decreases latency
Sure, it is an older thread but that is sometimes where the gold is!
I have been hunting for ways to reduce Aqara FP2 latency, both time to detect and FP2 presence detection to HA action. These two together I refer to as “overall latency.”
Use case: position-sensitive lighting.
Integration: My two FP2s are integrated via Aqara app to HomeKit, and then via HomeKit Device to HA.
Blocking outbound WAN access from the FP2 cut overall detection latency roughly in half. It also reduced missed detections arising from faster moving targets
That’s all I can give you now until I get more data.
Blocked:
Outbound port from FP2: 63296
Destination: 35.167.31.59:11111
For the past six months my sensor kept shutting down at night time, and the only thing that helped was restarting it. I even had it plugged into a smart USB socket just for that. I couldn’t figure out what was causing it. But after blocking internet access specifically for this sensor, the problem completely disappeared. Thank you @DavidA3591 !
I have reverse engineered the ESP32 firmware for this sensor and put together a ESPHome config for it. Still very experimental, but it works decently well.
this looks really impressive. i would love to try it out. any eta on flashing instructions? i need to find my ftdi… ![]()
Just got a second sensor yesterday, I took pictures while flashing it. Will see if I can get instructions posted today ![]()
I added a guide for flashing the device:
You are a gentleman and a squire. Will try to test in the next day or two.
Fantastic! Thank you very much
Did you manage to flash ESPHome and get the device working? Knowing that the instructions and config works for someone else as well would be nice to know ![]()
Yes.
I couldn’t make a backup using the FT232RL, but flashing from the latest commit worked fine and the device is visible in Home Assistant.
I’m currently adding a card and will be experimenting.
I was very disappointed that FP2 is not available in Home Assistant, so you made my day ![]()
Awesome! Let me know how it goes and let me know if you have any questions
Seems almost all works. I can see logs of my movements in room but in card I get
“An action which does not return responses can’t be called with return_response=True.” warning.
I use 2025.12.5 HA. And 2026.1.0 just published, not sure if I should update
[17:31:28.287][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:28.781][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:29.285][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:29.378][W][aqara_fp2:558]: Unhandled report 0x0201
[17:31:29.781][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:30.275][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:30.795][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:31.275][D][text_sensor:097]: 'FP2 Targets': Sending state 'AQAALgApAAAAAAAAAAAA'
[17:31:31.582][D][binary_sensor:047]: 'FP2 Global Motion': OFF
[17:31:31.587][I][aqara_fp2:508]: Received global motion report: 1
[17:31:31.592][D][binary_sensor:047]: 'FP2 Global Presence': OFF
[17:31:31.597][I][aqara_fp2:516]: Received global presence report: 0
[17:31:31.602][W][aqara_fp2:558]: Unhandled report 0x0121
Ah yep, I use action responses to fetch metadata from the device, which I hadn’t realized were just added in 2026.1.0
In my case led pin is inverted.
Also nice to add ota to yaml, I missed and dissasembled twice)
light:
- platform: status_led
name: "FP2 Status LED"
pin:
number: GPIO27
inverted: true
ota:
platform: esphome
Good input, I added your suggestions to the example config:
- Invert the LED pin
- Add OTA section to example
- Add fallback hotspot and captive_portal to example