I have udev configured to create some symlinks for a couple of USB-to-serial devices:
crw-rw---- 1 root dialout 166, 0 Jun 13 16:39 /dev/ttyACM0
lrwxrwxrwx 1 root root 7 Feb 26 12:52 /dev/tty-efergy -> ttyUSB1
crw-rw---- 1 root dialout 188, 0 Jun 8 13:00 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Feb 26 12:52 /dev/ttyUSB1
lrwxrwxrwx 1 root root 7 Feb 26 12:52 /dev/tty-uzb -> ttyACM0
lrwxrwxrwx 1 root root 7 Feb 26 12:52 /dev/tty-wavin-modbus -> ttyUSB0
Unfortunately, it seems that I cannot use the symlink in place of the character device in OpenHab. For instance I want to use the Zwave binding with /dev/tty-uzb instead of /dev/ttyACM0, because the device names change when devices are disconnected and plugged back in.
I used to be able to type the device string, but it would not work (never connected). Now (OH 2.3), the device is selected from a dropdown (in paper UI), listing only the device nodes.
Mikkel,
I am definitely no expert at Linux or Openhab but I had a similar problem the other day with USB passthrough on Proxmox after upgrading. In my case it was the fact that I was missing the extra Java options in /etc/default/openhab2
Here is a sample line EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0" but obviously you would need to add /dev/tty-uzb
It could also be the permissions? If your install is like mine, the openhab user is a member of the tty and dialout groups but not root, so perhaps your symlinks need to be in the dialout group?
Adding the appropriate parameters to EXTRA_JAVA_OPTS did the trick
Symlinks on Linux show full permissions for everyone, because the permissions of the target will be checked instead on access, so with the group R/W permission on /dev/ttyACM0, the dialout group, and openhab-user being a member of the dialout group, everything seems to work.
Thanks a lot. BTW: searching for gnu.io.rxtx.SerialPorts and similar, I now find several related threads on this forum, while the search terms I used before posting yielded nothing.