Introduction
Often you want a sequence to run or an action to be performed only if there is someone at home, for example you may have a water feature which you only want running when you're home to enjoy it, or perhaps you want lights to come on at night when there's no-one home to deter burglars.
This tutorial will show you how to set up the sequences required to achieve this.
To do this we will create a variable, called ppl_at_home to keep track of how many people are at home. Then, you can use the value of this variable to control whether or not other sequences run.
Tracking arrivals
Let's start with the sequence to track when someone arrives home. We will use IFTTT to trigger a sequence when someone arrives home. This sequence will increase the count ppl_at_home.
- Start a new sequence with the IFTTT webhook trigger and set the event name to someone_arrives_home.
- Add the variable change step with the following settings:
- variable name is ppl_at_home
- change is +1
Your sequence should look something like this.
- Create a new IFTTT applet as follows:
- Trigger: Location service
- You enter an area
- Action: Webhook service
- Make a web request
- URL: Copy the URL displayed below the trigger step in SEQUEmatic
- Leave the other values on their defaults
- Trigger: Location service
For more detailed instructions on how to set up this IFTTT applet, see this tutorial.
You will need to set up the IFTTT applet on the mobile phone of everyone you want to track.
Click here to view a screenshot of the IFTTT applet.
Tracking departures
This is similar to the sequence above, but instead of increasing ppl_at_home we will subtract one. Follow these steps:
- Start a new sequence with the IFTTT webhook trigger and set the event name to someone_leaves_home
- Add the variable change step with the following settings:
- variable name is ppl_at_home
- change is -1
Your sequence should look something like this.
- Create a new IFTTT applet as follows:
- Trigger: Location service
- You exit an area
- Action: Webhook service
- Make a web request
- URL: Copy the URL displayed below the trigger step in SEQUEmatic
- Leave the other values on their defaults
- Trigger: Location service
You will need to set up the IFTTT applet on the mobile phone of everyone you want to track.
Click here to view a screenshot of the IFTTT applet.
What to do when there's no-one home
This sequence will be used to trigger whatever steps you want to occur when the number of people drops to zero.
- Start with the variable value trigger using the following settings:
- variable name is ppl_at_home
- comparison is equal to
- value is 0
- Add whatever steps you want to perform when there is no-one home
Below is an example which triggers 3 IFTTT applets when there is no-one home: one to turn off the water feature, one to turn off Hue lights and another to turn off the salt lamp.
What to do when someone arrives home
This sequence will be used to trigger whatever steps you want to occur when the first person arrives home:
- Start with the variable value trigger using the following settings:
- variable name is ppl_at_home
- comparison is rises above
- value is 0
- Add whatever steps you want to perform when the first person arrives home
The following example turns on the water feature and salt lamp when the number of people increase from 0.
If you have any questions, please head to the Q&A site and we can guide you through the process of setting this up.