HowToDomoticzZigbeeMQTT - albertmon/smarthome GitHub Wiki
UNDER CONSTRUCTION
How to use Zigbee in Domoticz
See also: www.zigbee2mqtt.io
To connect Zigbee devices to Domoticz we need:
- Hardware to communicate with the Zigbee devices
- Software to communicate with the Zigbee communication hardware
- Software to communicate between the Zigbee software and Domoticz software
- Software to configure Domoticz to handle Zigbee devices
For the hardware (USB dongle) we chose CC2531, but other hardware is now recommended (see supported adapters)
For the communication between the dongle and MQTT we use zigbee2mqtt
For the communication between the zigbee2mqtt and Domoticz we use MosQuiTTo
To enable Domoticz to understand Zigbee we use the Domoticz plugin domoticz-zigbee2mqtt-plugin
For the installation and configuration we use docker-compose. This makes all installation activities easy and keeps your system clean.
The tasks to perform are:
- Flash the dongle (when the hardware needs it)
- Install docker-compose
- Install and configure MQTT (or use existing MQTT)
- Install and configure Zigbee2MQTT
- Install Domoticz Zigbee2MQTT plugin
- Configure Domoticz
Links
How To Domoticz Zigbee2MQTT : https://www.domoticz.com/wiki/Zigbee2MQTT
Firmware for CC2531 (zip-file) : CC2531_DEFAULT_20201127.zip
Flash the dongle
CC2531 on Raspberry
Steps:
- Create a working directory (zigbee-mqtt)
- Get the firmware and unzip
- Get and build the software to flash
- Flash the firmware
Commands:
mkdir zigbee-mqtt
cd zigbee-mqtt
wget "https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_Home_1.2/bin/default/CC2531_DEFAULT_20201127.zip"
unzip CC2531_DEFAULT_20201127.zip
git clone https://github.com/dashesy/cc-tool.git
cd cc-tool
./configure
make
sudo ./cc-tool -e -w ../CC2531ZNP-Prod.hex
Install docker-compose
The simplest way to install docker-compose (after installing docker) is by using pip (package installer for Python).
Make sure you have pip3 installed by running
pip3 --version
If this commands returns an error, you have to install pip3:
sudo apt update
sudo apt install python3-venv python3-pip
Install docker-compose:
sudo pip3 install docker-compose
Install and configure MQTT
Install and configure Zigbee2MQTT
A simple (my preferred) way of connecting Zigbee devices to Domoticz is using docker-compose
See InstallDocker