Home Data Logger Zigbee Sensor Upgrades

Published on Saturday 15 May 2021
Categories: Electronics | Home Automation | Programming and Code |

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 a MQTT server to share sensor data between our Home Assistant software and to 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 off 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.

 

Type

Manufacturer

Model

Door Sensor

Door / Window Sensor

Xiaomi / Aqara

MCCGQ11LM

Main Power Monitor

Main Power Monitor / Plug
Also functions as Zigbee repeater.

Samsung SmartThings

GP-WOU019BBDWG

Temperature and humidity sensor

Temperature and humidity sensor

Sonoff

SNZB-02

Temperature, humidity and pressure sensor

Temperature, humidity and pressure sensor

Xiaomi / Aqara

WSDCGQ11LM

Expanding the 1-Wire sensor setup

We previously had temperature sensors using 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

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

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

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

Home Assistant Docker Container – Local 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 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

Permalink


0 Comments



Leave a comment

About Me

Brian Dorey

Welcome to my blog, here you will find my projects and other things.
I make websites and manufacturer and sell expansion boards for the Raspberry Pi range of computers.

AB Electronics Raspberry Pi shop

Social Media

Popular Posts

Small image for Raspberry Pi Zero W external antenna mod

Raspberry Pi Zero W external antenna mod
04 MARCH 2017
94,250 views

Small image for Ford Sync 3 USB Drive Music Playlists

Ford Sync 3 USB Drive Music Playlists
22 OCTOBER 2016
64,565 views

Small image for Echo Dot 3rd Gen Smart speaker Teardown

Echo Dot 3rd Gen Smart speaker Teardown
21 JULY 2019
61,843 views

Small image for DIY Pick and Place V2 Project Complete

DIY Pick and Place V2 Project Complete
23 NOVEMBER 2013
37,191 views