About Home Asssistant

I am a big fan of an open source software platform called Home Assistant. About 4 years ago I started building home projects capitalising on the low cost IOT hardware that is now available. As always, its best to have a vision in mind. So I focused on home automation and set myself the task of bringing an English Victorian house built 170 years ago into the 21st century without ripping it apart in the process. A year later I discovered Home assistant and it was exactly the glue I needed to bring everything together.  If you are looking to start you own home automation project, you should definitely check out what the guys at home assistant have done. There are so many interfaces now to IOT products that I’ve lost count. They have a great contributor community that has done a lot of the heaving lifting (coding) work for people like me. How much you learn is up to you and your ambitions, but running a Home Assistant project will teach as much as you like in all the technologies below:

Raspberry Pi : The wonderfully adaptable and inexpensive computer which comes in various sizes and is an ideal hub for all your devices to communicate with.

Linux: The operating system which Raspberry pi is based on. Raspberry Pi uses a linux variant called Raspbian, but others are available

YAML. Wikipedia defines YAML as a data serialization language, but to you and me and other Home Assistant users, it’s a simple file format in which you can store device configuration information and scripts to tell Home Assistant what to do when different events happen. One thing that can be frustrating with YAML is that programs that read YAML often do not explicitly state where there is a mistake in your YAML flie, so you often have to be very wary of making seemingly simple changes and always test them.

JINJA: Again Wikipedia defines JINJA as a web template engine for the Python programming language. Home assistant is built from python code and so it makes sense they chose Jinja. In Home Assistant we embed Jinja code into the YAML scripts to allow us to do more complicated tasks like evaluate the value of a sensor and depending on the result execute a different scripts or instructions.

Python: A very popular programming language known for its ease of understanding and ubiquitous support on many operating systems. Of all the different programming languages I have used in my lfe, Python is, to me at least, the most approachable and flexible language. You don’t really need to know Python for Home Assistant, but as you get deeper down the rabbit hole, you will need it more.

MQTT, REST : MQTT and rest are what I would call communication enablers. It the IOT world, different devices need a way to communicate with each other even though they are often in different manufacturer ecosystems. MQTT and REST are two well supported protocols that support this communication and both of them support secure communication also.

Webservers & SSL security : Home assistant can run on various hardware and you don’t need to know much about setting up a webserver to access the home assistant front end, but to secure your webserver from bad actors, you will need to learn about SSL encryption and how to manage it on your devices. However, its not as complicated as some of the website I visited explain it to be. That’s probably because I wanted to understand the precise data flows between server and client, but trust me you don’t need to worry about this. Just know that SSL encryption is currently one of the best methods of implementing privacy between two devices right now and trust it to do its job.

Time series databases: My old friend Wikipedia defines time series database (TSDB) is a software system that is optimized for handling time series data, arrays of numbers indexed by time (a datetime or a datetime range).  Home assistant needs a database if you want to store or profile the behaviour of devices over an extended period of time. I use a database call InfluxDB, which has the advantage of being fast and more then capable of running on a low power computer like a raspberry Pi.