← Tous les guides
Zigbee2MQTT
A free, open-source bridge that connects a USB Zigbee adapter to an MQTT broker -- lets Home Assistant/Node-RED control Zigbee smart-home devices without needing each vendor's own proprietary hub.
Système : Any Docker host with a USB Zigbee adapter attachedHome AutomationIoTSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de Zigbee2MQTT, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
1Identify your Zigbee USB adapter's device path
Use the stable /dev/serial/by-id/... path rather than /dev/ttyUSB0 -- the latter can shift to a different number after a reboot if you have more than one USB serial device.
ls /dev/serial/by-id/2Create a configuration.yaml
mkdir -p zigbee2mqtt-datacat > zigbee2mqtt-data/configuration.yaml <<'EOF' mqtt: base_topic: zigbee2mqtt server: mqtt://<your-mosquitto-server-ip>:1883 serial: port: /dev/serial/by-id/your-adapter-path-here frontend: port: 8080 EOFRequires an MQTT broker (see the Mosquitto guide in this section) already running and reachable.
3Run the container
docker run -d \ --name zigbee2mqtt \ --restart unless-stopped \ -v "$(pwd)/zigbee2mqtt-data:/app/data" \ -v /run/udev:/run/udev:ro \ --device=/dev/serial/by-id/your-adapter-path-here \ -p 8080:8080 \ koenkk/zigbee2mqtt4Open the frontend and pair a device
Click "Permit join" and put your Zigbee device into pairing mode (varies by device/brand) -- it should appear in the device list within a few seconds.
http://<the-server's-ip>:8080