Arn van der Pluijm - Civic Tech Prototyping
domotica home assistant home automation My Sensors

DIY Home Automation – Iteration 1


29 apr 2019

Screenshot 2019-04-29 at 16.13.17

During the Odyssey Hackathon in Groningen 2 weeks ago I spoke to a lot of awesome people. One of them was a great guy from Ukrain, who showed me his home automation setup using My Sensors and Home Assistant. He was able to control and monitor everything in his home. It looked very nice, and the best part was that it was all open source and he was in full control.

Home automation was already on my list of thing to do for a couple of years, but up to now I did not make the time to start working on it. Now the time is there! I will document my developments here. In the first place as a reference for myself, but it could also be helpful to others.

The total setup is quite complex and consists of a lot of different elements and decisions. The first thing to do is to set up Home Assistant:

Awaken your home

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Open source, local control, privacy first on a Raspberry Pi! That’s exactly what we need. Of course there are alternatives (Domoticz seems popular), but to keep it simple I stick to the recommendation of the Ukrain home automation pro.

In my case, I have a couple of Raspberry Pi Zero W’s laying around, that I use to create prototypes. The Pi0 is not recommended for everyday use by Home Assistant, but it is possible to set it up. To speed up the process, and to keep costs low, I start with a Raspberry Pi 0W. It is always possible to upgrade to a regular Pi at a later stage.


Even though Home Assistant seems very simple to set up. Finding the right installation was actually quite challenging. I had to try different images and scripts before I got it up and running. There are 4 main ways to install: docker, hassbian, hassio and venv. To be honest, it is still not clear to me what the exact differences are. My choice (and the one that I got working) was hassbian.

The image I used was ‘v.1.5.0 Autumn bump‘ using this installation manual: Installing Hassbian.

Once you find the right image and tutorial it is really easy. Download the image, put it on the SD-card using Etcher, add wpa_supplicant wifi settings and power up the Raspberry. In my case I had to issue the command

sudo systemctl start install_homeassistant.service

It takes quite a while to install everything on the pi0, I used the ‘sudo top’ command to check how the installation was doing. It took about 1 hour until the python installation was finished (99% cpu). Going to the webpage gave me the Home Assistant login page!

Home Assistant History overview after 1 day.

In my case, my house is still very dumb. There are not a lot of active connected devices. It was nice to see that the Google Cast was recognised. Also the internet router is connected. It seems to work properly, and it looks very promising. Time to attach some smart stuff!

Result and next step

This is the end of part 1: Installing Home Assistant on a Raspberry Pi 0W. Now it is time to add some smart objects to this system. For this we need the second component: My Sensors. With this system it is possible to connect multiple sensors and send all data to the Home Assistant Gateway, using the My Sensors Gateway. This can become quite confusing, so that will be the content for part 2 of this Home Automation series.

Laat een reactie achter