Presence awareness for families - Part II: automating things at home

We showed you in Part I: Knowing who is at home how you can get the essential presence data into Apilio. If you haven’t read Part one yet it’s a good idea to read that first.

Once you have completed the steps outlined in Part I it’s time to get creative and use the information for clever automations.
There are 4 typical situations that you might be looking for when automating things based on people presence:

  • First person has arrived
  • Last person has left
  • Is anybody home?
  • Is nobody home?

Going forward, we will show you how to setup an automation that should run as soon as the last person has left the house. At the end of the article we give you some tips how to adapt it to the first person has arrived.

Creating Conditions

To use the state stored in a Boolean variable, you need to create a Condition for each of them. The variable stores the information and the condition is a question we ask of this information, as in: Is Laura home? The answer will be yes or no depending on the information stored.

For our example, you would set the condition for Laura up as follows:

Note that I chose to phrase the name a bit differently from the underlying Boolean Variable to help telling them apart.

You should end up having four conditions as follows:

Setup the Logicblock

We want the Logicblock to do something as soon as everyone has left the home. Because if the last one out forgets to turn off the hallway lights, that won’t be a problem anymore as Apilio will take care of that :slight_smile:

So create a new Logicblock, give it a name and then select all four conditions from the list:

Note some interesting details here:

  1. There is a bolt symbol in front of each condition. That means that the Logicblock will run as soon as any of them changes: as soon as anyone leaves or gets home.
  2. We need to define a complex condition because we need to connect them as “OR” (vs. “AND”).

What this Logicblock achieves

  • Every time someone enters or leaves the home area, this Logicblock will run
  • As long as at least one person remains at home, the Logicblock evaluation will result in the “Positive” result, so the actions configured in that section will run.
  • When the last person leaves, the Logicblock evaluation will result in a “Negative” result, so the actions configured in that section will run. For example, if nobody is at home, then it’s time to turn off any lights, close the blinds, etc.

As we only want to turn the hallway light off automatically, we don’t need to specify any action for the positive case. We only need an action for the negative case! But for example, you could use the positive actions to turn on the lights automatically after sunset if anybody is at home.

My final configuration looks like this:

Variation: Automation when the first person arrives

Until now we showed how to trigger automations when the last person leaves. But of course you can also do stuff when the first one comes home, like switching the hallway light.

To achieve that, we use the “positive” actions to run something we want if the first person arrives. As you may have realised, those will run every time somebody arrives home. Based on the action, that may not be something that should happen all the time if somebody already is at home.
To avoid that, there is the section “Advanced Options” that has a checkbox for “Only fire action if result changed”. Tick it and the Logicblock will only do his work when the outcome changes from “positive” to “negative” and vice versa.

Any questions?

Leave them below :slight_smile: Presence awareness is key for making smart choices about saving energy and keeping your home secure. Let us know if you’d like to get ideas for other scenarios!

4 Likes

Thanks, my work around is using google home :slight_smile: but would like a decent geofence app for Andriod, especially as life360 no longer works with IFFFT

1 Like

Great IF the Google Home app works :rage:
In my case, the app is not showing the needed buttons to setup routines. I only get into the settings with a hilarious workaround. And I’m not the only one :weary: https://support.google.com/assistant/thread/83770174?hl=en

2 Likes

Och, wow that’s a high level of WTF

1 Like

I guess the home/away detection works well on Google Home?
As there is a lack of alternatives for good geofencing apps on Android, we consider having an integration with Google Home to get hold of the presence status.

1 Like

A typical sign of the “digital petro curse” :slight_smile: https://world.hey.com/dhh/google-suffers-from-a-digital-petro-curse-908e919a

3 Likes

Works very well, for me as you know i cross over by having one of my plugs switch on and off by google home. This then tells Apilio when to set home or away.

Though I was always under the impression that google stop giving out presence data due to security concerns.

1 Like