Skip to content

Install Zigbee2mqtt Openhabian

zigbee2mqtt

Install NodeJS

sudo apt-get install -y nodejs git make g++ gcc

Download and install Zigbee2mqtt.

sudo git clone https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqttsudo 

Set permissions.

sudo chown -R openhabian:openhabian /opt/zigbee2mqtt

Install dependencies.

cd /opt/zigbee2mqtt
npm ci --production

OpenHabian autostart Zigbee2mqtt

sudo nano /etc/systemd/system/zigbee2mqtt.service

Add the following

[Unit]
Description=zigbee2mqtt
After=network.target

[Service]
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit
StandardError=inherit
Restart=always
User=openhabian

[Install]
WantedBy=multi-user.target

Start the Zigbee2Mqtt service.

sudo systemctl start zigbee2mqtt

Verify that it works

systemctl status zigbee2mqtt.service

Leave a Reply