[SOLVED]Connecting Aeotec Z-Stick Gen5 to OpenHAB, running on Synology

  • Platform information:
    • Hardware: Synology
    • OS: OpenHAB
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 2.5.2(newest)
  • Issue of the topic:

Hi guys, despite the already existing threads about this subject, I haven’t been succesfull yet. I bought a Aeotec Z-Stick Gen5 to connect 4 wall plugs from Fibaro. I haven’t connected the plugs to the stick yet, first wanted to connect the stick to openHAB.
The steps I did is as follows:

  1. Installed binding Z-wave(not the Z-Way!)
  2. Put the stick in the Synology, where the stick started to blink blue, red and yellow.
  3. In Paper UI, clicked on the + in the inbox and selected the Z-wave binding.
  4. Configured the port, which is /dev/ttyACM0 , I checked this in Putty, where the ACM0 port disappeared when I plugged the stick out of the Synology. Even after several times plugging in and out, the port didn’t change.

When I go to things, I get this error:
OFFLINE - COMMUNICATION_ERROR Serial Error: Port /dev/ttyACM0 does not exist

I tried the path dev/ttyACM0 but that won’t solve the problem. I also tried to reboot the Synology, without any succes. I read something about a dialout group but couldn’t really understand what that represents and how to configure this in such a way that this solves the problem. Anyone can help me out??

You need to add the ports to the java configuration, so it can access them. In openhabian there is a menu option for that.

https://www.openhab.org/docs/administration/serial.html

Please also see /etc/default/openhab2

EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Thanks for your reply Rob.
What I didn’t say in the thread opening is that I’m a beginner so I’m sorry if I have a lack of knowledge :wink:
Could it be possible that I don’t have any openHABian? I’m not running OpenHAB on a RPI, but on a NAS server(Synology DS216).

Once you are in putty edit the /etc/default/openhab2 using your editor. E.g. vi /etc/default/openhab2. Then locate the EXTRA_JAVA_OPTS= line and add -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 or modify the line by adding :/dev/ttyACM0 if it already lists some other /dev/tty...'s

This is what I get to see when I follow your stepts. Can I just add a line with
-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"" ?

After doing some searching, I found this directory, where the files where they where talking about in the link Rob send(so the start.bat etc etc). But if I open them using vi, I don’t see anything with a serial port or something… Anyone got any clue?

Mighty be that the distro you have on Synology uses another type of startup. Can you have a chat with the Synology community.

Maybe this Get serial devices working on Synology DS216+II DiskStation will help.

You mean the startup of the Synology itself or the start up from the openHAB software?

[SOLVED] The thing that made it happen was to make 2 new groups, uucp and dialout, in the DSM and give the user openhab acces to these groups. However, thanks @robjkamp for the effort!

@robjkamp I am using your way on my Raspberry Pi 3+ and I managed to change it but I am clueless as to how to save it, I tried enter it didn’t work, I tried ctrl + z it didn’t save. Plus I can only modify it when I press “I”. Any help would be really appreciated, I am a beginner at this as well.

Also the stick is flashing red, blue, yellow non stop and not sure if its supposed to.

When the stick is inserted to the device where OpenHAB is running on, it shows indeed the colours where you’re talking about. That’s normal…

ok thank you

This can also be disabled, as explained in the manual.

The manual for disabling LED is here.

2 Likes

I am using Synology and OpenHAB on docker. I also experienced problems with the z-wave dongle. Not sure you have exact same problem as me, but, I had problems with that accessing the z-wave serial device required root user and I had to make some tricks to make the access work.

If I where you I would:

  1. ssh into your synology machine and list all devices and make sure you find your z-wave device in /dev/ dir
  2. Make sure that the user you are using when running openhab has read-write access to the serial device - just ssh into synology machine and ls -al /dev

hope you find a solution