NAS Synology zigbee docker-compose

Hey, I found only basic configuration to achieve this, but there is much more work to do. I want to make from this topic full configuration for NAS Synology and zigbee.

What I have learned so far:

  • Docker installation work, but has no “Supervisor” so it is not useful, because I can’t install add-ons, which are necessary to run zigbee. The only one way then is to use docker-compose.

My current configration:

version: '3'
services:
  homeassistant:
    image: homeassistant/home-assistant:stable
    environment:
      - TZ=Europe/Warsaw
    volumes:
      - ../home-assistant/config:/config
    devices:
      - /dev/bus/usb/003/003:/zwaveusbstick
    restart: unless-stopped
    network_mode: host
  eclipse-mosquitto:
    image: eclipse-mosquitto:latest
    volumes:
      - ../mqtt/config:/mosquitto/config/
      - ../mqtt/data:/mosquitto/data
      - ../mqtt/log:/mosquitto/log
    restart: unless-stopped
    network_mode: host
  nodered:
    image: nodered/node-red
    volumes:
      - ../node-red:/data
    restart: unless-stopped
    network_mode: host

What I have to figure out:

  • I have very strange path to USB adapter /dev/bus/usb/003/003 hmm. There is no /dev/serials folder. /dev/tty* don’t look helpful too.
  • MQQT and node-red don’t start, because of luck of configuration files. Can you share this things with me?
  • Do I need more docker images to make it work? More configurations?

Is there any FULL ready docker-compose with configurations to run home-assistant with zigbee? It should be! :slight_smile: Can someone share everything? :slight_smile:

1 Like

My configuration which work. It should save you 95% of time to set this up.

First of all you have to install drivers for your stick. In my case http://www.jadahl.com/drivers_6.2/ for slaesh’s CC2652RB stick. Without this NAS Synology will not make /dev/ttyUSB0.

version: '3'
services:
  homeassistant:
    image: homeassistant/home-assistant:stable
    environment:
      - TZ=Europe/Warsaw
    volumes:
      - ./home-assistant/config:/config
    restart: unless-stopped
    network_mode: host
  eclipse-mosquitto:
    image: eclipse-mosquitto:latest
    # volumes:
      # - ./mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
    restart: unless-stopped
    network_mode: host
  zigbee2mqtt:
    image: koenkk/zigbee2mqtt
    volumes:
      - ./zigbee2mqtt/data:/app/data
      - /run/udev:/run/udev:ro
    devices:
      - /dev/ttyUSB0:/dev/ttyACM0
    restart: unless-stopped
    network_mode: host
    environment:
      - TZ=Europe/Warsaw
  nodered:
    image: nodered/node-red
    # volumes:
      # - ./node-red:/data
    restart: unless-stopped
    network_mode: host

home-assistant/config/configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# https://github.com/vigonotion/hass-simpleicons
simpleicons: true

panel_iframe:
  nodered:
    title: 'Node-red'
    url: 'http://your-host:1880'
    icon: si:node-red

mqtt:
  broker: localhost
#   username:
#   password:
  discovery: true

# Text to speech
tts:
  - platform: google_translate

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

zigbee2mqtt/data/configuration.yaml

# https://www.zigbee2mqtt.io/information/configuration.html

homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://localhost'
serial:
  port: /dev/ttyACM0
devices: devices.yaml
groups: groups.yaml
advanced:
  log_output:
    - console
  network_key: '!secret network_key'

todo:

  • network_mode: host
    It is possible to turn this off, but it requires to set up mDNS and UPnP extra for homeassistant service. I don’t want to spend my time on this at that moment.