MirrorNest
← すべてのガイド

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.

対象: Any Docker host with a USB Zigbee adapter attachedHome AutomationIoT公式ホームページ ↗公式ドキュメント ↗
このガイドは上記リンク先にあるZigbee2MQTT公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 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/
  2. 2Create a configuration.yaml

    mkdir -p zigbee2mqtt-data
    cat > 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 EOF

    Requires an MQTT broker (see the Mosquitto guide in this section) already running and reachable.

  3. 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/zigbee2mqtt
  4. 4Open 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