Zwave controller offline after upgrade to Ubuntu Bionic - ZWave product zwave:device has no references!

Hi

Upgraded my OpenHAB 2.5 Ubuntu VM from 16.04 to 18.04 and seems to have lost connection to my Aeotec Zwave stick:

Jan  6 07:03:47 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] ZWave discovery: Deactivate zwave:serial_zstick:bdf1dc95
Jan  6 07:05:19 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] Creating ZWave discovery service for zwave:serial_zstick:bdf1dc95 with scan time of 60
Jan  6 07:05:19 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] ZWave discovery: Active zwave:serial_zstick:bdf1dc95
Jan  6 07:05:19 openhab zwave [INFO ] [zwave.handler.ZWaveControllerHandler] Attempting to add listener when controller is null
Jan  6 07:05:19 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] Initializing ZWave serial controller.
Jan  6 07:05:19 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Initializing ZWave Controller zwave:serial_zstick:bdf1dc95.
Jan  6 07:05:19 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Scheduling network mesh heal for 19 hours time.
Jan  6 07:05:19 openhab zwave [INFO ] [ing.zwave.handler.ZWaveSerialHandler] Connecting to serial port '/dev/ttyACM0'
Jan  6 07:05:19 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] Starting receive thread
Jan  6 07:05:19 openhab zwave [INFO ] [ing.zwave.handler.ZWaveSerialHandler] Serial port is initialized
Jan  6 07:05:19 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Initialising ZWave controller
Jan  6 07:05:19 openhab zwave [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] Starting ZWave thread: Receive
Jan  6 07:05:19 openhab zwave [INFO ] [ve.internal.protocol.ZWaveController] Starting ZWave controller
Jan  6 07:05:19 openhab zwave [INFO ] [ve.internal.protocol.ZWaveController] ZWave timeout is set to 5000ms. Soft reset is false.
Jan  6 07:05:19 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] ZWaveReceiveThread queue empty
Jan  6 07:05:19 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] Transaction SendNextMessage 0 out at start. Holdoff false.
Jan  6 07:05:19 openhab zwave [DEBUG] [ve.internal.protocol.ZWaveController] Event listener added.
Jan  6 07:05:19 openhab zwave [DEBUG] [ve.internal.protocol.ZWaveController] Event listener added.
Jan  6 07:05:22 openhab zwave [DEBUG] [.ZWaveController$InitializeDelayTask] Initialising network
Jan  6 07:05:22 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] NODE 255: Added 0 to queue - size 1
Jan  6 07:05:22 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] Transaction SendNextMessage 0 out at start. Holdoff false.
Jan  6 07:05:22 openhab zwave [DEBUG] [wave.internal.protocol.SerialMessage] Assembled message buffer = 01 03 00 15 E9 
Jan  6 07:05:22 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] NODE 255: Sending REQUEST Message = 01 03 00 15 E9 
Jan  6 07:06:26 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] ZWave discovery: Deactivate zwave:serial_zstick:bdf1dc95
Jan  6 07:06:31 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] Creating ZWave discovery service for zwave:serial_zstick:bdf1dc95 with scan time of 60
Jan  6 07:06:31 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] ZWave discovery: Active zwave:serial_zstick:bdf1dc95
Jan  6 07:06:31 openhab zwave [INFO ] [zwave.handler.ZWaveControllerHandler] Attempting to add listener when controller is null
Jan  6 07:06:31 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] Initializing ZWave serial controller.
Jan  6 07:06:31 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Initializing ZWave Controller zwave:serial_zstick:bdf1dc95.
Jan  6 07:06:31 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Scheduling network mesh heal for 19 hours time.
Jan  6 07:06:31 openhab zwave [INFO ] [ing.zwave.handler.ZWaveSerialHandler] Connecting to serial port '/dev/ttyACM0'
Jan  6 07:06:35 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:device has no references!
Jan  6 07:06:35 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:serial_zstick has no references!
Jan  6 07:06:37 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:device has no references!
Jan  6 07:06:37 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:serial_zstick has no references!

Misc debug info:

root@openhab:~# lsof /dev/ttyACM0 
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    17326 openhab   73u   CHR  166,0      0t0  433 /dev/ttyACM0
root@openhab:~# ls -l /dev/ttyACM0 
crw-rw---- 1 root dialout 166, 0 Jan  6 07:05 /dev/ttyACM0
root@openhab:~# members dialout
openhab
openhab> bundle:list | grep ZW                                                                                                                               
308 │ Active │  80 │ 2.5.0                   │ openHAB Add-ons :: Bundles :: ZWave Binding
openhab> bundle:list | grep serial
213 │ Active │  80 │ 3.15.0.OH2              │ nrjavaserial

If I restart just the zwave bundle I get the following error in PaperUI for the Zwave serial controller:

Status: OFFLINE - COMMUNICATION_ERROR Serial Error: Port /dev/ttyACM0 is in use

I also tried to remove the Zwave serial controller but upon re-adding it through PaperUI there were no available ports in the dropdown.

I’ve re-created the controller through a things file and back to scratch with:

Status: OFFLINE - BRIDGE_OFFLINE Controller is offline

Also:

root@openhab:/etc/openhab2/things# grep ACM /etc/default/openhab2 
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

After a reboot, now with the thing file instead of adding the controller through PaperUI:

"
No bridgeUID found in getConfigDescription thing:zwave:serial_zstick:controller

"

Jan  6 08:08:57 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] Creating ZWave discovery service for zwave:serial_zstick:controller with scan time of 60
Jan  6 08:08:57 openhab zwave [DEBUG] [wave.discovery.ZWaveDiscoveryService] ZWave discovery: Active zwave:serial_zstick:controller
Jan  6 08:08:57 openhab zwave [INFO ] [zwave.handler.ZWaveControllerHandler] Attempting to add listener when controller is null
Jan  6 08:08:57 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] Initializing ZWave serial controller.
Jan  6 08:08:57 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Initializing ZWave Controller zwave:serial_zstick:controller.
Jan  6 08:08:57 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] No network key set by user - using random value.
Jan  6 08:08:57 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Scheduling network mesh heal for 18 hours time.
Jan  6 08:08:57 openhab zwave [INFO ] [ing.zwave.handler.ZWaveSerialHandler] Connecting to serial port '/dev/ttyACM0'
Jan  6 08:08:57 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] Starting receive thread
Jan  6 08:08:57 openhab zwave [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] Starting ZWave thread: Receive
Jan  6 08:08:57 openhab zwave [INFO ] [ing.zwave.handler.ZWaveSerialHandler] Serial port is initialized
Jan  6 08:08:57 openhab zwave [DEBUG] [zwave.handler.ZWaveControllerHandler] Initialising ZWave controller
Jan  6 08:08:57 openhab zwave [INFO ] [ve.internal.protocol.ZWaveController] Starting ZWave controller
Jan  6 08:08:57 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] ZWaveReceiveThread queue empty
Jan  6 08:08:57 openhab zwave [INFO ] [ve.internal.protocol.ZWaveController] ZWave timeout is set to 5000ms. Soft reset is false.
Jan  6 08:08:57 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] Transaction SendNextMessage 0 out at start. Holdoff false.
Jan  6 08:08:57 openhab zwave [DEBUG] [ve.internal.protocol.ZWaveController] Event listener added.
Jan  6 08:08:57 openhab zwave [DEBUG] [ve.internal.protocol.ZWaveController] Event listener added.
Jan  6 08:09:00 openhab zwave [DEBUG] [.ZWaveController$InitializeDelayTask] Initialising network
Jan  6 08:09:01 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] NODE 255: Added 0 to queue - size 1
Jan  6 08:09:01 openhab zwave [DEBUG] [nal.protocol.ZWaveTransactionManager] Transaction SendNextMessage 0 out at start. Holdoff false.
Jan  6 08:09:01 openhab zwave [DEBUG] [wave.internal.protocol.SerialMessage] Assembled message buffer = 01 03 00 15 E9 
Jan  6 08:09:01 openhab zwave [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] NODE 255: Sending REQUEST Message = 01 03 00 15 E9 
Jan  6 08:09:42 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] No bridgeUID found in getConfigDescription thing:zwave:serial_zstick:controller
Jan  6 08:17:58 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:device has no references!
Jan  6 08:17:58 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:serial_zstick has no references!
Jan  6 08:18:00 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:device has no references!
Jan  6 08:18:00 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] ZWave product zwave:serial_zstick has no references!
Jan  6 08:18:06 openhab zwave [DEBUG] [g.zwave.internal.ZWaveConfigProvider] No bridgeUID found in getConfigDescription thing:zwave:serial_zstick:controller

Suggestions?

Thanks,

Torkil

Did you try rebooting the syst? Perhaps OH was not cleanly shutdown before the update.

Aye, I’ve rebooted a number of times, no dice.

I’m still stuck with no available devices in the serial port selector drop down on the configuration page of the Zwave Serial Controller.

Mvh.

Torkil

Try adding a UDEV rule, even if only using one port, for the serial port and add openhab to tty group then restart OH.

Here is a tutorial that may help:

That should no longer be needed for Z-Wave

The install process should have already put the openhab user in that group but it is worth checking, after upgrade. I think it also needs the dialout group…

In my professional opinion the symlinks can add unneeded complexity, especially when trying to initially get the system working.

I noticed dialout was added in first post but did not see tty.

1 Like

Here is something from one of my fresh openHABian installs. You can ignore the pi user.

type sudo grep openhab /etc/group to verify group memberships. Here is my results.

tty:x:5:openhab,pi
dialout:x:20:pi,openhab
audio:x:29:pi,openhab
bluetooth:x:112:openhab,pi
gpio:x:997:pi,openhab
openhab:x:115:pi
1 Like

Using openhabian-config tool takes care of all this for you. :smiley: Wish there was a way to have this with all openhab installs.

All Linux users can install the openHABian scripts. In fact that is my preferred way if installing in Linux because I am L-A-Z-Y.

openHABian also supports general Debian/Ubuntu based systems on different platforms. Starting with a fresh installation of your operating system, install git, then clone the openHABian project and finally execute the openHABian configuration tool:

1 Like

What I should have said was I wish all users would use openhabian. :laughing:

1 Like

I wonder if Docker would be a better solution for more consistent, cross-platform support.
I have not yet tried OH with Docker.

Already a member of tty, unfortunately. Hrmpf.

Mvh.

Torkil

Let’s verify where the controller is. Type sudo dmesg | grep tty and post the output, please.


root@openhab:~# dmesg -T | grep tty
[Mon Jan  6 13:55:40 2020] console [tty0] enabled
[Mon Jan  6 13:55:42 2020] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[Mon Jan  6 13:55:48 2020] cdc_acm 4-2:1.0: ttyACM0: USB ACM device
[Mon Jan  6 15:36:44 2020] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
root@openhab:~# ls -l /dev/ttyA*
crw-rw---- 1 root dialout 166, 0 Jan  6 15:36 /dev/ttyACM0
root@openhab:~#

It’s om dmesg twice because I tried unplugging it to see if that did anything.

Mvh.

Torkil

1 Like

Suddenly I could select the serial port in the dropdown in PaperUI, which promptly crashed the box when I pressed save, but now all my devices are discovered again and sit in the inbox ponder

Thanks for the suggestions.

Mvh

Torkil

Duplicate ports somehow.

Mvh.

Torkil