Aqara FP2, mmWave presence detection on WiFi

@Martin_Verbeek first of all, thanks for all the (dev) effort you put into this app.

For me, it was working pretty stable but i’m sometimes “loosing” the connection between a device and Homey. In the aqara-app its properly working. But in Homey, no data is coming “in” anymore and the identify device button isn’t working either.

I also see @Bazeloth his comment.

Do you store the device their IP? could it be that it has been changed? Are there things that I can do to prevent it from loosing its connection.

Or are there suggestions to reconnect? Because the only way that I know how to reconnect is to do a factory-reset of the device. And that is a lot of effort since you need to reconfigure everything and reconnect all your flows.

I usually restart the Homekit-controller app, but it’s more often than i’d like. Once configured in the Homekit-controller app it should be sufficient to restart the app instead of disconnecting/reconnecting/setting things up in the Aqara app.

The number one issue i have with the Homekit-controller app are the disconnects. It’s very unreliable for me, even with good wifi connection throughout my house.

if properly connected it is reliable for me.

Restarting isn’t helping. I think IP’s changed or something changed.

Hello Guys,

Thank you for your HomeKIt app.
I wanted to share how it worked for me to add this FP2 sensor with 1.2.8 version of the app with an iOS phone:

  1. Add it through Aqara app when it flashes yellow and configure it
  2. Remove it from aqara and Apple Home
  3. DO NOT RESET FP2 (it will flash blue) and add it to HomeKit
  4. Enjoy
2 Likes

Can you check if 1.3.3 (test) is making a difference? I have changed some of the connection parms and it looks (at least at my home) promising.

it was unreliable for me to until I change to static ip. Haven’t had a problem after that been around 4 months.

@Martin_Verbeek

This keeps on happening, causing my lights to do nothing. Right now the app is pretty much useless.
It’s not like the device itself is useless, i can connect just fine using the Aqara app. HomeKit Controller however keeps hitting a brick wall with the closed sockets.

Any ideas on how to fix it?

v1.3.6 Test

How did you change your device to have a static ip?

EHOSTUNREACH is caused by an underlying network problem, so I would suggest checking the state of your network and/or Homey’s network (for instance, Homey’s WiFi is notably unstable).

Always the best way to set static IP is to do it in the DHCP server that normally is in your router, if you have a cheap network it often don’t support this.

I have a Homey downstairs and upstairs and this device with the EHOSTUNREACH is upstairs. Does Homey switch automatically between the devices when sending a signal or should i select the Homey to use per device to have the best results? I can’t find such a setting on the device itself.

You can only have one Homey to interact with the device. It sounds like your upstairs Homey might have issues with its networking.

I’ve assigned static ip addresses for the devices now and will monitor them the upcoming weeks using the logs from Homekit Controller. Hopefully it improves.

After clearing the log and rebooting the app it still see some socket errors tho:

undefined2024-05-12T08:43:58.222Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:58.185Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:58.132Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:58.093Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:58.048Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:57.963Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B setupAccessory Supported Service public.hap.service.sensor.occupancy
2024-05-12T08:43:57.919Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor setupAccessory Supported Service public.hap.service.sensor.light
2024-05-12T08:43:57.868Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D setupAccessory Supported Service public.hap.service.sensor.light
2024-05-12T08:43:57.817Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B setupAccessory Supported Service public.hap.service.sensor.light
x Socket connect 192.168.68.67 49993
2024-05-12T08:43:57.051Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor setupAccessory Supported Service public.hap.service.accessory-information
x Socket connect 192.168.68.69 61162
x Socket connect 192.168.68.71 59146
2024-05-12T08:43:57.010Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D setupAccessory Supported Service public.hap.service.accessory-information
2024-05-12T08:43:56.990Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B setupAccessory Supported Service public.hap.service.accessory-information
x 192.168.68.69:61162 New persistent connection client initialized
x 192.168.68.71:59146 New persistent connection client initialized
x 192.168.68.67:49993 New persistent connection client initialized
x Socket connect 192.168.68.69 61162
x Socket connect 192.168.68.71 59146
x Socket connect 192.168.68.67 49993
2024-05-12T08:43:55.127Z [log] [ManagerDrivers] [Driver:hapIP] discoveredHapBonjour devices Ready start browsing your network
2024-05-12T08:43:55.107Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor initialized
2024-05-12T08:43:55.105Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor setupConnection for E1:B5:ED:79:4D:FA on 192.168.68.67:49993, existing client false
2024-05-12T08:43:55.105Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B initialized
2024-05-12T08:43:55.104Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B setupConnection for F4:A8:5D:C7:B3:8E on 192.168.68.71:59146, existing client false
2024-05-12T08:43:55.103Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D initialized
2024-05-12T08:43:55.100Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D setupConnection for 92:9A:0A:4B:48:D6 on 192.168.68.69:61162, existing client false
2024-05-12T08:43:55.099Z [log] [ManagerDrivers] [Driver:hapIP] [Device:888040ce-08ec-4a95-baff-0038e2f51a1a] Presence-Sensor Driver ready listen for Browser events
2024-05-12T08:43:55.098Z [log] [ManagerDrivers] [Driver:hapIP] [Device:5837430a-9e86-4588-aa23-87353af0545d] Presence-Sensor-FP2-968B Driver ready listen for Browser events
2024-05-12T08:43:55.097Z [log] [ManagerDrivers] [Driver:hapIP] [Device:1ec19066-9288-4605-a5b0-143315186acf] Presence-Sensor-FP2-835D Driver ready listen for Browser events
2024-05-12T08:43:54.923Z [log] [ManagerDrivers] [Driver:hapIP] hapIP driver has been initialized
2024-05-12T08:43:54.921Z [log] [ManagerDrivers] [Driver:hapIP] discoverDevicesBonjour
2024-05-12T08:43:54.631Z [log] [MyApp] Homekit Controller 1.3.6 has been initialized
2024-05-12T08:43:54.630Z [log] capturing stderr
2024-05-12T08:43:54.630Z [log] capturing stdout
2024-05-12T08:43:53.570Z [log] [MyApp] app unload called

Perhaps messages like these are okay though @Martin_Verbeek. Are they just an attempt to connect or do you consider these errors?

x Socket connect 192.168.68.69 61162

T

those are okay,

Just a warning.

When updating the Firmware of the FP2 to 1.26 the MAC address of the device will change.
If you use a MAC protected Wifi Network, your devices will be offline.
You must scan your network to get the correct MAC addresses.

Henk

2 Likes

thanks for the warning.

Mine worked just fine:
Presence-Sensor-FP2-26EF discoverDevices networking changed 192.168.1.36 : 49898 => 192.168.1.117 : 64959

All I had to do is to reserve the new IP.

Hmmm that’s really odd, a MAC address is bound to hardware and supposed to be unique. Unless it’s possible to spoof it with the FP2’s firmware, but, why would Aqara even want to do that?

Also, everyone seems to get the same MAC address this way, after updating. Which can’t be true?

Changing it doesn’t make it less unique per se. FWIW, most modern OS’s allow you to change the MAC address of your computer to anything you want.

From what I’m reading, the reason for the change is that the MAC prefix was changed from a range belonging to Xiaomi to a range belonging to Lumi/Aqara.

Ah, that makes sense, Robert.

True, but to me it just was very peculiar a sensor’s MAC address got adjusted.
I know now it happens :wink:

Hey guys, i just wanted to mention that i just returned 2 of my 10 Aqara fp2 sensors because they were performing badly. They were detecting an average of 40% of the time whether a person joined the room.

Initially i thought it was configuration, placement etc. Both rooms were rather small (bathroom, toilet). I tried all the tricks that i could find on the internet.

But couple of weeks ago i replaced them with new ones, and they worked instantly 100% of the time.

So for people that have issues, it could be a bad sensor. Now all my rooms have fp2 sensors and they work flawless.

1 Like