HA on Synology using Docker with ZHA integration and Conbee2 USB stick

From a command prompt on Synology, what happens when you run

ls /dev/ttyACM11

If you get an error, the device is not being recognized as ttyACM11. Here’s the difference between a valid USB mapping and one that isn’t:

Screenshot from 2021-09-29 13-52-20

Hi,

Now so unsure.
In the middle of this the DSM version got updated.
Created the 99-HomeAssistant.rules again, but it will not create the ttyACM10 or ttyACM11 directorys under /dev as before so that must be the explanation.

I will come back when I get the Aliases creatad again.
(The strange thing is that Conbee 2 can sill connect to ttyACM10 that does not exist anymore)

Thanks,
AseKarlsson

Yeah getting this to work on synology seems very prone to problems. I see your issue mentioned here on this github issue, with some possible solutions.

In the end, if you can’t get zwavejs2mqtt to work on synology, you may want to just get a cheap raspberry pi and run it on that separate. It can still link back to Home Assistant using the RPI’s IP address in the zwavejs integration.

Thanks All,

I also think this has taken too much time and effort and still breaks on every DSM update.
I removed my Z-Wave Integration and go only Zigbee at the moment.
Thanks Guys for teaching me a lot of Linux during this thread!

Thanks,
AseKarlsson

Hello everyone. I need help with my Synology but can’t find it anywhere, I thought I could give it a try here…
I have a ZigBee setup with a ConBee USB stick. I’ve been using HomeBridge (for Siri integration) on a docker container for a couple of years. Yesterday I added a USB hard drive because I’m running out of space, but while it’s plugged in the ZigBee devices stop responding. I guess there is some kind of USB conflict. Any ideas?

Thank you very much!!

Do you use an USB extension cable for your Conbee ? If not, do.

I’ve just tried that, but the problem persists…

You don’t get ZB updates, or you have errors in the log saying your stick is not found?

I really don’t know… But if I press a light switch (with no response) and unplug the hard drive the lights turn on. Is that of any help?

You don’t know like you don’t know how to check the logs?

Hi All,

Now I am back on this.
Z-Wave is of interest again.
Tested with latest Synology version 7.0.1-42218, but still the same.
I have the same old rule in place 99-HomeAssistant.rules under /lib/udev/rules.d

KERNEL==“ttyACM*”, ATTRS{idVendor}==“1cf1”, SYMLINK+=“ttyACM10”
KERNEL==“ttyACM*”, ATTRS{idVendor}==“0658”, SYMLINK+=“ttyACM11”

but the directories ttyACM10 or ttyACM11 under /dev is still not created as before.
Anyone worked further on this and solvet it?

Thanks,
AseKarlsson

I’m on DSM 7.2 and I can get it to work if I start the container from the command line like this:

sudo docker run --name "zwavejs_zwave500" --restart always -d -p 8091:8091 -p 3000:3000 --device=/dev/zwave500 -v /volume1/docker/zwavejs/store:/usr/src/app/store zwavejs/zwavejs2mqtt:latest

Where zwave500 is a symlink generated from udev rules like this:

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{seria
l}=="ffffffd8ffffffb9ffffffd0ffffffa2", SYMLINK+="zigbee_zzh", MODE="0777"
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{seria
l}=="0001", SYMLINK+="zwave700", MODE="0777"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", ATTRS{seria
l}=="01FFFFFF-FFFF-FFFF-FFFF-100915210555", SYMLINK+="zwave500", MODE="0777"

However, if I try to run using docker-compose it does not work:

version: '3.7'
services:
  zwave-js-ui:
    container_name: zwave-js500
    image: zwavejs/zwave-js-ui:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    privileged: true
    environment:
#      - SESSION_SECRET=mysupersecretkey
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
      - TZ=America/Chicago
      - UDEV=1
    networks:
      - zwave
    cap_add:
      - SYS_ADMIN
    devices:
      - '/dev/zwave500:/dev/zwave'
    volumes:
      - /volume1/docker/zwavejs/store:/usr/src/app/store
    ports:
      - '8091:8091' # port for web interface
      - '3000:3000' # port for Z-Wave JS websocket server
networks:
  zwave:


Aloha,
old topic, but sill appliable!
:slight_smile:

I have a similar problem, although I’m using a HA VM, not a docker container.
problem for me is, alwasy when I update the HA VM and reboot it from inside the HA
on the Synology host in the VM manager I have to manually add the Conbee stick again.
Now I was hoping that maybe creating a static udev rule could help,
but unfortunately I even dont see my conbee stick under /dev/TTY

The lsusb output shows this:

lsusb -Ue
  |__1-1         0463:ffff:0100 00  2.00  1.5MBit/s 20mA 1IF  (EATON Ellipse ECO 000000000)
                   (EP) 00: Control  attr 00 len 07 max 008
  |__1-3         1cf1:0030:0100 02  2.01   12MBit/s 100mA 2IFs (dresden elektronik ingenieurtechnik GmbH ConBee II DE2251154)
                   (EP) 00: Control  attr 00 len 07 max 040
  |__1-4         f400:f400:0100 00  2.00  480MBit/s 200mA 1IF  (Synology DiskStation 7F00948F3ADA5A43)
                   (EP) 00: Control  attr 00 len 07 max 040

To be honest, I dont understand, if I have a simir or different problem.
:slight_smile:

When I do ls -la /dev/ -tab-

the number of all devices stays alwasy 718, doesnt matter. if Conbee is plugged in or not:

 ls -la /dev/
Display all 718 possibilities? (y or n)

And always login to Syno gui and add the Conbee to my HA VM is just super annoying.
Maybe anyone else, who is using HA in a VM on a Syno NAs had the same issue?

thanks
Marcel

Hello @skymarc
You are not alone! I have also HA via a Synology’s VM and face to the same issue.
each time I reboot HA, the conbee2 is lost (but sometimes also my zwave gen5 stick).
I have to go to the VM panel and remove/readd the stick.
Even if I do that, in some cases it doesn’t work. The only way is to reboot the NAS.

I had a look on several thread in differents forums.

The issue should be linked to the fact that both sticks are mapped as a ttyACM0 and ttyACM1 and randomly switching to one to the other after reboot.

I have no issue with my third stick who is a RFXcom mapped as a ttyUSB0.

May be, I will try to make udev rules but I’m affraid to break something because I do not confortable to play with that stuff.

I was able to get this working for me. My details:

$ lsusb -cui
|__usb1          1d6b:0002:0404 09  2.00  480MBit/s 0mA 1IF  (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
  |__1-1         05e3:0610:0663 09  2.10  480MBit/s 100mA 1IF  (GenesysLogic USB2.1 Hub ffffffd6ffffffa3ffffffebffffffcb) hub
    |__1-1.3     0764:0601:0200 00  2.00   12MBit/s 100mA 1IF  (CPS CP1500AVRLCD3 BHPPO7009490)
   1-1.3:1.0      (IF) 03:00:00 2EPs () usbfs 
    |__1-1.4     10c4:ea60:0100 00  2.00   12MBit/s 100mA 1IF  (Silicon Labs CP2102N USB to UART Bridge Controller 12f35ce8e49aed118f537808a8669f5d)
   1-1.4:1.0      (IF) ff:00:00 2EPs () cp210x ttyUSB0 
  |__1-2         1a86:55d4:0443 02  1.10   12MBit/s 134mA 2IFs (Zooz 800 Z-Wave Stick 533D004242)
  1-2:1.0         (IF) 02:02:01 1EP  () cdc_acm tty/ttyACM0 
  1-2:1.1         (IF) 0a:00:00 2EPs () cdc_acm 
  |__1-4         f400:f400:0100 00  2.00  480MBit/s 200mA 1IF  (Synology DiskStation 65003C1E0281C669)
  1-4:1.0         (IF) 08:06:50 2EPs () usb-storage host3 (synoboot)
|__usb2          1d6b:0003:0404 09  3.00 5000MBit/s 0mA 1IF  (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
  |__2-1         05e3:0626:0663 09  3.20 5000MBit/s 0mA 1IF  (GenesysLogic USB3.1 Hub ffffffd6ffffffa3ffffffebffffffc0) hub
    |__2-1.2     0bc2:2344:0712 00  3.00 5000MBit/s 896mA 1IF  (Seagate Portable NT36GY1H)
   2-1.2:1.0      (IF) 08:06:50 2EPs () usb-storage host2 (usb1)

Here’s my docker compose:

version: '3.7'
services:
    homeassistant:
        restart: unless-stopped
        container_name: homeassistant
        volumes:
            - /volume1/docker/homeassistant/config:/config
        devices:
            - '/dev/ttyACM0:/dev/ttyACM0'
            - '/dev/ttyUSB5:/dev/ttyUSB0' # i set up a symlink in /etc/udev/rules.d

        environment:
            - TZ=America/Chicago
        network_mode: host
        image: 'ghcr.io/home-assistant/home-assistant:stable'

    zwave-js-ui:
        container_name: zwave-js-ui
        image: zwavejs/zwave-js-ui:latest
        restart: unless-stopped
        tty: true
        stop_signal: SIGINT
        environment:
          - SESSION_SECRET=XXXX
          - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
          - TZ=America/Chicago
        networks:
          - zwave
        devices:
          - '/dev/ttyACM0:/dev/zwave'
        volumes:
          - zwave-config:/usr/src/app/store
        ports:
          - '8091:8091' # port for web interface
          - '3000:3000' # port for Z-Wave JS websocket server
networks:
    zwave:
volumes:
    zwave-config:
        name: zwave-config

Notably, I only did this for my ttyUSB0 device which is a skyconnect zigbee stick since that was the one that kept switching between ttyUSB0 and ttyUSB1. Maybe i’ll have to do this for the z-wave ttyACM0 one, too.

I added this to /etc/udev/rules.d/99-usb-serial.rules:

KERNEL=="ttyUSB*", ATTRS{idProduct}=="ea60", SYMLINK+="ttyUSB5"

I’ll see if a DSM update breaks this, but it shouldn’t since I used /etc instead of /lib

1 Like