Home Automation – Fun With The House Part 2

After a year it was all still working, mostly, we had some issues with a few bulbs behaving badly – the would switch on randomly, usually at night, not often but probably once a month. It seems this can be pretty normal for some of these devices and well known.

After a lot of research, looking at different control systems, one called ‘Home Assistant’ popped to the top of the research pile and it was this that I decided to look into using. Home Assistant (found here) is open-source software so is not tied to any major company like Google or Amazon etc. The software runs on a raspberry Pi – these are tiny, bare computers that look like this…

It’s about the size of a credit card and 15mm deep – they are tiny yet boast some serious processing power and connectivity – Ethernet, WiFi, USB & HDMI plus others.  They are also surprisingly cheap (£50 at time of purchase). The software runs on a tiny Micro-SD card, add a power supply and you have a functional computer.

The Home Assistant software was fairly easy to set up, I followed this guide on YouTube but also watched others to get a better idea 🙂  Then the fun started – I needed to learn how to programme things so they did what I wanted. There are a few ways of doing this in Home Assistant, I chose to use an add-on called Node-Red – this a visual, almost drag-and-drop way of setting up control actions. A simple one might look something like this…

The one shown above turns off some lights in the mornings as it gets lighter outside. To figure it out, it helps to view it as a series of questions/answers, from left to right…

Has the light level changed? – This checks the light level outside using a simple motion sensor under the porch.

Is it early morning? – This stops the lights turning off say if it gets dark in the afternoon.

Are the lights on? – Only turn off if they are on, it stops the control sending repeated ‘off’ commands.

Is the light level above my set limit? – Compare the level to a preset number.

Lights off! – The final command to actually turn the lights off.

These “Sequences” as they are called can get pretty complex but walking through in a logical manner enables you to easily see whats going to happen, most of the time 😉  I have also started to learn a bit of JAVA and JSON programming languages as these are needed sometimes for more complex things, it’s all part of the fun.

Continued…

Facebooktwitterredditpinterestmail
Bookmark the permalink.

Leave a Reply