# Keeping track of how many people are on what floor

**URL:** <https://community.homey.app/t/keeping-track-of-how-many-people-are-on-what-floor/80484>\
**Category:** Questions & Help\
**Created:** [May 13, 2023, 11:32pm UTC](https://community.homey.app/t/keeping-track-of-how-many-people-are-on-what-floor/80484 "2023-05-13T23:32:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [May 28, 2023, 9:13am UTC](https://community.homey.app/t/keeping-track-of-how-many-people-are-on-what-floor/80484/2 "2023-05-28T09:13:52Z")

</div>

Hi Rik,

In general, I think that such presence monitoring is not easy to implement. Especially not with 2 motion sensors. The source of error will be relatively high, e.g. if 2 people go up directly one after the other (is detected as 1 person), and later only 1 person goes down again.  
To make these procedures more secure, the other rooms would also have to be monitored for movement. In my opinion, it would be even better if real presence sensors were used, however, there is currently no support for presence sensors, with the exception of the [Homematic IP HmIP-SPI](https://de.elv.com/homematic-ip-praesenzmelder-hmip-spi-innen-150587) sensor (sorry, only in German language). However, this requires an additional gateway. I cannot say anything about the quality.

However, maybe the new Aqara FP2 presence sensor will be supported soon:

> [@Aqara FP2, mmWave presence detection on WiFi](https://community.homey.app/t/aqara-fp2-mmwave-presence-detection-on-wifi/76955):
>
> I just saw that there’s a new FP2 presence sensor coming out now in March, and contrary to the other Aqara sensors it doesn’t use Zigbee but rather Wifi. Probably makes it trickier for someone to make an integration into Homey for it, but…

Regardless of the above problems, a possible way could be as follows:

**Stair up**

_ **When…** _  
– Motion sensor B (upstairs!) is activated  
_ **And…** _  
– Motion-Alarm of MS A (downstairs!) is (still) on  
_ **Then…** _  
– Logic card - Calculate “Variable” as {{Variable +1}}

* * *

**Stair down**

_ **When…** _  
– Motion sensor A (downstairs!) is activated  
_ **And…** _  
– Motion-Alarm of MS B (upstairs!) is (still) on  
_ **Then…** _  
– Logic card - Calculate “Variable” as {{Variable -1}}

So I would do the order the other way around.  
However, if this works depends, among other things, on the used motion sensors and their settings (if possible, keyword “Blind time” and “Cancellation delay”).

---

_[View the full topic](https://community.homey.app/t/keeping-track-of-how-many-people-are-on-what-floor/80484)._
