Raspberry Pi - Make serial USB ports persistent via symlinks

@Rintano I have been using 3 USB devices on a Pi 3b+ with Symlinks and Openhab no problem. Works fine on a reboot. The zwave binding is actually the one that worked best with Symlinks for me. On a Pi with Openhabian and oh 2.5M1 this works for me:
Definition of my Symlinks added to the bottom of /etc/udev/rules.d/99-com.rules

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyEnocean"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyZwave"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="ttyZigbee"

and this is what I added in the EXTRA_JAVA_OPTS line in /etc/default/openhab2

-Dgnu.io.rxtx.SerialPorts=/dev/ttyEnocean:/dev/ttyZwave:/dev/ttyZigbee:/dev/ttyUSB0"

For me it was important to add them to the EXTRA_JAVA_OPTS line that was already there and not to make a new one and there is a bug in Openhabian that overwrites your EXTRA_JAVA_OPTS when you use the add common ports option in the openhabian-config.
I dint know if you have to do anything else when you use a manual installation.
Best regards Johannes

1 Like