I’ve been trying to configure openhab2 on my synology server as well. I don’t use Z-Wave, but use another serial interface to communicate with sensors. This post is very promising as I couldn’t figure out how to access the serial port.
I’m familiar with adding openhab to the dialout group in linux, but what is the uucp group? Do I simply need to add the groups or is there additional configuration?
I rewrote the original post so that it can be of some use to someone else using OpenHAB 2 on a Synology, using the latest SPK released on github (2.1.0.004-SNAPSHOT-DSM6 on openhab/openhab-syno-spk). In any case I still have some questions that may be simple for non-beginners, if someone can help I’d be thankful:
I have no idea on how to create a control/switch for a group of items other than adding a button on the Panels UI. I find this is necessary so that I actually have an item that can be detected by i.e. mobile apps or even in the “Basic UI”. Groups and scenes are concepts kind of different from of other platforms and the documentation is not straightforward. I understand how to add devices to a Group (create a Group item and edit each Item by adding it to that Group), but not how to actually have something like a “switch channel” associated with that Group.
Node 5 (FGRM222 Roller Shutter) is isolated as seen in the network diagram below, and after many trials to heal the network and the node itself, it still doesn’t route to any neighbour other than the controller (Node 7):
I actually had to move the USB Z-Stick (temporarily) closer to it in order to successfully remove and add it from the network, and most importantly, make OpenHAB2 recognise and fully initialise it.
The network is physically similar to the drawing although nodes 3 and 6 are the ones closer to node 5.
All the nodes are at similar distances from the Z-Stick controller on its usual location, although there are some additional walls between that position and node 5.
Here’s my network diagram:
And here’s a schematic of the physical layout (black lines are walls):
I guess it is kinda late, but as this thread is coming up among the first ones on a Google search with Z-Wave and Synology, I wanted to add that this information finally helped me getting the stick working after reboot (chmod 777 /dev/ttyACM0 always worked only until next reboot):
You can use Task Scheduler in DSM to make it run the script on boot. Mine is pointing to “/bin/sh /usr/local/etc/rc.d/S98openhabzwave.sh start”.
This will survive DSM updates.
I have it running every few hours just so that if I happen to unplug the USB stick it will eventually find it again.
I see your posting on the GitHub OH2.4 SPK area also; I haven’t read the instructions on the GitHub page until now and it mentions stuff that appplies to the USB port which may apply to your Synology? I didn’t have to do this because I only have the OH 2.3 version installed which is part of the Synology library installed. I’m waiting for upgrade instructions from the developer in order to get mine to 2.4 also.
For usage of serial devices you need to check if openhab user has the appropriate rights to access the device in /dev and to create lock files in /run/lock
To do so the installer tries to add the openhab user to the groups dialout and uucp . But these groups are not present on all synology diskstations.
/run/lock for instance is created as this on a ds214play:
drwxr-xr-x 5 root root 160 Dec 9 20:11 lock
and /dev/ttyUSB0 is per default also created for root only:
crw------- 1 root root 188, 0 Dec 4 12:55 /dev/ttyUSB0
Hello, I’m new here, but i have the same problem with my USB Z-wave stick. I have the DSM version “DSM 6.2.1-23824 Update 4”.
I have done everything like mentioned above, but i can’t generate the both files, because i have no access to this folder. I get following answer “-sh: /lib/udev/rules.d/99-aeon-z-stick.rules: Permission denied”
I have test again some things and can’t find the failure. I have added the user “openhab” and “openhab2” to group “tty”, “dialout” and “uucp”. I have red different users and groups in the internet, so i have made everything.
I have checkt the both files which should be crated:
I have also set the rights for both files with “chmod 755 …”.
After that I have bought a new Z-Wave-Sticks and have tested it with the “Aeotec Z-Stick Gen5” and “Z-wave.me ZMEEUZB”, but it will not work. I get following message: “Status: OFFLINE - COMMUNICATION_ERROR Serial Error: Port /dev/ttyACM0 does not exist”.
Has anyone an idea what’s going wrong at my Synology?
I have again tested some things and need your help by interpretation. At the moment I’m working with obenHAB version 2.3.0.005, because Version 2.4 and 2.2 will not start. I can install them, but when i want to start it in the package manager it doesn’t work. Is there maybe another problem? I have installed it in the Smarthome folder and the public folder, but there are no difference.
I have again testet the script and I’think the script is working, at least I get no failures when I start it with /bin/sh /usr/local/etc/rc.d/S98openhabzwave.sh start
I can find than the zwavelog.txt with the content “ls -l /dev/ttyACM0” and when I use “ls -l /dev/ttyA*” I get folowing result:
crwxrwxrwx 1 openhab dialout 166, 0 Feb 6 18:02 /dev/ttyACM0
Can someone say me, if this is correct or has an idea what is going wrong?