Here is a summary how I’ve got my EnOcean USB310 stick to run on my Synology/Docker setup:
First I had to create a start up script for my Synology to load some additional modules, as described here:
sudo vi /usr/local/etc/rc.d/startup.sh
The content is:
sudo insmod /lib/modules/usbserial.ko
sudo insmod /lib/modules/ftdi_sio.ko
sudo chmod 777 /lib/modules/usbserial.ko
sudo chmod 777 /lib/modules/ftdi_sio.ko
Change rights of startup.sh:
chmod 700 /usr/local/etc/rc.d/startup.sh
Next I had to add an additional rule, for renaming the tty device and for setting the required privileges as described here. First I though I could skip this step. But setting the right privileges was necessary because the rights of the host system got passed over to the container.
I created
/lib/udev/rules.d/55-usb-enocean.rules
with the following content:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="usbEnocean", MODE="0666"
The USB vendor and product ID I found with lsusb:
|__usb1 1d6b:0002:0404 09 2.00 480MBit/s 0mA 1IF (Linux 4.4.59+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
|__1-2 0403:6001:0600 00 2.00 12MBit/s 90mA 1IF (FTDI FT232R USB UART AL05792Y)
Than I had to modify my docker-compose.yml
:
[...]
EXTRA_JAVA_OPTS: "[...] -Dgnu.io.rxtx.SerialPorts=/dev/usbEnocean"
[...]
devices:
- "/dev/usbEnocean:/dev/usbEnocean"
Finally I had to set the path property of the EnOcean Gateway thing.
/dev/usbEnocean