[SOLVED] Z-wave controller and Persistent names for usb-serial devices

Hi folks,

my OH installation is on debian virtual machine. Every reload of the vm, or the host, the USB port changes.

The solution I’m trying to implement is based on new udev rule, like the how-to below:

http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

from my zwave log the issue is still there:

2015-10-22 22:28:22.730 [ERROR] [b.z.i.protocol.ZWaveController:429 ]- Serial Error: Port /dev/zwavecontroller does not exist

maybe the problem is explained here:

but I didn’t understand how to fix it. I’m using the deb installation, so I need to modify the script on /etc/init.d/ as appropriate. Any suggestion?

Thanks for your help

Andrea

LOL

it was simple :smile:

just adding the correct arg in openhab script:

-Dgnu.io.rxtx.SerialPorts=/dev/zwavecontroller \

in the “JAVA_ARGS_DEFAULT” section.

Nice :smile:

Andrea

An even easier solution is to name you symlink differently. I actually ran into your question here, looking for the same, but a quick check shows that java looks for specific device names for serial ports (hence the need to manually specify device name like above), So, I just changed my udev rule to call the symbolic link /dev/ttyUSB0 (which I know will never be used for anything else). -And that made it work without any funky JAVA options :slight_smile:

Hi,
I have similar problems as described above.
(Running openHAB2 on a Pi3 B+ with Aeotec gen5 Z-stick.)
I have followed several guides on how to automatically create symbolic link ( in my case: /dev/ttyZstick01 ) whenever the Z-stick is connected.
This seems to work:
when I startup the Pi, the stick is associated with /dev/ttyACM0 and also /dev/ttyZstick01 -> ttyACM0 is created.
If i now disconnect and the reconnect the Z-stick, normally /dev/ttyACM1 is associated with the stick and /dev/ttyZstick01 -> ttyACM1 is created.
Thus, the automatic creation of symbolic link seems to work. But when i disconnect/reconnect the Z-stick, it stops working with openHAB… :frowning:
The only way I can make it work again is to restart the openHab server (or completely reboot the Pi).

Suggestions?

Scenario:

  1. Machine fresh from boot, the stick works fine. Thing “Aeotec Z-stick” in OH2 is configured to /dev/ttyZstick01.
  2. Disconnect and connect stick. Z-stick is now associated with /dev/ttyACM1 and symbolic link ttyZstick01 updated to -> ttyACM1. Seems fine, but Z-stick deos not work with OH2. OH2 paperUI happily says [ONLINE] for the Z-stick the whole time.
  3. Re-configure thing “Aeotec Z-stick” and assign port /dev/ttyACM1 instead. Now, Z-stick works with OH2 without problems.
  4. Re-configure thing “Aeotec Z-stick” yet again and connect it /dev/ttyZstick01 again. Now it works!

I don’t know what is going on, but it seems like OH2 does not really like the reconnection of the USB stick behind its back…

The zwave binding does not currently reconnect to a controller after it is removed and reinserted. This PR is meant to implement this functionality…

To be clear - it does NOT currently reconnect to a conntroller…

Oops… typo… fixed!

1 Like

OK, thanks for the answers!