Aqara Binding - new FP2 sensor?

Hello everyone! I couldn’t find any discussions on the new Aqara FP2 sensor, and I’m really curious about it. I’m excited to get one for myself and definitely want to integrate it with OpenHAB. Does anyone have any ideas on how to achieve this? I’ve heard that various open-source solutions are already compatible with the new sensor, but I’m also curious if there are any official plans for support from Openhab. Thank you in advance!

1 Like

I installed Home Assistant, followed this guide Aqara new people presence sensor FP2 - #32 by Joel_DE - Hardware - Home Assistant Community and linked them to Things/items in openHAB via MQTT.

A bit cumbersome to get them detected in Home Assistant, and a bit of boilerplate to get all MQTT items linked. But it works.

Personal bonus: HA also has a Nest Protect binding. Finally got my smoke detectors connected as well :slight_smile:

1 Like

Thanks for your reply but I want to stay with openhab but I guess it´s not possible at the moment…

If there is any update on this please let me know. Thanks!

You’ll still be on openhab, just utilizing HA as a tech bridge (or “binding”) :wink:

Thanks - that´s what I was thinking about when replying.

Meanwhile I installed HA on my Synology NAS virtual machine and playing around. A few minutes ago my FP2 sensors arrived so I´m looking forward to get this working!

I found a promising HAP controller on Gihub which is also used for ioBroker. I opened some issues because the HAP controller doesn’t work as I expected. Maybe it is a good starting point for a bridge FP2 to MQTT once the HAP controller works.

1 Like

Any news on this?

No, I was not successful using the HAP controller. Finally, I used ioBroker as a bridge (FP2 - ioBroker - MQTT - openHab)

I also got nothing new for now - due to lack of time.
Maybe during the winter I have some time to set it up…

I finally bought a FP2 Sensor and installed Home Assistant in a docker container as a “tech bridge”. Adding the sensor to HA was not a problem. But now starts the part of linking the sensor to openhab via mqtt.
@seime: Perhaps you can give me some hints about exporting the FP2 sensor states from HA to OH through MQTT? A mqtt broker is already running and used by openhab (tasmota devices, OpenDTU and awtrix pixelclock).

Btw, the FP2 sensor itself is working great, tested it with the Aqara App and a direct connection to homekit.

Finally got it working with these steps in short

  • configured FP2 with zones in Aqara App
  • installed HA as a docker container in my environment
  • added sensor to homekit, removed it, added it afterwards to HA like described in post #2
  • HA decteted the FP2 and its zones without problems
  • added rules in HA for each zone to post changes (ON/OF) to a mqtt broker (already available in my OH setup)
  • checked MQTT output with MQTT explorer
  • configured things in OH to grap the state of each FP2 zone
  • added switch items for each zone
  • configured rules

Until now i am impressed of the detection results of the FP2 sensor. it has to be tested a little bit more in daily usage. but for now it can replace several motion sensors in one of my rooms with more accuracy and the ability to create even more freaky automations :slight_smile:

A late reply that might help the next person. I added the HA MQTT Statestream component MQTT Statestream - Home Assistant - this will export HA state to MQTT for all entities (unless you add a filter).

MQTT Things config:

Bridge mqtt:broker:mosquitto "Local Mosquitto MQTT Broker" [ host="127.0.0.1", clientID="XX",  username="XX", password="XX", qos="0" ] {
  Thing topic aqara_fp2_1 "Aqara FP2 992D Name" {
    Channels:
    Type number : light_level "Light level" [  stateTopic="homeassistant/sensor/presence_sensor_fp2_992d_light_sensor_light_level/state", unit="lx"]
    Type switch : presence_zone_1 "Presence zone 1 (Name)" [  stateTopic="homeassistant/binary_sensor/presence_sensor_fp2_992d_presence_sensor_1/state", on="on", off="off"]
    Type switch : presence_zone_2 "Presence zone 2 (Name bed)" [  stateTopic="homeassistant/binary_sensor/presence_sensor_fp2_992d_presence_sensor_2/state", on="on", off="off"]
    Type switch : presence_zone_3 "Presence zone 3 (Name table)" [  stateTopic="homeassistant/binary_sensor/presence_sensor_fp2_992d_presence_sensor_3/state", on="on", off="off"]
    Type switch : presence_zone_4 "Presence zone 4 (Name chair)" [  stateTopic="homeassistant/binary_sensor/presence_sensor_fp2_992d_presence_sensor_4/state", on="on", off="off"]
  }

Items config:

Number:Illuminance Sensor_Name_Lux "Name light [%d %unit%]"  <sun> {unit="lx", channel="mqtt:topic:mosquitto:aqara_fp2_1:light_level"}
Switch Sensor_Name_Motion_Proxy "Name sone 1 motion Proxy [%s]" <motion> {channel="mqtt:topic:mosquitto:aqara_fp2_1:presence_zone_1"}
Switch Sensor_Name_bed_Motion "Name bed motion [%s]" <motion>  {channel="mqtt:topic:mosquitto:aqara_fp2_1:presence_zone_2"}
Switch Sensor_Name_table_Motion "Name table motion [%s]" <motion>  {channel="mqtt:topic:mosquitto:aqara_fp2_1:presence_zone_3"}
Switch Sensor_Name_chair_Motion "Name chair motion [%s]" <motion>  {channel="mqtt:topic:mosquitto:aqara_fp2_1:presence_zone_4"}

I also make us of ioBroker to export values via MQTT. This works okay and fast.
However, I would also like to see a native OH binding instead. Happy to support with testing.

1 Like

+1 for a native binding! I’d love to integrate those new sensor into my OpenHAB set-up. :smiling_face_with_three_hearts:

1 Like

+1 here 2 ,i am waiting for openhab support the FP2 so i can buy 1 or 2. I hear its awesome.

+1 for a native binding

Another option (or call it workaround) instead of running a HA instance is the following for people using an Echo Device / Amazon Alexa:

  1. setup and configure sensor in Aqara App
  2. Choose ‘connect to other ecosystems’ in ‘Profile’
  3. set up Amazon Alexa Connection
  4. use the Openhab Amazon Alexa Smart Home Skill and create a virtual switch per zone, eg:
Switch    sPresenceKuecheFp2_viaAlexa             "Anwesenheit Küche FP2 [%s]"               {alexa="Switch"}
  1. add the sensor and virtual switch items in the Alexa App
  2. create routines in the Alexa App like “if motion detection ON then virtual switch ON” and another routine for each OFF

This works out really fast for me, although it’s of course a bit laborious.

Thanks martin that´s indeed a good approach! What I am missing actually is that there are no lux values available through the alexa integration.

But for first testing and playing around with the sensor it´s working quite good! Thank you.

1 Like

is there a way to do this with Google homes, too?

I haven’t tried it, but according to the settings in the Aqara app Google Home integration should be possible.