Troubleshooting / Configuring ConBee Stick II in Home Assistant Docker with ZHA

Hi everyone,
I’m new to Home Assistant and struggeling with the troubleshooting.

For my situation:

  • I have Home Assistant running in the docker image (2021.5.1) and set up everything via docker-compose.
  • I am using the Conbee Stick II as Zigbee Gateway.
  • The docker container is running on an Intel NUC system on Ubuntu 20.20.
  • I also am planning to use several gateways (Zigbee, ZWave, EnOcean, HomeMatic) on this machine - they are not connecte yet, as I wanted to migrate from another machin running another home automation system step by step - starting with Zigbee as it is least relevant / least complex from my automations.

Here’s the relevant part of Home Assistant from my docker-compose.yml:

  homeassistant:
    container_name: homeassistant
    image: homeassistant/home-assistant:stable
    ports:
      - 8123:8123
    volumes:
      -  ${PWD}/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/udev:/run/udev:ro  # so that serial number vendor/product ids are known
    devices:
#      - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00:/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00
#      - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00:/dev/ttyACM0
      - /dev/ttyACM0:/dev/ttyACM0
    restart: unless-stopped
    networks:
      - default
#    network_mode: host

The fist two attempts (mapping device-by-id ↔ device-by-id from host to container and mapping (device-by-id> ↔ /dev/ttyACM0) are not working at all: the config dialog of ZHA directly presents me with the question what type of stick I’m using, and not - as I watched in many tutorial videos - with the question for a serial device, where I can choose one from the list.

However, this would be the preferred method. So:

Question 1: Is there a possibility to map devices from /dev/serial/by-id/ into the HA container?

With the third line:
- /dev/ttyACM0:/dev/ttyACM0
I was actually being presented with a drop down entry /dev/ttyACM0 - ConBee II, … in the configuration dialog.
If I select that, I am asked about the radio type? (Funktyp in German), and can select deCONZ… from the dropdown list.
Now I do get a third dialog window which is asking me to provide the port specific configuration (Bitte geben Sie die portspezifischen Einstellungen ein. Serieller Gerätepfad)
But no matter, what I do enter here - e.g. /dev/ttyACM0 or /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00 the config screen tells me “connection failed” (Verbindung fehlgeschlagen).

So my Question 2:

What would be the correct entry here?

I tried to look at the log files from Home Assistant via portainer - they are not at all logging my tries to connect the gateway. I tried to log in to the console of the HA system, to see if the devices are mapped there correctly, but this brings me to questions 3 and 4:
Question 3:

How can I control logging, are there more detailed logs and where to find / configure them?

Question 4:

What is the user and password to use to log into the home assistant container?

I read somwhere it is root and empty password but that is not the case.

I’m stuck at the moment and really would love to give Home Assistant a try.
So to summarize my questions up:

  1. Is there a possibility to map devices from /dev/serial/by-id/ into the HA container?
  2. What would be the correct entry in the device mapping for docker-compose.yml to make the conbee II stick work?
  3. How can I control logging, are there more detailed logs and where to find / configure them?
  4. What is the user and password to use to log into the home assistant container?

Thank you very much in advance for your help!

Best,
Sascha

2 Likes

I don’t have any solution, just my experience: Never got ZHA to work so I switched to the Phoscon DeConz integration.

I have Home Assistant Docker running on a raspi4 (Raspbian Buster). My Conbee II Stick is also connected to /dev/ttyACM0 and it runs fine.

My compose file looks like this:

version: '3'
services:
  homeassistant:
    container_name: home-assistant
    image: homeassistant/raspberrypi4-homeassistant:stable
    volumes:
      - /home/homeassistant/.homeassistant:/config
      - /home/homeassistant/.homeassistant/media:/media
      - /home/pi/ftp/Hikvision:/home/pi/ftp/Hikvision
    environment:
      - TZ=Europe/Berlin
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
      - /dev/gpiomem
      - /dev/i2c-1

    privileged: true

    restart: always
    network_mode: host

Logging is controlled by the logger: https://www.home-assistant.io/integrations/logger/

I can log into my container using docker exec -it home-assistant bash

I’m also using ZHA and it works extremely well.

Hope this helps

1 Like

Hi @starob,
thank you for your reply and your config.
The “magic” line was the following:

Making the container privileged solved my issues - I only had to select the correct device and it worked.
With the privileged parameter I also can use the device line with the named device from the host system as well:

    devices:
      - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00:/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24xxxxx-if00

This also worked. Unfortunately troubleshooting via command line is very limited - dmesg is not working and lsusb does only deliver minimal output. But it worked :slight_smile:

Thank you very much for helping me out - now I can keep on exploring Home Assistant.

Best,
Sascha

Glad I could help. BTW dmesg works for me and lsusb has a few options to get more details, try -v