Keeping track of how many people are on what floor

Hey Homeys!

I learning and trying new things everyday, I am trying to make a Logic of keeping track of how many people are on what floor so I can use this as a base for new and future flows like:

  • If no one is on that floor all the light go off
  • if someone is going to the floor of the tv, the tv goes on
  • etc

But im not figuring out how to make it work, I think this is simple bur I can’t find the way.
I want to do this by using 2 motion sensors on each stairs so:
IF: motionsensor A (downstairs) is activated
AND: motionsensor B (upstairs) is activated
THEN: Logic People on floor 1 is added by 1

And then afcourse in the opposite direction the same.

Do you guys know how I need to do this?

With kind regards:

Rik

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 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:

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”).

I actually wanted this aswell and developed an app based on ESPresense:
https://hdashboards.app/blog/tutorials/homey-room-presence-espresence-homey-app-integration

I am waiting approval from Homey but after that you can do it!