Talking about āreally closeā: Now it works. Please donāt ask me, what Iāve done differently this time. However for the sake of everybody encountering similar troubles as me (and especially for those running a z-wave stick on a synology device) here comes once more the list of what Iāve done (gathered from different forums and sites). Maybe itās going to help someone ā¦
(0.5 in newer DSM versions you donāt have root access via SSH, so log in as admin and run sudo -i and enter admin pw again)
check if stick is accessible by openhb user: ls -l /dev/ttyA*
if itās root only do the following (maybe simply putting openhab into dialout is sufficient):
Create groups ādialoutā and āuucpā in DSM
Change user id of āopenhabā to make it a system user
Edit /etc/passwd and replace id by a number < 100 (e.g. 95)
Change user id for existing files to new user id, here 1066 is the old user id and 95 the new one:
find / -user 1066 -exec chown -h 95 {} ;
Change group ids of ādialoutā and "uucp"
Edit /etc/group and replace group ids by 800 / 801
Assign user openhab to both groups (also in /etc/group)
continue with setting ownerships and usage rights chown -R root.uucp /run/lock chmod -R g+w /run/lock chown -R root.uucp /var/lock chmod -R g+w /var/lock/ chown -R root.dialout /dev/ttyACM0 chmod 660 /dev/ttyACM0
If openhab was started as root before, there may be lock-files remaining in folder /var/locks that cannot be removed by user openhab, so remove them manually
add -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 \ to your start script (I couldnāt find any scripts on my synology (no init.d, no nothing) and put it directly into the java command in start.sh at /volume1/@appstore/OpenHAB/)
instead of starting the packet in the webGUI, I am starting OH via SSH with sudo āu openhab ./start.sh (you might have to give openhab access to the whole folder, for the java files to run correctly: chown openhab /OpenHAB āR)
You can see, I am no Linux pro, thatās why some steps might seem awkward, redundant or unnecessary. I am just putting down what finally (after days of fiddling around) got it working for me.
Good luck!