A ready-to-use Node-RED setup for home automation, heavily inspired by c't-Smart-Home. It includes Node-RED, MQTT (provided by Eclipse Mosquitto), Zigbee-Support (provided by zigbee2mqtt).
c't-Smart-Home added Node-RED-Nodes for HomeKit, FritzBox, Tado, Bluetooth-LE-Support, Zigbee2Mqtt-Support and a Dashboard.
Since I need Harmony as well and Harmony Nodes cannot be installed via the palette without having python
, make
, cc
installed, I started to build my own Docker image
based on the work for c't-Smart-Home.
To get this going you need a working Docker 18.02.0+ setup and docker-compose.
This setup will run on any AMD64 or ARM32v7 Linux machine. This includes virtually any PC or a Raspberry Pi 3 or newer. We also build containers for ARM64v8, ARM32v6 but they are untested. If you want to run the containers on macOS, try running start.sh
as root.
If you want to control Zigbee devices you also will need a Zigbee controller stick. Have a look at Zigbee2MQTT's documentation for that.
-
cd
into the folder containing this repos files -
Run
./start.sh start
to setup the data folder needed to run the containers and start them up.
Note: The Zigbee2mqtt container will only start if a Zigbee-Controller is connected. Make sure to update the adapter to the newest firmware!
Backup the./data
folder regularly, as it contains all your data and configuration files -
When you've got "the hang of it" follow the steps listed in the Security section to get a properly secured setup.
You should make a backup of all files in the ./data
folder. If you made changes to files outside of ./data
it is imperative to backup those too.
An update via start.sh update
will pull the latest release of this repository. This will work for most use cases.
If you made changes to files provided in the repository, you'll have to undo those changes and reapply them. If you're familiar with git
use git stash
and git stash apply
. If you want a specially customized version of this repo, think about forking it.
If you manually downloaded the files from the release tab, you'll have to do the update manually. This takes three steps:
-
Backup your installation
-
Run
docker-compose down --remove-orphans
-
Download the new release and overwrite the files in your installation. Or even better: switch to a cloned repository.
-
Run
./start.sh start
To change configuration of the provided services, either use the corresponding web interfaces or have a look in the ./data
folder. There you'll find all the necessary configurations to modify your setup.
After starting the containers you'll reach Node-RED http://docker-host:1880 and the Zigbee administrative interface at http://docker-host:1881. Mosquitto is available on Port 1883 (and 9001 for websockets). You can see more details of the processes output in the container logs with the command docker-compose logs
.
setup script
—————————————————————————————
Usage:
start.sh update – to update this copy of the repo
start.sh start – run all containers
start.sh stop – stop all containers
start.sh build - build docker image
start.sh data – set up the data folder needed for the containers, but run none of them. Useful for personalized setups.
- run
./start.sh data
to create the necessary folders - Use
docker-compose up -d
to start the containers - If you do not want to start Zigbee2mqtt, add the name of the Node-RED container to the docker-compose command:
docker-compose up -d nodered
. The MQTT container will always be started, because it's a dependency of Node-RED.