By now you’ve probably got a decent number of Insteon-enabled devices in your home, like switches, thermostats, keypads, motion sensors, door sensors, and leak sensors, to name a few. Your house is getting smarter and smarter every day with your control devices (allowing you to tell it what to do) and sensing devices (allowing it to tell you things that are going on).
We’ve introduced the concept of geo-fencing and a great means of notification, so today we’re going to go over a couple of tips to help you blend that location awareness and alerting with the inputs (control) and outputs (sensing) of your home.
The above program basically says “if anything is on, shut everything off”, and is run only when the “Outside 100 meters” program runs. “Outside 100 meters”, in turn, runs when the 100 meter geo-fence state variable goes to 0. In other words, if I go more than 100 meters away from home, my house shuts down all the lights on its own – and there are other actions that occur depending on how far away I am.
Below are some other tips that should help tie the pieces together for you.
- I use 3 basic geo-fences in my system, at 100 meters, 5 miles, and 100 miles. The idea is that I want different things to happen depending on how far I am away from home.
- These geo-fences are identified by state variables, which can be pretty tricky because simply changing these variables may cause programs to run.
- Remember the difference between checking the status of a device, as opposed to checking the control, in the conditionals of your programs. When you turn on a light, the change in status and control will cause an event to fire and a program to potentially run because the status and control are both “on”. However, if you run the same program immediately after that, the status will stay true (because the light is still on), but the control will be now be false (because the light isn’t in the process of turning on).
- If your program checks the status of a device in the “If” clause (like the above screen shot does), and you don’t want that program to run when the status changes, right-click the program and disable it. That doesn’t mean it can’t run – it just means that it won’t run when the status of any of those devices changes. If we did not disable the above program, we actually wouldn’t ever be able to turn on any light in the house (because as soon as a light went on, the program would run, and the “Then” clause would shut it off). Again, disabling the program doesn’t mean the program won’t ever run – we just need to explicitly call the program rather than let it run on its own.
- Because there are no string variables and no way to pass arbitrary values to notifications or the network module, you have to create a separate notification string or network resource for each message you want. This can be a bit tedious, since in a perfect world you’d have a single “security” resource, then pass in a string for which icon to use and/or what message to display. I cut corners at times. For example, instead of having a separate network resource for each leak sensor I have, I just use a single resource that notifies me that “a leak was detected somewhere”, because there isn’t one leak type that’s more important than another. Same thing with smoke alarms.
- For each of my geo-fences, I have one program for crossing into an area, and one program for crossing out of it. In each of those programs, I call other programs to perform specific actions, such as:
- Notice the 5 mile threshold sets the thermostat to “Away” (a couple degrees off normal) when both coming and going. It does this because if I’m leaving the house heading out, I want to transition from “Home” to “Away”, but if I’m just coming in from out of town I want to transition from “Vacation” (basically off) to “Away”, before transitioning to “Home” when I get close to the house.
- Finally, I have a handful of programs that check various sensing devices and send me an alert if events occur such as doors opening or motion sensors being tripped (not to mention water and smoke sensors). The motion and door sensors are particularly interesting because, when I’m home I don’t need a notification every time I walk past the motion sensor in the kitchen – but when I’m away that’s something I would find keenly interesting. It’s basically a simple alarm system that you don’t ever need to set.
“I’m at the neighborhood bar”,
aka “I could be home any minute”
Set A/C to “Home” mode
Turn off Lights
“I’m drinking across town”,
aka “I could be home soon”
Set A/C to “Away” mode
Set A/C to “Away” mode
“I’m in Vegas”,
aka “I may never get home”
|Send Notification||Send Notification
Set A/C to “Vacation” mode