Skip to content

Instantly share code, notes, and snippets.

@scrapix
Last active November 13, 2024 19:49
Show Gist options
  • Save scrapix/2f9ad27459c3646732f510f50ead3410 to your computer and use it in GitHub Desktop.
Save scrapix/2f9ad27459c3646732f510f50ead3410 to your computer and use it in GitHub Desktop.
Synology DSM 7.2 - Adding USB Devices / Dongles (SkyConnect / Z-Wave)

Adding SkyConnect Dongle according to Blog Post or better Youtube

image

Summary

Synology has disabled USB drivers. Additionally one important driver is not available on Synology DSM 7+. Thus we need to enable some USB drivers plus download one driver and enable this on the system. For future DSM updates we need to add a Scheduled Task, so that the drivers will be loaded.

This Tutorial works for DS920+. In case your NAS has another processor, change "geminilake" within the commands to your processors architecture name, as described in https://kb.synology.com/en-global/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have!

1. Download usb drivers from Github

git clone https://github.com/robertklep/dsm7-usb-serial-drivers.git ~/dsm7-usb-serial-drivers

2. Review connected USB Devices

ls /dev/ttyU*

3. Copy necessary driver to lib/modules

sudo cp ~/dsm7-usb-serial-drivers/modules/geminilake/dsm-7.2/cp210x.ko /lib/modules

4. Adjust access rights of new ko module

sudo chmod 644 /lib/modules/cp210x.ko

5. Initiate usb-serial-drivers.sh

sudo chmod +x ~/dsm7-usb-serial-drivers/usb-serial-drivers.sh
sudo sh ~/dsm7-usb-serial-drivers/usb-serial-drivers.sh start

6. Review connected USB Devices again

Now it should list your USB Device

ls /dev/ttyU*

7. Add following startup script to NAS through Task Manager

Select script to be exectued as root!

cp ~/dsm7-usb-serial-drivers/modules/geminilake/dsm-7.2/cp210x.ko /lib/modules
bash ~/dsm7-usb-serial-drivers/usb-serial-drivers.sh start
@Dekadinious
Copy link

For anyone having issues here, remove "/dsm7-usb-serial-drivers" from the commands

@ggenot
Copy link

ggenot commented Oct 31, 2023

I will add that if you use HA in Container manager you will need to run the container with "High privilege" (in Capabilities) section of container configuration.

BEWARE it is considered as UNSAFE as the container can have access to Syno Filesystem.

Another solution is to launch the container via docker compose and pass the device (customize to your needs):

version: "2"
services:
  homeassistant:
    image: homeassistant/home-assistant:stable
    container_name: homeassistant
    network_mode: host
    restart: always
    volumes:
      - /volume1/docker/homeassistant/config:/config
    devices:
      - /dev/ttyUSB0
    environment:
      - TZ=Europe/Madrid

You should be able to use docker-compose file in Container Manager via "Project" (untested)

@jfredsilva
Copy link

The script on the Task Manager isn't working, the output is:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

At every NAS restart I have to run all commands again

@scrapix
Copy link
Author

scrapix commented Jan 10, 2024

The script on the Task Manager isn't working, the output is: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required

At every NAS restart I have to run all commands again

Did you select root as task executer?

@jfredsilva
Copy link

Did you select root as task executer?

Thanks, it works now.
I switched to root and I had to change the script, since the files are located inside a user folder.
It had to be something like:

sudo cp /var/services/homes/USER/Downloads/DSM-USB-DRIVER/modules/geminilake/dsm-7.2/cp210x.ko /lib/modules
bash /var/services/homes/USER/Downloads/DSM-USB-DRIVER/usb-serial-drivers.sh start

@rossco555
Copy link

When I run sudo sh /usr/local/etc/rc.d/usb-serial-drivers.sh start, I get:

sh: /usr/local/etc/rc.d/usb-serial-drivers.sh: No such file or directory

@jaroshimo
Copy link

When I run sudo sh /usr/local/etc/rc.d/usb-serial-drivers.sh start, I get:

sh: /usr/local/etc/rc.d/usb-serial-drivers.sh: No such file or directory

What is the output of:

sudo ls -la /usr/local/etc/rc.d/ | grep "usb"

@maol01
Copy link

maol01 commented May 2, 2024

I am tryin to update usb following this instruction. However I can not getting it to work. After download using git clone iget this reply
ls: cannot access '/dev/ttyU*': No such file or directory. What am I doing wrong?

@Oscarz90
Copy link

Oscarz90 commented Jul 8, 2024

o such file or directory. What am I doing wron

I'm having the same issue, I installed everything but it didn't work

@scrapix
Copy link
Author

scrapix commented Jul 9, 2024

@maol01 & @Oscarz90 I've updated the instructions. Give it another try accordingly! Hope it'll work now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment