Home Assistant Header

It has been nine years since we installed our first Raspberry Pi solar data logger and we have been using the same 1-Wire DS18B20 temperature sensors to monitor the hot water system since. The data sent to our online logging website at home.briandorey.com/ has been added to over the years and we are now storing additional data on our Linux server in the house for use with Home Assistant.

In 2015 we added SRF Wireless temperature sensors and a custom controller and monitoring board. The wireless sensors were installed in each room and linked back to a USB receiver on the computer which returned serial data that was then decoded by a custom script and uploaded to the web server.

Over the past year, we have been experimenting with adding new sensors as the SRF USB dongle has an issue where it randomly disconnects and causes all the temperature sensors to fail. The only way to restore the sensors would be to unplug the USB dongle, reconnect and then restart the data logger script.

Move to Zigbee sensors

With the many low-cost Zigbee sensors appearing on the market for smart homes, we decided to try to migrate our old wireless sensors to Zigbee sensors in each room around the house and use an MQTT server to share sensor data between our Home Assistant software and our home data logger website.

Most Zigbee sensors use their own receivers and gateways so you are limited to a single manufacturer and mobile applications unless you have a universal gateway device. I found a platform-independent universal Zigbee gateway called a ConBee II which connects via USB to the host computer.

I wrote a blog post last November on our experiments with Zigbee door sensors and since this time we have purchased additional sensors to use around the house.

Zigbee2Mqqt Screen

Initially, we ran Home Assistant on a spare Raspberry Pi computer using the Hassos release but after a couple of SD card failures, we decided to migrate everything to our low-power Linux home server and run the software in Docker containers.

New Zigbee Sensors

We have added the following Zigbee-based sensors to the house to replace the older SRF wireless modules and to expand the smart home functionality.

Expanding the 1-Wire sensor setup

We previously had temperature sensors using the Maxim Integrated DS18B20+ setup on our hot water cylinder and solar thermal system. We added new 1-wire temperature sensors into our loft, bathroom, network cupboard and one upstairs bedroom.

In the loft, we added a DS2413 1-Wire Dual Channel Addressable Switch to our solar thermal hot water pump to monitor the amount of time the pump is active.

Using the ls command for the /mnt/1wire directory returns all attached devices as shown below.

LS Command Output

We are using a custom application written in C which captures the sensor data via OWFS (One Wire File System) and this is sent to the MQTT server.

New software setup

Home Assistant
portainer
zigbee2mqtt screenshot

We have the following software packages installed on our Linux server.

MQTT Broker / Server - Eclipse Mosquitto installed on the primary operating system mosquitto.org

Docker Management – Portainer is an open-source tool for managing containerized applications www.portainer.io

Home Assistant Docker Container – Locally hosted smart home application which communicates with sensors via the MQTT broker. www.home-assistant.io

Zigbee2mqtt Docker Container – This software interfaces between the ConBee II USB gateway and the MQTT server to capture sensor data and send it to the MQTT server to be used by other applications. www.zigbee2mqtt.io

Home Assistant setup

With all the new hardware and software setup, we configured Home Assistant to have new pages for each set of data and an overview page for the house and power consumption.

Home Page - Temperature data averaged from all rooms. Doors and Windows open status, energy usage from Electric and Gas meters, Hot water system temperatures, Garden temperatures and Network information with the number of Wi-Fi devices connected and firewall uptime via SNMP.

Overview

Doors and Windows Page – Status of the door and window sensors and the amount of time opened during each 24-hour period.

Indoor Temperature - Showing sensor data from temperature and humidity sensors inside the house for each room.

Indoor Sensors

Media Players - Control of our Sonos smart speakers.

Outdoor sensors and Weather - Using weather widget and data from our door Sonoff temperature sensor.

Battery Status – Displaying battery status for battery-powered sensors.

NAS Status – Data from our Synology Network Attached Storage drive and its UPS.

Nas Page

Electrical Usage – Data from our home energy logger showing real-time electric usage, the UPS on our Synology NAS, UPS on our network switch and living room TV via the Samsung SmartThings GP-WOU019BBDWG plug/repeater.

Nas Page

Floor Plan – Giving an overview of the house and temperature sensors for each location.

Floor plan