Oh Christmas here we go again. The excitement of the holiday season invariably wears off as you get older but it doesn’t mean there still isn’t some magic to be found while spending precious time with the family. Kids instead have it all at Christmas with Advent calendar, excitement for Santa, gifts, decorations, lights! Yeah lights: someone’s responsible for getting dusted boxes down from the ceiling storage, unpack and install a variable amount of light strips. That’s me at my place: I am not really looking forward to this every year, however I am happy with the final result seeing the happiness of the kids. It's a tough job, but someone's gotta do it.
The problem
Even if you’re not too much into Christmas lights you still might have a Christmas tree and some outdoor lights on your balcony. This, at least, is where I find myself year after year. Nothing too fancy or complex: after hanging some cords of lights one just needs to plug them to a power outlet to light up the darkness with some Christmas magic. But here comes the problem: who remembers to plug them every day in the evening? Especially if you need to go upstairs or stretch yourself behind the couch to reach the power outlet.
The solution
I can say that so far this has been the easiest problem to solve with home automation. And you can apply the same solution to many other similar cases where there’s a dumb system/device that needs to be controlled by an automation.
The light strips we have on the Christmas tree and on the balcony just need to be plugged into a power outlet to start working. Simulating the process of plugging/unplugging them is what the automation should do in this case.
When buying some different types of smart devices in order to create a basic “home automator” kit at the beginning of my journey into home automation I luckily got a couple of Zigbee smart plugs (Tuya EU model ones from AliExpress, but if you’re more comfortable with Amazon there are plenty of options there as well). A smart plug is designed to give users remote control over plugged-in electronics directly via smartphone and/or home automation systems. In this case the remote access happens through the Zigbee network protocol: you can ignore it for the moment, I’ll dive deep into it in a future issue of the newsletter.
First of all I had to add the smart plugs to my Home Assistant (HA). This is a one time procedure similar to a bluetooth pairing process: you plug the smart plug to a power outlet and reset it by pressing the power or reset button (depends on manufacturer) for a few seconds to make it discoverable and start the discovery process on HA (in my case through the Phoscon App but this depends on the Zigbee adapter one is using). Once the pairing is done the device will be visible from HA in the list of available devices: I suggest to name it in a convenient way directly at this point so it will be easy to find in automations and in the future when you might have many devices connected.
I then plugged the smart plug directly to a power outlet and the lights to the smart plugs. At this point an achievement has been unlocked already: from my smartphone using the HA companion app I can switch on and off the smart plugs and so control the Christmas tree and balcony lights from any place (even remotely). Nice! There is still a problem though: manual intervention. One needs to remember about it and execute a defined number of steps every day. Automation is needed!
An automation in HA is usually defined by three parts:
trigger: event starting the automation
(optional) condition: can halt the automation based on observation of the system
action: what is being executed by the automation
So I created an automation that is triggered at dusk (based on the Sun integration), checks that the smart plug is off as condition and eventually switches on the smart plug (and lights) as action.
Similarly I also created an automation to switch off the lights at some point in the night in an effort to save some energy. In this case the trigger is time, the condition to check is if the smart plug is on and the action it to switch off the plug.
As you can imagine smart plugs come in handy every time you need to control a dumb device that would be operational just powering it without the need of replacing appliances that might still work perfectly even if not smart. I am sure you already have some ideas on how to use smart plugs in your home, just hit reply or leave a comment if you want to share any of your plans!
Until next time!
Daniel
I loved your newsletter - I do have a question/comment tho - for something like Christmas lights, do we really need something that has an app?
Just that 24hour clock timers for indoor and outdoor usage has been around a very long time. I have one that has been running for years in -30 Canadian winters. It works 100%.
I'm not sure everything needs to be an app.... I was curious on your thoughts on this - ie, I can see how if you have an ecosystem, then it's an easier side move to choose an item part of that ecosystem.
But for christmas lights, as a daily on/off switch, that problem has been solved via analog devices a long time ago. I wonder if you can cover also analog only devices, where not everything needs/uses an app.
Cheers