Skip to main content

Zigbee2MQTT Setup with SLZB-06 and Home Assistant Integration

Zigbee2MQTT Setup with SLZB-06 and Home Assistant Integration

Overview

This guide describes the complete installation of Zigbee2MQTT on a Proxmox CT with SLZB-06 coordinator and integration into Home Assistant via MQTT.

Hardware

  • SLZB-06 Zigbee Coordinator (PoE powered)
  • Proxmox CT (Ubuntu 22.04/24.04) for Zigbee2MQTT
  • Home Assistant (separate server/VM)

System Architecture

SLZB-06 (<SLZB06_IP>:6638) 
    ↓ TCP
Zigbee2MQTT (Proxmox CT: <CT_IP>)
    ↓ MQTT (localhost:1883)
Mosquitto Broker (same CT)
    ↓ MQTT (<CT_IP>:1883)  
Home Assistant (different server)

1. Create Proxmox CT

Container Configuration:

  • Template: Ubuntu 22.04 or 24.04
  • CPU: 1 Core
  • RAM: 512MB (max 1GB)
  • Storage: 8GB
  • Network: Bridge to LAN
  • Privileged: No (unprivileged)
  • Start at boot: Yes

2. Configure SLZB-06

Access Web Interface:

http://<SLZB06_IP>

Important Settings to Check:

  • Zigbee Mode: Coordinator
  • TCP Port: 6638 (enabled)
  • Adapter: zstack
  • Baudrate: 115200

3. Zigbee2MQTT Installation

Prepare System

# Update system
apt update && apt upgrade -y
# Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs git
# Install pnpm
sudo npm install -g pnpm
# Check version
node --version  # Should be v20+

Install Zigbee2MQTT

# Create directory
sudo mkdir /opt/zigbee2mqtt
sudo chown $USER:$USER /opt/zigbee2mqtt
# Clone repository
cd /opt/zigbee2mqtt
git clone https://github.com/Koenkk/zigbee2mqtt.git .
# Install dependencies
npm install

Create Configuration

nano /opt/zigbee2mqtt/data/configuration.yaml

Configuration File:

homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://localhost'
serial:
  port: tcp://<SLZB06_IP>:6638
  adapter: zstack
frontend:
  port: 8080
  host: 0.0.0.0
advanced:
  log_level: info
  pan_id: 6754
  channel: 11

4. MQTT Broker (Mosquitto) Installation

Install Mosquitto

sudo apt update
sudo apt install mosquitto mosquitto-clients

Configure Mosquitto

# Create configuration file
sudo nano /etc/mosquitto/mosquitto.conf

Mosquitto Configuration:

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

# IMPORTANT: Allow external connections (for HA)
listener 1883 0.0.0.0

# WARNING: For testing only! Use password in production
allow_anonymous true

Create Log Directory

sudo mkdir -p /var/log/mosquitto
sudo chown mosquitto:mosquitto /var/log/mosquitto

Enable Services

# Enable and start Mosquitto
sudo systemctl enable mosquitto
sudo systemctl start mosquitto
# Open firewall port
sudo ufw allow 1883/tcp

5. Setup Zigbee2MQTT as Service

Create Service File

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

Service Configuration:

[Unit]
Description=zigbee2mqtt
After=network.target

[Service]
ExecStart=/usr/bin/node index.js
WorkingDirectory=/opt/zigbee2mqtt
StandardOutput=inherit
StandardError=inherit
Restart=always
User=<username>
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

Enable Service

sudo systemctl daemon-reload
sudo systemctl enable zigbee2mqtt
sudo systemctl start zigbee2mqtt

6. Home Assistant Integration

MQTT Integration via UI

  1. Home Assistant → SettingsDevices & Services
  2. Add IntegrationMQTT
  3. Configuration:
    • Broker: <CT_IP>
    • Port: 1883
    • Username: (empty - testing only!)
    • Password: (empty - testing only!)
    • Enable discovery:

configuration.yaml remains unchanged

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.26.0.0/16
    - 172.18.0.0/16
    - 172.17.0.0/16
    - 127.0.0.1
    - ::1

7. Testing and Troubleshooting

Check Services

# Zigbee2MQTT status
sudo systemctl status zigbee2mqtt
sudo journalctl -f -u zigbee2mqtt
# Mosquitto status
sudo systemctl status mosquitto
sudo journalctl -f -u mosquitto

Test Connection

# Test MQTT broker
mosquitto_pub -h localhost -t "test/topic" -m "hello"
mosquitto_sub -h localhost -t "test/topic" -v
# Test external connection (from HA server)
telnet <CT_IP> 1883

Access Frontend

# Zigbee2MQTT Frontend
http://<CT_IP>:8080

8. Add Zigbee Devices

  1. Open Frontend: http://<CT_IP>:8080
  2. Enable Permit Join (button in frontend)
  3. Put Device in Pairing Mode (usually hold button 5-10s)
  4. Wait until device appears (30-60 seconds)
  5. Disable Permit Join (security)

9. IP Addresses and Ports (Example)

Component IP/URL Port Purpose
SLZB-06 <SLZB06_IP> 6638 Zigbee Coordinator
Zigbee2MQTT CT <CT_IP> 8080 Frontend
Mosquitto <CT_IP> 1883 MQTT Broker
Home Assistant <HA_IP> - MQTT Client

Example IPs:

  • CT_IP: e.g. 192.168.1.100
  • SLZB06_IP: e.g. 192.168.1.50
  • HA_IP: e.g. 192.168.1.200

10. Important Configuration Files

File Purpose
/opt/zigbee2mqtt/data/configuration.yaml Zigbee2MQTT main configuration
/etc/mosquitto/mosquitto.conf MQTT broker configuration
/etc/systemd/system/zigbee2mqtt.service Systemd service