Setting up NodeRED on a Raspberry Pi.
- Install NodeRED from the script.
- Install Mosquitto MQTT broker.
sudo apt install mosquitto mosquitto-clients
- run
sudo systemctl enable mosquitto.service
to enable the service - edit
/etc/mosquitto/mosquitto.conf
- add the following to lines to the bottom of the file
listener 1883
allow_anonymous true
- restart the broker
sudo systemctl restart mosquitto
- run
sudo mosquitto_passwd -c /etc/mosquitto/passwd YOUR_USERNAME
- edit
/etc/mosquitto/mosquitto.conf
- remove the previous two added lines
- add
per_listener_settings true
to the top of the file - add to bottom of the file
allow_anonymous false
listener 1883
password_file /etc/mosquitto/passwd
- restart the broker
sudo systemctl restart mosquitto
- Install zigbee2mqtt
- You can follow the install guide here.
- It may be a good idea to follow the instruction for disabling file log output.
- Once installed, install node-red-contrib-zigbee2mqtt
Now that you've got the basics setup, it's time to configure NodeRED.
- Add a Zigbee2mqtt Bridge item, and configure the details you setup for your mqtt broker.
- Pair any devices in the Zigbee2mqtt frontend. By default, it runs on port 8080 on localhost.