Aqara FP2 How many people?

Hello - I have an Aqara FP2 integrated into HA via HomeKit. I would like to create some automations when 3 (or more) people are detected in a room… With the HomeKit integration, it seems like all I can do is create automations for Presence or Not… is there a way to get additional functionality with my FP2?

//Brew

There is not. That information is not exposed to HomeKit, and there is currently no other way to integrate this with HA.

Bummer… that’s what I was afraid of hearing…

there is a workaround to this, but requires redesign of your zones in Aqara application and reinstalling the aqara sensor in HA.
In Aqara app you can define up to 30 zones, so you should split the room in up to 30 zones, (representing 1 zone for example with 1-4 squares). Name the zones, z1,z2 etc.
then when you install again the sensor in HA, you will get all these zones.
Then you just have to create a group of all these zones.
If more than 1 person in the room, and the persons are tracked in the detailed zones you have setup, the group sensor will be giving you the Total number of the people with good approximation.

check my work in progress case for live tracking of people in HA with FP2: https://community.home-assistant.io/t/room-multi-people-detection-in-ha-with-aqara-fp2-sensor/627670/4

1 Like

That’s fantastically creative! Thanks for sharing your method!!

Hi how do you setup the counting part?

I have put all my bedroom grids in to a sensor group but how do I code the counting on the total areas as occupied?

good hint. Thanks. In my case I do not have to reinstall the sensor in HA after redefining zones in the Aqara app. The changed/new zone just pop up in HA HomeKit Device.

Can confirm that.

I’m not sure this is possible using standard HA automations. But it is quite easy with the Node Red add-on. You should be aware though that Node Red is a totally different approach to automation and has a learning curve.

If you want to count the zones on, then you should create a Helper => Group => binary_sensor, where you should add all the zones of your FP2 (exclude only Zone 1, since this is the overall Room presence and if selected will double count the presence).
Then create another Helper => Template which you need to point to count the previous Group of Sensors for those that are ON. This way you will have the number of Zones that are ON and with good approximation the number of people in the room…

Below an example code for the template sensor:

{{expand(‘binary_sensor.fp_master_bedroom_presence’) | selectattr(‘state’,‘eq’,‘on’) | list | count | int(0) }}
where binary_sensor.fp_master_bedroom_presence is the Group Sensor that contains the Zones.

Hope it helps

1 Like

From what I see - there’s “Limited free” option to see a count of people in the room.
I enabled it, but it doesn’t appear in HA (tried reloading the integration but no luck). Any ideas if it’s “exposed” ?

At the moment is not. Only Zones presence is available