ZigBeeForDomoticZ plugin Wiki

ZigBeeForDomoticZ plugin installation

Requirements

stable9 (version 9.1.xxx) is the current production branch of the plugin, and the one this page installs.

Several instances of the plugin on Python 3.11: with Domoticz 2026.x and Python 3.11 (for example Debian/Raspberry Pi OS Bookworm), the second instance of the plugin fails to start because of a Python 3.11 problem (domoticz/domoticz#6763). If you need more than one coordinator, use Python 3.12 or newer.

You are on an older branch (stable8 or below)? Don’t reinstall: follow Upgrading from stable8 to stable9.

Installation methods

PiZigate installation (Raspbian and Fedora) has moved to Legacy - PiZigate installation: ZiGate coordinators are no longer supported.


1 - Manual installation on Linux

This method is valid for Linux: Raspberry Pi OS, Debian, Ubuntu, etc. Adapt the command lines to your system.

1.A - Prerequisites

The examples below assume:

1.B - Find the Python version used by Domoticz

If you have several Python 3 versions installed, the Python modules must be installed for the one Domoticz uses. Look for this line in the Domoticz log:

Status: PluginSystem: Started, Python version '3.13.5', 12 plugin definitions loaded.

See What is the python version running under Domoticz for details.

1.C - Procedure

  1. Go to the plugins folder of Domoticz:

    cd /home/pi/domoticz/plugins/
    
  2. Get the plugin (stable9 branch):

    git clone -b stable9 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
    

    The folder Domoticz-Zigbee is created in the plugins folder.

  3. Create the Python virtual environment for Domoticz, if you don’t have one yet (use python3.xx instead of python3 if Domoticz runs another version than your default python3):

    cd /home/pi
    python3 -m venv Domoticz_Python_Environment
    source Domoticz_Python_Environment/bin/activate
    pip install --upgrade pip
    
  4. Install the Python modules required by the plugin, inside the virtual environment:

    source /home/pi/Domoticz_Python_Environment/bin/activate
    cd /home/pi/domoticz/plugins/Domoticz-Zigbee
    python3 -m pip install -r requirements.txt --upgrade
    
  5. Make Domoticz start with this virtual environment (VIRTUAL_ENV and PATH in the systemd service or in domoticz.sh). This is a one-time setup, described in Using Python Virtual Environment.

  6. Give the plugin files to the user running Domoticz (adapt pi:pi to your user:group; mind the dot at the end) and make plugin.py executable:

    sudo chown -R pi:pi .
    chmod +x plugin.py
    
  7. Restart Domoticz:

    sudo systemctl restart domoticz
    

    (or sudo service domoticz.sh restart if you still use the old init script).

The ZigBee for DomoticZ plugin appears in the hardware list (at the very bottom of the Type list). Move on to step 2 Plugin settings.


2 - Installation on Docker

These steps use the official domoticz/domoticz image. It already comes with a Python virtual environment (VIRTUAL_ENV is set in the container), so there is no venv to configure. Everything the plugin needs lives in the Domoticz userdata folder, which must be a volume mapped to the host so the plugin survives container updates.

For a complete step-by-step example on a Raspberry Pi, see How to install Zigbee4Domoticz on a Docker based setup.

2.A - Get the plugin

From the host, in the folder mapped to /opt/domoticz/userdata:

cd userdata/plugins
git clone -b stable9 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git

2.B - Install the Python modules

The modules are installed inside the container, and must be installed again whenever the container is recreated from a new image. Choose one of these options:

2.C - Coordinator and WebUI port

Restart the container. The ZigBee for DomoticZ plugin appears in the hardware list (at the very bottom of the Type list). Move on to step 2 Plugin settings.


3 - Installation on a Synology NAS (Docker)

On a Synology NAS, run Domoticz in Docker (Container Manager). The old native Domoticz package for Synology (from Jadahl) stopped in 2020 and doesn’t work on DSM 7.

3.A - Prerequisites

Domoticz must be installed in a Docker container, with a domoticz folder mapped to /opt/domoticz/userdata, and the USB drivers of your coordinator loaded. Follow Installation with Docker on Synology first.

3.B - Install the plugin

There are two ways to install the plugin and its Python modules. In both cases, open a terminal in the container first:

Terminal

3.B.1 - With the custom start script

The customstart.sh script is run by Domoticz each time the container starts; on the first start of a new container it installs the Python modules of the plugin.

cd /opt/domoticz/userdata/plugins
git clone -b stable9 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
cp Domoticz-Zigbee/Tools/customstart.sh /opt/domoticz/userdata/customstart.sh

Then restart the container.

3.B.2 - Manually

cd /opt/domoticz/userdata/plugins
git clone -b stable9 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
cd Domoticz-Zigbee
python3 -m pip install -r requirements.txt --upgrade

With this method, run the pip install again each time the container is recreated (for example after a Domoticz image update).

3.C - WebUI port

Stop the container, click Edit and go to the Port Settings tab. Add the plugin WebUI port (9440 by default):

Port WebUI

Start the container. The ZigBee for DomoticZ plugin appears in the hardware list (at the very bottom of the Type list). Move on to step 2 Plugin settings.


4 - Installation on Windows

Windows is not officially supported: the plugin is developed and tested on Linux, and we cannot test on Windows. These notes come from users who run it; feedback is welcome on the forum.

4.A - Domoticz

4.B - Coordinator

Install the USB-serial driver of your coordinator (for example Silicon Labs CP210x or WCH CH9102/CH343, depending on the model) and note the COM port it gets in the Device Manager.

4.C - Python and Git

4.D - Plugin

The ZigBee for DomoticZ plugin appears in the hardware list (at the very bottom of the Type list). Move on to step 2 Plugin settings.


5 - Installation on OpenWRT

Community procedure, not tested by the plugin maintainers.

  1. Install Domoticz, Python and the USB serial drivers with opkg:

    opkg update
    opkg install domoticz python3 python3-pip python3-dev git-http kmod-usb-serial kmod-usb-serial-cp210x shadow-usermod curl
    

    Some modules of requirements.txt need to be compiled; OpenWRT also provides prebuilt python3-* packages (for example python3-aiohttp, python3-cryptodome) that you can install with opkg first.

  2. The opkg Domoticz package uses its own paths:

    cd /etc/domoticz/plugins
    git clone -b stable9 https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
    cd Domoticz-Zigbee
    python3 -m pip install -r requirements.txt
    chmod +x plugin.py
    
  3. Domoticz runs as the domoticz user and group. Give it access to the plugin and to the serial port:

    chown -R domoticz:domoticz /etc/domoticz/plugins/Domoticz-Zigbee
    usermod -a -G dialout domoticz
    
  4. Restart Domoticz:

    service domoticz restart
    
  5. Check that your Zigbee USB dongle is detected:

    lsusb
    dmesg | grep ttyUSB
    

6 - Python Plugin Manager

Not maintained by the plugin team. If you use pp-manager, search for the “Zigbee for domoticz Plugin” entry. You still have to install the Python modules (requirements.txt) as in the manual installation, and make sure you get the stable9 branch.