Today’s blog was brought to you by – “Honey! I love you”. Those words have always been a warning sign that something will be asked of me.

For those who follow Elma’s Instagram, (insert shameless plug to her Instagram account @elmamirandamirza), she put up the Christmas trees and decorations around two weeks ago. And yesterday she said “Honey! I love you”, and I gave her the look that said “Yes, what do you want…”.  

She followed up by saying “Can you automate the christmas lights so that they turn on around sunset and then turn off at night so that I don’t have to turn them on and off every time?”

Now that was music to my ears so I asked her what my budget was for the new toys that I might have to get. Which wasn’t much but, oh well, after some googling I came across these cute moko wifi switches which I could control using my smart ecosystem. So of course like a good husband that I am, I purchased 6 of them. 

They were fairly easy to set up and integrate. The next step was to write up a routine using webcore.

I had to define a variable called ChristmasSwtiches which was a grouping of all my switches.

Then wrote up the code below which would turn on the switches on sunset and then turn them off at 2am, every day.

I think the bug of home automation is spreading through the house.