Home Automation
I’ve had some basic home automation stuff running on auto-pilot for a few years now and decided to spend some time researching what’s new. My old setup utilized OpenHAB to do some simple things like turning lights on/off when motion was detected and forwarding messages from my ZWave devices to MQTT. When OpenHAB stopped working one day, I decided to make the switch to Home Assistant.
OpenHAB and Home Assistant are similar in the features they provide but I find Home Assistant easier to configure and also prefer its UI over the OpenHAB UI. I’ve only had Home Assistant running for a short time but so far, I like it.
I don’t realy have a lot of automation going on. It’s mostly monitoring sensors and displaying data on either a Home Assistant dashboard sending messages to MQTT to the Node-Red dashboard. In the future I’ll probably add some more automation.
MQTT
If you want to make the most of home automation, you really should look into using MQTT. MQTT provides a platform neutral method of passing messages between devices. It lightweight, simple, and incredibly useful. I have sensors that publish to MQTT and then use Node-Red and Home Assistant subscribe to specific MQTT topics to display sensor values or change the stat of devices.
I have Home Assistant setup to publish events/data from my ZWave devices to MQTT where it is then processed by Node-Red. An example of this is sending data from my ZWave thermostat to Node-Red where it is then stored in a MySQL database.
I have the Mosquito MQTT broker running on a Linux virtual machine to collect sensor data which is then sent to Node Red where it is then stored in a MySql database.
Node-Red
Node-Red is a great platform that is used to perform actions as sensor data is received. One of the main things I do in Node-Red is to send my sensor data to a MySQL database for long-term storage. I’m not sure what I’m going to do with all of the sensor data, but I have a database server and figured, why not save it all.
I also use Node-Red to provide a simple dashboard setup that I connect to from a RasPi based control panel that I have on the nightstand next to my bed.
Home Assistant
The newest part of my home automation setup is Home Assistant. This is a great piece of software that allows you to connect many different types of devices using add-ons and integrations. I have Home Assistant running on a Raspberry Pi3 at this time.
I use Home Assistant to control my ZWave devices, WiFi thermostat, Hue lights, and to do some basic automations such as turning a light on when a motion sensor is triggered. Home Assistant also serves as a bridge between my ZWave and Wifi IoT devices publishing all state changes to the MQTT broker so that Node-Red can process the messages.
Sensors and IoT Devices
I have a variety of types of IoT devices running on my network.
- Custom made sensors that use ESP8266 micro-controllers
- Sonoff devices flashed with Tasmota firmware
- ZWave thermostat for heating
- WiFi thermostat for cooling
- Phillips Hue hub for lighting control
All of these devices are running on my home WiFi network and, depending on the device, are connected to either Home Assistant or MQTT.
Putting it all Together
So, with all of the above bits of hardware and software setup and added to the network, I have a home automation system that looks like the diagram below.

I’ve had this running for about a year now and it works well. I have a few more Sonoff devices that I’ll probably add at some point in the future.
I’ve setup a basic dashboard using Home Assistant to display the various sensors and provide a way to control lights. Nothing fancy but it gets the job done.