Is ANYBODY home?

Having set up HVAC using Versatile Thermostat and Scheduler from HACS, I now want to get Presence working properly.

I think that I understand presence for myself and my family as individuals.

We live in a rural area. The City is several hours away, and we can only travel homewards by passing through our nearby Town.

My idea is that the HVAC should go to low energy mode if no-one will be home soon.

In Zones, I have a zone for Nearly Home and another for Town. My idea is that if any of us is home or moves from Town to Nearly Home then the house should warm itself up.

So I need a few things…

How to represent Anybody Home without listing everyone in each rule?

How to know if anyone is moving towards home rather than away?

This sounds like a common problem. Is there a clever Blueprint that deals with all this neatly?

You could use the Bayesian integration to calculate the probability of someone being home, based on movement, phone locations state of lights etc. It’s surprisingly accurate and will give you a single binary entity.

There’s a good howto guide here.

1 Like

Interesting, but since I have device tracking for all five people I am going to stick with the zone/movement idea. . . . but the Baynesian approach would be helpful if we are all away and have a house sitter . . . => I need to include an override Heating ON switch for house sitters who are not known otherwise!

If you get this setup right the zone states should be the count of the number of people in that zone.

The easiest way I’ve found is to put all your family members is a group.This solves two of the three logical conclusions. Group is off then Nobody Home, Group is on then somebody home (possibly everybody).
Next create 3 input_booleans; Everyone Home, Someone Home and Nobody Home. Checking the status of the Group with an automation will allow you to set the value of Someone Home or Nobody Home easily. A second automation where you check for EVERYBODY HOME will complete the logic. 1 Group, 3 helpers and 2 automations. Pretty easy to set up and test and works for any number of family members.
Maybe not the sexiest way to do it but clean and easy and it works.

1 Like

The direction of travel portion of your question can be achieved using the HA Proximity Integration.

  - name: "Art's Travel Direction"
    unique_id: art_travel_direction
    state: "{{ iif(states('proximity.art_to_home')=='0', 'Stationary', state_attr('proximity.art_to_home','dir_of_travel'), 'Unknown') }}"
1 Like

Proximity looks ideal - I’m going to try it out and will report back here.

I think that the best thing would be to make a group of all the known People using a wildcard.

If any of them are home, the house needs to wake up. If we add a new Person then it will wake up for them too.

What I learned today:

  1. there is something wrong with my own location - I am reporting as Home.
    For testing, I am now using a family member who is reporting as distant.

  2. Proximity looks good but
    A) works with devices rather than people
    B) has no UI
    I’ve set up an !include file for Proximity to live in and registered the one family member to test with.

I now have a single Proximity sensor which has the nearness of the nearest family member’s phone :slight_smile:

In HACS / Automation I found Monitor-App for “Andrew’s Monitor Presence Detection System”. I only want to monitor one location (home) so instead, I can use the custom Add-In GitHub - Limych/addon-presence-monitor at v1.0.0 and don’t need AppDaemon.

However, my bluetooth does not currently work, so I’m not looking further at this solution until BLE is available.

In any case, BLE does not help with the “is anyone on their way home?” question - that is better approached using Zones and making sure everyone has the App installed and has the Nabu Casa cloud service configured, so that Geolocation can be used.

Once Bluetooth / BLE is working, it would be good to use BLE to detect guests (non family members) via BLE detection of all standard mobile phone types.

I also found Wasp In A Box which has good logic for keeping track of where people are with a building - not relevant to my project, but worth noting.

  • Go to HACS ❯ Automation ❯ + Explore & Download Repositories
  • Search for “Wasp in a Box” and Download

Today I learned that Zones count people. When the value of zone.home is zero, there is nobody at home.

1 Like