Smart Homes are starting to peek their heads more and more. But making a home smart is more than just attaching a light bulb to an application and turning it on and off.
Enter, Home Automation. This is where a home becomes truly smart.
This type of automation can be accomplished in many different ways using many different platforms. Samsung SmartThings and Apple Homekit are very good beginner platforms to attack the issue. I’m a prior SmartThings user myself and have since retired and picked up Home Assistant to take advantage of the powerful and numerous integrations.
The idea of Home Automation is fairly simple. Do something, and something is done for you. Action = Result. But the execution can be much more complicated than that. A motion sensing light is a perfect example. We’ve all seen motion driveway lights, and how they work. Movement is detected in the driveway and the light turns on, and once the motion is no longer detected the light turns off. I have a similar setup in my stairwell that turns a light on and off when motion is detected.
So here comes the “buts.” Maybe it’s daytime and I don’t need the lights to turn on at all. Or as an alternative, it’s very late and I don’t want the lights to spring on at full brightness and blind me or any burglars wandering my house. If I’m watching a movie, I might not want the lights coming on at all either. Clearly, my movie is more important than someone’s stairwell safety. The solution to this is an even smarter automation.
The Idea of an Automation
Most automations are composed of three main components. A Trigger, and Condition, and an Action. A trigger starts the automation, a condition checks to see if it should continue, and an action to perform.
There are several ways of setting up this automation. The components of home automation area highlighted below. Starting with the most basic;
(Trigger) Motion Detected = (Action) Lights Turn On
Now let’s take that automation and solve a problem. I don’t want the lights to turn on during the day.
(Trigger) Motion Detected = (Condition) Time is between 8 AM and 8 PM = (Action) Lights stay off
= (Condition) Else, (Action) Lights turn on.
Now this will work, but this introduces another issue. As an extremely exaggerated and overly drastic example, in Alaska your sunrise and sunset might be drastically different depending on the time of year. So, instead of using the time in Alaska, you might want to use the sun instead. Home Assistant has this built in when you set the location of your home. It will create a “Sun” entity which you can call on to setup the automation.
Motion Detected = After sunrise / Before sunset = Lights stay off
= Else, lights turn on.
Now this is already more complicated than a motion sensing driveway light. And I would argue that most people wouldn’t need an automation to be any more complicated than this. But that’s not how we roll, so we are going to take things even further. At this point our automations are more than just a “Yes” or “No” answer and result.
For the next example we can introduce another variable, brightness. We want to set the brightness based on time of day. There are many different paths to this answer that will work. We could set times for one brightness and different times for another brightness for example. This is a simple solution that is easy to setup. We might want to reduce the amount of automations we have so maybe we can achieve this using a little logic in our automation.
In Home Assistant you would achieve this using the “Choose” action, and in SmartThings I typically used a side loaded program called Webcore to achieve these using “If this then that” style commands. We won’t get into the specifics of every system out there as they are all different in little ways, but the general idea will apply.
We want to set the brightness to be brighter in the early evening, dim late at night, whilst staying completely off during the daytime. The way I would achieve this is by adding offsets to our already existing sunset times and adding a second fork in the road.
(Trigger) Motion Detected = (Condition) Before Sunset / After Sunrise = Do Nothing (Lights Off)
= (Condition )Else, (Action) Check Times
(Trigger) Times Checked = (Condition) 2 Hours until Sunset / 2 Hours After Sunrise = (Action) Lights 100% = (Condition) Else =(Action) Lights 50% Brightness
Notice how adding a second fork in the road opened even more options to our automation? This is just the beginning, but the options are endless. We could talk for hours about the intricacies of setting up automations. But for now we will leave with our key points.
- Automations are critical to making your home “smarter”
- They consist of three main components, Triggers, conditions, and actions.
- They can be approached in multiple different ways, with some methods working better while others might just be more efficient.
Feel free to comment below with any questions and concerns, and let me know your thoughts!
No responses yet