Getting started with Home Assistant

Kuamka HQ is in an old Victorian house in the UK. One challenge with old houses is controlling heating and humidity levels in the building. We have recently installed a “positive input ventilation” system to try and reduce humidity in the house and prevent condensation forming on the windows. This seems to be working quite well, however being hackers we also wanted to collect some data to see what was really happening.

The starting point was to get some sensors. We ordered a Sonoff ZBBridge and 8 SNZB-02 temperature and humidity sensors.

Sonoff sensors

Using Zigbee sensors allows us to put them wherever we like without worrying about power (they should run for months off a small “button” cell battery).

The sensors are great, however the problem is that the Sonoff “eWeLink” software is very limited - you can see the temperature and humidity, however you can’t graph that information or use it with non-Sonoff devices. This is where Home Assistant comes in. Home Assistant is available as a Docker image, we pulled that and started it on one of our Macs. To integrate with the Sonoff devices as they are, we can use the SonoffLAN custom Home Assistant component to talk to the Sonoff server. After a little bit of tinkering, we have live information and graphing from our sensors.

Home Assistant

We use a Nest thermostat to control our heating. This also has humidity and temperature sensors - we don’t really want to have two sensors next to each other measuring the same thing, so we can also integrate the Nest sensors (and thermostat control) into Home Assistant. This was actually quite complex - you have to set up the “Smart Device Management” API and Google’s Cloud Pubsub to get a feed of data into Home Assistant. Once this is done however, it works perfectly and we can report the sensor data from the Nest alongside our other sensors in a seamless way.

Finally we also want to know the outside temperature and humidity. Instead of using a sensor for this, we instead use the Met Office integration to get data from the local Met Office weather station (which will be much more accurate than any sensor we would purchase).

We now have monitoring and some basic data logging to show the humidity and temperature changes in the house.