2

I try to install Home Assistant using docker compose . the compose file has 4 containers:

  • home assistant
  • mosquitto
  • zigbee2Mqtt
  • node-red

in order to use zigbee i have a sonof zigbee 3 plus model e dongel.

i use docker desktop over wsl2 with Alpine distribution.

i use usbipd for windows in order to share the usb device with the wsl environment.

when i start the containers, home assistant recognize the device and installs an integration, zigbe2mqtt howerver fails to start and outputs the following error:

Zigbee2MQTT:error 2022-09-11 19:24:38: Error: Error while opening serialport 'Error: Error: Not a tty setting custom baud rate of 115200' at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28) at SerialPort._error (/app/node_modules/@serialport/stream/lib/index.js:198:14) at /app/node_modules/@serialport/stream/lib/index.js:242:12

now i tried to change baud rate in the zigbee configuration file based on their comments to 38400 and to 57600 but those gave the same error.

i would really appreciate if someone knows what the problem is and how to solve it.

the compose file:

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - "c:/temp/homeAsistant/homeAsistantConfig:/config"
      # - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    ports:
      - "8123:8123"
    devices:
      - "/dev/bus/usb/001/002:/dev/bus/usb/001/002"
    # network_mode: host

  node-red:
    container_name: node-red
    image: nodered/node-red:latest
    environment:
      - TZ=Europe/Amsterdam
    ports:
      - "1880:1880"
    # networks:
    #   - node-red-net
    volumes:
      - "c:/temp/homeAsistant/nodeRed:/data"

  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto
    volumes:
      - "c:/temp/homeAsistant/mosqitto:/mosquitto/"
    ports:
      - 1883:1883
      - 9001:9001
    devices:
      - "/dev/bus/usb/001/002:/dev/bus/usb/001/002"

  zigbee2mqtt:
      container_name: zigbee2mqtt
      # restart: unless-stopped
      image: koenkk/zigbee2mqtt
      volumes:
        - "c:/temp/homeAsistant/zigbee2mqtt:/app/data"
        - "/run/udev:/run/udev:ro"
      ports:
        - 8080:8080
      environment:
        - TZ=Europe/Amsterdam
      devices:
        - "/dev/bus/usb/001/002:/dev/bus/usb/001/002"

the zigbee configuration file (reside inside c:/temp/homeAsistant/zigbee2mqtt)

permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://mqtt
serial:
  port: /dev/bus/usb/001/002
# Optional: Baud rate speed for serial port, this can be anything firmware support but default is 115200 for Z-Stack and EZSP, 38400 for Deconz, however note that some EZSP firmware need 57600.
  baudrate: 115200
frontend:
  port: 8080
advanced:
  network_key:***
Gabriel H
  • 1,558
  • 2
  • 14
  • 35

0 Answers0