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

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.

Rebuilt the whole system back to 2.4

@msexton187 were you able to resolve? I’m also now experiencing an Offline Bridge issue on OH2.

Tony
Search this forum for recent threads about zwave stick not going online
Search by most recent so you don’t get old stuff
What version of OH are you using?
start a new thread if your issue persists

I believe I’ve figured it out. Something has changed in the usb layer, which is preventing the stick from being allocated properly.

I did some more searching, but what I’m hitting appears to be a linux usb bug, specifically xhci_hcd where the front usb ports (secondary hub) are not registering devices properly.

In syslog I found xhci_hcd messages that indicated the stick could not be allocated.

Jul 28 13:24:24 bernzie kernel: [ 4.149310] xhci_hcd 0000:00:14.0: xHCI Host Controller
Jul 28 13:24:24 bernzie kernel: [ 4.219497] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
Jul 28 13:24:24 bernzie kernel: [ 4.321573] usb usb1-port3: couldn’t allocate usb_device

$ lsusb -tv
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/7p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub

Simply moving the stick to the rear USB port allowed it to be found and my system when back to normal.

$ lsusb -tv
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/7p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 2: Dev 3, If 0, Class=Communications, Driver=cdc_acm, 12M
ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
|__ Port 2: Dev 3, If 1, Class=CDC Data, Driver=cdc_acm, 12M
ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
|__ Port 5: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
ID 8087:07dc Intel Corp.
|__ Port 5: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
ID 8087:07dc Intel Corp.

More research is required, but I’m good for now.

Maybe this will help someone else.

Cheers!

1 Like