Sample Usage - Who's Home?

Posted on
Fri May 04, 2018 9:11 pm
jheddings offline
User avatar
Posts: 109
Joined: Dec 01, 2013
Location: Denver, CO

Sample Usage - Who's Home?

The Network Devices plugin is able to detect local devices on your network using their hardware or MAC address.

First, create a variable called count_at_home and set it to 0. We will use this to count the number of people that Indigo can see at home.

Next, set up the devices (such as mobile phones) that typically travel with people in the house. Give each device a meaningful name (like Sam's iPhone). You can find the hardware address under the device settings, often under an "About" or "Network" information page.

Now, set up triggers for each of the devices. When the device becomes active, increment the count_at_home variable by 1. Likewise, create a trigger to decrement the variable by 1 when the device becomes inactive.

Finally, create a trigger called "No One Is Home" and set the type to "Variable Changed." When the count_at_home variable reaches 0, set up the actions to perform when everyone is away. Create a new trigger called "Someone Is Home" and watch for count_at_home to become greater than 0. Add your actions to perform when someone comes home.

For a little additional effort, you can use these triggers to update the houseMode variable to home or away. Other triggers can take place on this variable, depending on if it is daylight or any other conditions you can think of. By setting this variable instead of putting all your actions in "No One / Someone is Home" triggers, you have more flexibility to create interesting events while you are out. I use this approach to kick off a timer that, when expires, assumes we are on vacation and lowers thermostat temps and such.

Share your examples, too!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests