#Sonoff MG21, HA server in docker. Issue with starting otbr

1 messages · Page 1 of 1 (latest)

wispy thicket
#

Hey,

I have home assistant running in a docker stack and wanted to get thread working with it. I created another stack with ghcr.io/ownbee/hass-otbr-docker. But am having issues with getting it to work.

I have added the logs.

#

I have ofc flashed the lastest firmware

#
version: '3'
services:
  matter-server:
    container_name: matter-server
    image: ghcr.io/home-assistant-libs/python-matter-server:stable
    restart: unless-stopped
    security_opt:
      - apparmor=unconfined
    volumes:
      - /srv/docker/portainer/data/matter:/data
      - /run/dbus:/run/dbus:ro
    network_mode: host

  otbr:
    container_name: otbr
    image: ghcr.io/ownbee/hass-otbr-docker
    restart: unless-stopped
    privileged: true # don't change this !
    network_mode: host # don't change this !
    # cap_add:
    #   - SYS_ADMIN
    #   - NET_ADMIN
    environment:
      DEVICE: "/dev/ttyUSB1"
      BACKBONE_IF: enp3s0
      FLOW_CONTROL: 1
      FIREWALL: 1
      NAT64: 1
      BAUDRATE: 115200
      OTBR_REST_PORT: 8081
      OTBR_WEB_PORT: 7586
      # OTBR_WEB_INTERFACE: "0.0.0.0"
      AUTOFLASH_FIRMWARE: 0
      OTBR_LOG_LEVEL: error
    devices:
      - /dev/ttyUSB1:/dev/ttyUSB1
      - /dev/net/tun:/dev/net/tun
    volumes:
      - /srv/docker/portainer/data/otbr:/data/thread
    logging:
      driver: "json-file"
      options:
        max-file: "3"
        max-size: "1m" 

``` compose file
scarlet isle
#

Does /dev/ttyUSB1 correspond to the coordinator?

wispy thicket
scarlet isle
#

Can't tell much from that

wispy thicket
#

how would i be able to check?

scarlet isle
#

Use /dev/serial/by-id/xx

#

Find it in there, use that path

#

You more likely want /dev/ttyacmxx, but just the by-id path

wispy thicket
#

We got this

scarlet isle
#

Great. Use that

wispy thicket
#

for the device in the compose i assume

wheat beacon
wispy thicket
scarlet isle
#

Point is, you're giving it the wrong device

wispy thicket
scarlet isle
#

So, the same error

#

What did you change?

wispy thicket
#

any abvice?

wheat beacon
scarlet isle
#

oh, I guess I can see that. It's trying to escape the container

wispy thicket
#

any fixes? or a differnet way of doing it?

scarlet isle
#

This works fine for me:

  otbr:
    container_name: otbr
    image: ghcr.io/ownbee/hass-otbr-docker
    restart: unless-stopped
    privileged: true # don't change this !
    network_mode: host # don't change this !
    cap_add:
      - SYS_ADMIN
      - NET_ADMIN
    environment:
      DEVICE: "/dev/thread"
      BACKBONE_IF: enp1s0
      FLOW_CONTROL: 1
      FIREWALL: 1
      NAT64: 1
      BAUDRATE: 921600 #460800
      OTBR_REST_PORT: 8082
      OTBR_WEB_PORT: 7586
      AUTOFLASH_FIRMWARE: 1
      OTBR_WEB: 1
      THREAD_1_4: 1
    devices:
      - /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_640ce34f9514ed11a206bc8be054580b-if00-port0:/dev/thread
      - /dev/net/tun:/dev/net/tun
    volumes:
      - ./otbr_data:/var/lib/thread
wispy thicket
#
otbr:
    container_name: otbr
    image: ghcr.io/ownbee/hass-otbr-docker
    restart: unless-stopped
    privileged: true # don't change this !
    network_mode: host # don't change this !
    # cap_add:
    #   - SYS_ADMIN
    #   - NET_ADMIN
    environment:
      DEVICE: "/dev/thread"
      BACKBONE_IF: enp3s0
      FLOW_CONTROL: 0
      FIREWALL: 1
      NAT64: 1
      BAUDRATE: 115200
      OTBR_REST_PORT: 8081
      OTBR_WEB_PORT: 7586
      # OTBR_WEB_INTERFACE: "0.0.0.0"
      AUTOFLASH_FIRMWARE: 0
      OTBR_LOG_LEVEL: error
    devices:
      - /dev/serial/by-id/usb-SONOFF_SONOFF_Dongle_Lite_MG21_4e2b9aab43a2ef119ee2946661ce3355-if00-port0:/dev/thread
      - /dev/net/tun:/dev/net/tun
    volumes:
      - /srv/docker/portainer/data/otbr:/data/thread
    logging:
      driver: "json-file"
      options:
        max-file: "3"
        max-size: "1m" 

This is what i currently have

#

Sadlty still not working though

wispy thicket
#

got this issue fixed now. Its just stuck on "Checking connectivity to THread network OpenThread-bdoc" when trying to connect a device

honest iron