Using Home Assistant to control your home (and more)

If you’re looking for an home automation software, you will find a lot of projects. There is a huge interest in this area and a lot of developers working on different projects. Many focus on the visualisation. While it is important to have a good user interface, the main focus of an automation system should be it’s backend.
One project I really like is Home Assistant. It uses a very clean backend/frontend separation.You can easily add your own user interface by just using its web API. It is written in Python. That makes it easier for me to add missing functionalities.

An architecture based on Home assistant could look like this:

ha-architecture

KNX isn’t supported out-of-the box in the current Home Assistant release (June 2016). However, I already did some programming and will work on integrating it into the official Home Assistant release.

Install an MQTT broker on your Raspberry Pi

Not only for home automation purposes, a central MQTT broker can be a good system that connects sensors and control applications. MQTT has been designed especially to be very lightweight. Therefore, it will also work very well on a Raspberry Pi. Installing it is very simple:
sudo apt-get install -y mosquitto mosquitto-clients

Your Mosquitto server should be already running now. You can test this easily.
mosquitto_sub -h localhost -v -t test

This starts a MQTT subscriber waiting for incmoming messages on the “test” channel.

Now open a new connection to your Raspberry Pi and type the following:
mosquitto_pub -h localhost -t test -m "Hello world, Mosquitto"

The first process should now display the “Hello world” message.