Setting up a Home Assistant hub on a Raspberry Pi

I recently started connecting bits of my hacked together home automation system to Apple’s homekit service using a project called homebridge. While I loved being able to ask Siri to turn my lights on and off and control the colours of my “hue strip”, I felt like the homekit devices and the iOS 10’s new “Home” app lacked in the customizability department. It turned my iPhone into a glorified, albeit very capable, universal remote control for my smart devices and provided little room to automate anything. In either case, my appetite had now been whet, and I was curious to see what else was out there and how well they performed against, and in cooperation with, the homekit system.

First, start off with a clean install of Raspbian Jessie. There’s a great bit of aptly named software called PiBakery that will allow you to customize your Raspbian install with a few options. It lets you punch in your wifi information before setting up your SD card for you so you can be up and headless on your wifi network in a few minutes. Once installed, make sure to run an update and upgrade to make sure everything is up to date and ready to go. The first step is to make sure to install python 3.5 as Home Assistant requires it. Let’s start off by installing all the required dependencies.

sudo apt-get install build-essential libncursesw5-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev libbz2-dev -y

At the time of writing this, the latest version of python available as a stable release is 3.5.2. You should be able to find a link for the latest version of python from here. Then run the following code (replacing the link for whichever version of python you’d like).

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
tar -xzvf Python-3.5.2.tgz
cd Python-3.5.2
./configure && make && sudo make install

The latest supported version of Home Assistant is available on pip3 and can be installed with a simple:

pip3 install homeassistant

and can be started with:

hass –open-ui

This will start and instance of home assistant as well as starting the a local webserver that will host a web interface for home assitant at http://localhost:8123.

That’s all it takes to get a Home Assistant hub running on a Raspberry Pi! I’ll post a few more guides I start transferring my smart devices over to the Home Assistant hub from my Homebridge hub. I’m looking forward to testing out what Home Assistant has to offer.

Leave a Reply