Z-Wave Binding and Serial Port working, butwhy was no device found?

Hello everybody,

I’m new to OH2 and I use Aeotec Z-Wave Stick Gen. 5 which is installed at my PI 2B with Openhabian. The Stick is displayed as online in the Things-Configuration of PaperUI.

I removed the stick, included a Fibaro RGBW device to the stick (stick displayed the Include process correct) and connected it again to the PI but now the search process in the inbox don’t find new devices in this binding. What do I wrong?

Thanks!

@gerritlo When you plugged the stick back into your Pi, it likely was assigned a different serial port than the one with which it was originally configured in openHAB. You could either find the new port and update the stick’s configuration in openHAB, or reboot the Pi, and it should be assigned the port number that’s in the openHAB config.

This is why I tend to leave the stick in the Pi when I include/exclude nodes.

Thank you, after a restart it worked.

you can make the port permanent by doing this though:

  1. plugin the stick and find the IDs: lsusb
Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc. 
  1. chreate a UDEV Rule:
sudo nano /etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyUSB-ZStick-5G", GROUP="dialout", MODE="0666"
  1. add openhab user to the right groups:
sudo adduser openhab dialout
sudo adduser openhab tty  
  1. reboot and test if symlink was created:
ls /dev/tty*
  1. Add symlink to PATH in Java: open /etc/default/openhab2 and modify this line:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB-ZStick-5G"
  1. restart openhab.

That should do the trick, without you having to restart everytime you unplug and replug the stick.

1 Like

Would consider writing this up as a separate tutorial and post in the Tutorials and Examples section? I think a lot of users will find it useful and it is more likely to be found there than as a reply to this thread.

@Nicolas

Good explanation! I agree with @rlkoshak, you should post it as a new thread in the Tutorials section. It took me some time to find a simple explanation/solution as this one.
I suggest to add the following step after adding the symlink to PATH in Java, that is modifying the port of the Z-Wave Stick in HABMIN/Configuration/Things:

At the end, I needed to reboot my RPi (rather than simply restarting OH2).