Skip to content

Using a Z-Wave or ZigBee stick on Synology DSM for use with HomeAssistant and Docker

If you want to run or are already running HomeAssistant on your Synology NAS DSM 6.2, it’s possible that you’d want to use a Z-Wave or ZigBee stick to communicate with their respective devices. When I initially got my HA running in a docker on the NAS, I was disappointed when HA created errors when I configured the stick as I previously had it working on my previous docker host.  With a bit of digging, it turns out the Synology NAS was not recognizing the USB stick as a serial communication device.  This is because out-of-box, there are no cp210x drivers installed that are necessary for my combo Z-Wave/Zigbee stick.  Similarly, if you plan on using the Aeotec, you will need the cdcacm driver and Conbee will require ftdi_sio.  If you haven’t purchased your stick of choice yet, I’d recommend the GoControl stick as it does in one what the others do together, for less money than either of the other sticks.  (Disclaimer: I’ve only physically tested this on my combo stick, so if you run into issues or find other solutions, ping me so I can update this post)

While I’ve got a ton of Windows experiences (20+ year), a lot of Mac experience (10ish years), I’m basically a newb when it comes to Linux.  So for me, the next challenge was figuring out what/how the drivers would be packaged and how to obtain and install them.  After more time googling than I’d like to admit, I came across www.jadahl.com that is managed by Jumbotroll.  He has figured out how to create custom packages with drivers for most if not all versions of Synology hardware.  Feel free to drop him a donation through his paypal as his efforts shouldn’t go unnoticed.

Hardware:

  • GoControl Z-Wave + Zigbee HUSBZB-1 [ Amazon ]
  • Aeotec Z-Stick Gen5 [ Amazon ]
  • Conbee ZigBee gateway [ Amazon ]

Steps to get it working:

  1. Goto Jumbotroll’s website and download the drivers for your DSM version, currently 6.2 (make sure your DSM matches the minimum DSM version he has listed on the download page).
    You will need the model of your Synology hardware.  To get this, you can look at the box that you probably threw away, the receipt that buried in some email, or by SSH’ing into the NAS and running uname -a  which will output something like Linux Hyperion 4.4.59+ #23824 SMP PREEMPT Tue Dec 25 18:27:57 CST 2018 x86_64 GNU/Linux synology_broadwellnk_3018xs.
    Save the file to whatever device you will be running the commands from, in my case, it’s my Macbook.
  2.  Log into your DSM through the webpage (typically <LAN IP>:5000).  Open the Package Center, then click on Manual Install, and select the file you just downloaded on your local machine.  Click Next and install the package.
  3. Plugin the USB stick into the NAS and reboot it.
  4. If all goes as planned, you will have a working and recognized USB stick.

Integration into the HomeAssistant docker

  1. Find out which ports your USB stick is mounted to
    1. SSH into the NAS
    2. Execute dmesg | grep tty which will show you where the drivers were mounted

      Now you know it’s ttyUSB0  and ttyUSB1.
  2. Next, you need to add the mapping for these to your container.
    1. If you are starting your containers via docker-compose (and you should), edit your docker-compose.yaml file and add the following
    2. If you are starting your containers via docker run, stop it and go learn about docker-compose.  If you are a masochist and hate change, then just add the following to your run command:
    3. Some users have reported errors that may require you to add --privileged  flag.

Configuring HomeAssistant

  1. Edit your configuration.yaml file and add the following:

     
  2. Restart HomeAssistant and enjoy all the grief that Z-Wave + Zigbee can provide

Some troubleshooting steps

  1. SSH into the NAS and confirm it is recognized as a device by running lsusb -ciu :
  2. If you still do not see it, try searching in your  dmesg log for any other clues.
Published inDockerHome AssistantHomeLABSynology

37 Comments

  1. Guillaume Colins Guillaume Colins

    Hello
    Thanks for this auto, it’s very useful.
    I am sorry to contact you, but actually I would need your feedback since after having followed all steps I still have an issue to have my HUSBZB-1 recognized.
    I have installed drivers, modified the docker-compose file as the configuration.yaml but I always have an error:
    Error setting up entry /dev/ttyUSB1 for zha
    I tried many times, by reinstalling from scratch, uninstall and reinstall drivers, restarting the process to launch the docker-compose but I always get this pb.
    If you could help me that would be great! I can send you logs if you agree or any file you would need.
    Thank you

    Guillaume

  2. DK DK

    What’s the output of ls dev/tty*?

  3. Guillaume Colins Guillaume Colins

    Many thanks for responding!
    ls /dev/tty* returns many files but I assume these 2 ones are important
    /dev/ttyUSB0 /dev/ttyUSB1

    and I have this in my configuration.yaml
    devices:
    – “/dev/ttyUSB0:/zwaveusbstick:rwm”
    – “/dev/ttyUSB1:/zigbeestick:rwm”

  4. DK DK

    So it looks like it’s mounted the two items on your system. The next thing you can check is permissions and driver’s.
    ls /dev/ttyU* -lah and make sure that the owner or group of these is the same that’s trying to execute your control of them.
    lsusb should confirm that these are recognized correctly. Did you reboot after installing the drivers?

    Do your dmesg logs point to anything?
    Is the zwave working but just zigbee having trouble?

  5. Guillaume Colins Guillaume Colins

    Thanks
    I executed the following:
    admin@DiskStationGui2:~$ ls /dev/ttyU* -lah
    crw-rw-rw- 1 root root 188, 0 May 26 10:47 /dev/ttyUSB0
    crw——- 1 root root 188, 1 May 26 10:47 /dev/ttyUSB1

    So the owner seems to be root where I am executing all my processes with admin.
    Could it be the issue?
    If so how can I proceed?
    Thanks again for your help

  6. Guillaume Colins Guillaume Colins

    And to complete my previous answer
    “Did you reboot after installing the drivers?”
    > Yes

    Do your dmesg logs point to anything?
    > Being newbie in Linux I would say no. Is there a way to check this and set it up ?

  7. DK DK

    Just type dmesg and you will get the logs. You can add “ | grep tty” and it will pipe out only lines that contain tty

  8. COLINS COLINS

    Many thanks.
    Actually based on your comments I reviewed your initial description and added the option –privileged.
    This has fixed the problem since after that the usb key was accessible by my user.
    I have my 1st sensor successfully recognized by the key.
    Thank you so much for your help.
    Best
    Guillaume

  9. Simon Simon

    Thanks for the writeup mate, but I still dont get anything recognised in the /dev/tty*

    I have reinstalled drivers, unplugged and replugged the stick, restarted the NAS, still nothing.

    when i try the lsusb i get:

    Bus 001 Device 002: ID 10c4:8a2a Cygnal Integrated Products, Inc.
    Bus 001 Device 003: ID f400:f400
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

    When i do dmesg i get this for the cp210x:

    [ 174.663251] cp210x: Unknown symbol usb_serial_generic_open (err 0)
    [ 174.670215] cp210x: Unknown symbol usb_serial_generic_close (err 0)
    [ 174.677326] cp210x: Unknown symbol usb_serial_deregister_drivers (err 0)
    [ 174.684902] cp210x: Unknown symbol usb_serial_register_drivers (err 0)

    This is using the Nortek combo stick

  10. DK DK

    Great to hear. Did you add the privileged option to your HA docker?

  11. DK DK

    Your dmesg makes me think this is a driver’s issue. Are you sure you are pulling the correct model and DSM version of the driver page?

    The might be another driver package inside the synocommuninites repository. Have a look.

  12. COLINS COLINS

    Yes I added the option in my docker compose file and re-run it.
    It created the HA container with appropriate rights and then the HUSBZB has been recognized.
    Thanks again for your tutorial

  13. Simon Simon

    So jumbotroll released an updated driver package for the Apollo lake processors which has fixed my issue

  14. DK DK

    Great to hear. Buy him a beer!

  15. Simon Simon

    Hah, I bought him 2!

  16. DK DK

    Good man!

  17. Rich Rich

    Hello,

    with the dmesg | grep tty command I don’t see any ttyUsb.

    with lsusb -v
    I get:

    Bus 001 Device 002: ID 1cf1:0030 Dresden Elektronik
    Couldn’t open device, some information will be missing
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.01
    bDeviceClass 2 Communications
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x1cf1 Dresden Elektronik
    idProduct 0x0030
    bcdDevice 1.00
    iManufacturer 1
    iProduct 2
    iSerial 3
    bNumConfigurations 1
    Couldn’t get configuration descriptor 0, some information will be missing
    Couldn’t get configuration descriptor 0, some information will be missing

    usb-devices
    gives:

    T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
    D: Ver= 2.01 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1cf1 ProdID=0030 Rev=01.00
    S: Manufacturer=dresden elektronik ingenieurtechnik GmbH
    S: Product=ConBee II
    S: SerialNumber=DE2132186
    C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=cdc_acm
    I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm

    An y idea why I don’t get the ttyUsb?
    I installed the packes and reboot after plugin the USB conBee II

  18. DK DK

    I haven’t used the conbee stick. Have you checked to make sure it’s drivers are included in the usb driver package?

  19. Rich Rich

    For the drivers I use package UsbSerialDrivers DSM 6.2 this seems to work fine. I found the device on /dev/ttyACM0
    But still cannot access the ConBee II by http://phoscon.de/app very frustrating…

  20. Brian Brian

    I’ve heard that USB pass through doesn’t work on DSM 7, specifically regarding adding zwave/zigbee to HA. Have you had a chance to test this process on DSM 7?

  21. Erik Erik

    Do any of the drivers work for DS1621xs?

  22. DK DK

    Honestly, I have no way of knowing as I only have one model of the Synology that I have configured it on

  23. Missing cp210x.ko and chs341.ko on DSM 7.0 ?

    I have compiled some test drivers: http://www.jadahl.com

    You should have some Linux knowledge to test these divers.
    Download the desired driver from my server.
    Copy the files to your Synology using winscp or another suitable program. The files must be copied to / lib / modules
    Here you will also find the other driver files.
    After copying the files, you may need to change the permissions on the file.
    ex: type: sudo chmod 777 cp210x.ko if the file is named cp210x.ko.
    Then type sudo insmod /lib/moules/cp210x.ko to activate the file.

    /Jadahl

  24. DK DK

    Thanks for your work Jadahl!! Are the files typically only executed by the system? Maybe 755 or 700 would be a tighter permissions setting?

  25. No need for change permission on the driver files, but only the start-usb.sh script.
    I don´t have DSM 7.0 on my old NAS, so I have not tested these drivers. I have got som report from some users that the drivers work.

    /Jadahl

  26. GeekGarage GeekGarage

    Having issues and hope there is some help here to get. Tried both front and back and i get no ttyUSB devices

    DS1520+
    DSM 6.2.4-25556
    I installed http://www.jadahl.com/drivers_6.2/?arch=geminilake#

    Zigbee adapter is ConBee II

    ———-

    dmesg output:
    [ 105.663738] usbserial: module verification failed: signature and/or required key missing – tainting kernel
    [ 105.677609] usbcore: registered new interface driver usbserial
    [ 105.697819] usbcore: registered new interface driver ftdi_sio
    [ 105.708966] usbserial: USB Serial support registered for FTDI USB Serial Device
    [ 105.728841] usbcore: registered new interface driver cp210x
    [ 105.736682] usbserial: USB Serial support registered for cp210x
    [ 105.750838] usbcore: registered new interface driver pl2303
    [ 105.758046] usbserial: USB Serial support registered for pl2303
    [ 105.767920] usbcore: registered new interface driver ch341
    [ 105.774508] usbserial: USB Serial support registered for ch341-uart
    [ 105.797503] usbcore: registered new interface driver ti_usb_3410_5052
    [ 105.808671] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
    [ 105.818724] usbserial: USB Serial support registered for TI USB 5052 2 port adapter

    ———-

    lsusb output:
    Bus 001 Device 011: ID 1cf1:0030 Dresden Elektronik
    Bus 001 Device 003: ID f400:f400
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

    ———-

    lsusb -v output (only for the conbee 2):
    Bus 001 Device 011: ID 1cf1:0030 Dresden Elektronik
    Couldn’t open device, some information will be missing
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.01
    bDeviceClass 2 Communications
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x1cf1 Dresden Elektronik
    idProduct 0x0030
    bcdDevice 1.00
    iManufacturer 1
    iProduct 2
    iSerial 3
    bNumConfigurations 1
    Couldn’t get configuration descriptor 0, some information will be missing
    Couldn’t get configuration descriptor 0, some information will be missing

    ———-

    dmesg | grep tty output (i added [redacted]):
    [ 0.000000] Command line: root=/dev/md0 intel_iommu=igfx_off netif_num=4 HddEnableDynamicPower=1 syno_hw_version=DS1520+ vender_format_version=2 synoboot2 sn=[redacted] macs=[redacted],[redacted],[redacted],[redacted] syno
    ttyS0=pciserial,0x0:0x18.0x2,115200 syno_ttyS1=pciserial,0x0:0x18.0x0,115200
    [ 0.000000] Kernel command line: root=/dev/md0 intel_iommu=igfx_off netif_num=4 HddEnableDynamicPower=1 syno_hw_version=DS1520+ vender_format_version=2 synoboot2 sn=[redacted] macs=[redacted],[redacted],[redacted],[redacted] syno_ttyS0=pciserial,0x0:0x18.0x2,115200 syno_ttyS1=pciserial,0x0:0x18.0x0,115200
    [ 4.970653] dw-apb-uart.1: ttyS1 at MMIO 0xa1815000 (irq = 54, base_baud = 115200) is a 16550A
    [ 4.995910] console [ttyS0] disabled
    [ 4.999777] dw-apb-uart.2: ttyS0 at MMIO 0xa1817000 (irq = 6, base_baud = 115200) is a 16550A
    [ 5.009460] console [ttyS0] enabled
    [ 48.985422] synobios open /dev/ttyS1 success
    [ 79.856833] synobios open /dev/ttyS1 success
    [ 80.951347] synobios open /dev/ttyS1 success
    [ 83.566532] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

  27. GeekGarage GeekGarage

    that is a no-go unfortunately. I’m running the deConz module in HA and it still can only see the /dev/ttyS0 through /dev/ttyS3 there is no ACM)

    I even tried to restart the whole NAS and it still won’t show up in the deConz add-on for HA.

    In the standaolne deConz docker image i can find the device and it can read the firmware and it’s up to date. it first told me it wasn’t so I updated it through windows and then it read that it was the newest firmware and it seems like it’s just waiting on some ZHA devices
    https://i.imgur.com/uGVTDHW.png
    https://i.imgur.com/CxJWwHd.png

    I read that the ConBee is /dev/ttyUSB* where as the ConBee 2 is /dev/ttyACM* (* = number) I have no clue what this means or how it affects the installation and approach to get this running with the Home Assistant OS with the deConz add-on.

    And since it seems to be working with the standalone deConz docker i think it should be possible?

  28. GeekGarage GeekGarage

    My solution was to update to DSM7.0
    Then remove what i installed following the guide.
    Then deleted my HA image in VM Manager
    re imported the OVA image
    and it was available

    Follow this https://www.youtube.com/watch?v=S2Uu35xi11E

  29. Dirk Dirk

    @Jadahl,

    Followed your message:

    ————-
    Missing cp210x.ko and chs341.ko on DSM 7.0 ?

    I have compiled some test drivers: http://www.jadahl.com

    You should have some Linux knowledge to test these divers.
    Download the desired driver from my server.
    Copy the files to your Synology using winscp or another suitable program. The files must be copied to / lib / modules
    Here you will also find the other driver files.
    After copying the files, you may need to change the permissions on the file.
    ex: type: sudo chmod 777 cp210x.ko if the file is named cp210x.ko.
    Then type sudo insmod /lib/moules/cp210x.ko to activate the file.

    /Jadahl
    ———————————-

    But my response on the INSMOD is like this:
    nen:/lib/modules$ sudo insmod /lib/modules/cp210x.ko
    insmod: ERROR: could not insert module /lib/modules/cp210x.ko: Unknown symbol in module

  30. @Dirk

    You have to: insmod usbserial.ko first, like this..

    sudo insmod /lib/modules/usbserial.ko
    sudo insmod /lib/modules/cp210x.ko

    /Jadahl

  31. Gator Gator

    I appreciated finding this thread. I was able to get the CP210x driver loaded and the Nortek device recognized. “dmesg | grep tty” show the 2 ports on USB0 and USB1.

    But when I restart the NAS, the changes are lost. Any thoughts on how to make the changes permanent?

  32. Brian Brian

    I apologize that this might not answer your question, but I started following this thread long ago with the expectation that I would be buying a Synology some day and moving my HA install over. I found a guide here that explains how to set up a Virtual Machine on Synology to run HA. It allows USB pass through and it is all configured through the interface. It seems like a very straightforward implementation. Hopefully this helps people:

    https://gh2home.nl/homeassistant/install-home-assistant-in-a-virtual-machine-vmm/

  33. DK DK

    While running HA in a VM is a valid alternative, to me, it’s too much for how lightweight HA is. Docker is a great tool for running the application. But it would be nice if Synology addressed the device address logic in their OS.

  34. JJ JJ

    Just what I needed … thanks!

  35. LibraSun LibraSun

    Has this guide been updated for DSM7, which otherwise thrashed USB access?

  36. Landshark Landshark

    Sorry to necro this thread here, but looks like jadahl.com is dead and I’m running into similar issues.

    Does anyone have an alternative site for drivers?

    I have the Synology DS1522+ (DSM 7.2.1) and the Nortek GoControlC ECOMINOD016164 HUSBZB-1 USB Hub.

    I’m in the process of moving my HA setup off of a raspberry pi and onto the synology NAS. I already have HA setup in docker and running, I’m just need the zwave/zigbee connections now.

    However, like others I cannot get the usbhub to be recognized by synology NAS.

    Just need to find the drivers! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *