ZWave refuses to come online. Stick offline - at a loss now

Hi,

Ive no idea why this simple task is so difficult to get working. Ubuntu system, Aeotec Stick via USB.

The controller refuses to come online!

Bridge shows as offline, yet the OS sees the stick just fine.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The port is presented to OH 2.5.12 as /dev/ttyUSB-ZStick

The /etc/default/openhab2 file has:

EXTRA_JAVA_OPTS="-Duser.timezone=Australia/Sydney -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB-ZStick"

Along with a USB serial rule for udev

SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ttyUSB-ZStick", GROUP="dialout", MODE="0666"

Like, what the actual f? Why is this so god damn hard. Rebooted 45 times, cleared the cache, etc etc.

So close to just moving to a Fibaro Home Centre, these Aeotec things are just junk it appears.

On top of your entry I also have

-Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar

in EXTRA_JAVA_OPTS using an older Ubuntu version on a cubietruck.
The package librxtx-java need to be installed for this.

Apparently you set up some sort of alias for the real device generated by the OS. I never do that but have heard of issues by those who choose to do so.

On my setup it can take up to 5/10 minutes before it comes online… still not sure why.

Did you try a other usb port? Usb 2/3 issue? Ive had an issue with a meteostick that was detected but did not work until i added a usb hub.

Is openhab allowed to read/write the actual device? /dev/ttyusb-zstick is just a symlink

Some Aeotec sticks did not work properly on usb3 ports without a usb2 hub inline. They fixed the issue with the latest models.

I have not had good luck using symlinks with the z-stick. You might want to try using the actual device name

  1. Change the JAVA_EXTRA_OPTS serialPorts to /dev/ttyUSB1 (or whatever device is actually assigned to the z-stick) instead of /dev/ttyUSB-ZSTICK
  2. Remove the SYMLINK from the udev file
  3. Ensure that the user that OpenHAB is running under is in the dialout group.

Hi All

The stick is direct into a port, ill check if its USB2 or 3, but will revert to USB2 if its a later port.

I have tried without a Symlink and with, maybe 5-10 times.

I have not tried this -

-Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar

Is that required in Ubuntu 18 LTS?

When you say can OH write to the stick? I’ve got the OH user a member of the dialout/tty if this is what you mean?

Thanks

The older Aeotec sticks do not revert to usb2 in a usb3 port. The port thinks it is a usb3 device.

Fair enough, Ill double check that now and move it if its in USB3

EDIT: Yes, it was in a USB3. Will update with how it goes in USB2

1 Like

The newest version of the stick is only sold directly by aeotec.

Same issue, stick offline

Dont you need to create the udev rule to be abhle to reference the stick by another name such as /dev/ttyUSB1?

I never have seen the need to use another name here or on my years of UNIX and Linux experience.

No, you dont need udev. /dev/ttyUSBx is assigned by the driver/kernel. udev creates a symlink based on the serialnumber and some other properties.

ls -l /dev/tty* should show you the symlinks:

.........
crw--w---- 1 root tty       4,  9 Mar 21 20:13 /dev/tty9
crw-rw---- 1 root dialout 204, 64 Apr 12 10:06 /dev/ttyAMA0
lrwxrwxrwx 1 root root          7 Mar 21 20:13 /dev/ttyMeteostick -> ttyUSB3
lrwxrwxrwx 1 root root          7 Mar 21 20:13 /dev/ttyP1 -> ttyUSB2
crw------- 1 root root      5,  3 Mar 21 20:13 /dev/ttyprintk
lrwxrwxrwx 1 root root          7 Mar 21 20:13 /dev/ttyRFXCOM -> ttyUSB1
crw-rw---- 1 root dialout   4, 64 Mar 21 20:13 /dev/ttyS0
crw-rw---- 1 root dialout 188,  0 Apr 12 10:06 /dev/ttyUSB0
crw-rw---- 1 root dialout 188,  1 Apr 12 06:32 /dev/ttyUSB1
crw-rw---- 1 root dialout 188,  2 Mar 21 20:13 /dev/ttyUSB2
crw-rw---- 1 root dialout 188,  3 Mar 21 20:14 /dev/ttyUSB3
lrwxrwxrwx 1 root root          7 Mar 21 20:13 /dev/ttyZigbee -> ttyUSB0
[10:06:36] root@openhab:/home/openhabian#

the advantage of udev rules is that the device name will always be the same. A ttyUSB0 device could theoretically be ttyUSB1 after a reboot if there are more usb devices plugged in.

The command dmesg | grep tty should show the serial devices currently recognized by the OS.

Cool, so just reference the OS name in the OH2 configuration - got it. I’ll give it a go

Thanks gents

1 Like

Got it to come up… then it didnt take long before it went down again. Looks like a binding error

@chris

chris.txt (76.0 KB)

Restart the system, bridge is offline. again!

The error is coming from the serial driver - in the past when I’ve seen this it is caused by some sort of exception at OS level. I’ve no idea what OS you have - there were some issues like this with certain versions of Windows and certain Java VMs (there is a thread somewhere about this). If you have Windows, and are using Java 8, this might be the issue - if you’re using OH3, then it’s probably not a problem as it uses Java 11, and if you’re using Linux then that won’t be the issue either (but it’s still an OS exception).

1 Like

Using Ubuntu 18 LTS. Will look into the serial issue - thanks Chris

1 Like

@dastrix80, did you ever get your problem resolved? If so, I’m curious how as I’m facing a similar issue.