ZWave controller won't initialise

Hi

I am new to openhab2 and trying to do a basic setup with Zwave, but I cannot get the controller to work. I created the binding. I have tried 2 ports, but cannot get any to work: “/dev/ttyUSB-ZME-Sigma” and “/dev/ttyACM0”

2016-10-25 20:48:19.503 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2016-10-25 20:48:20.131 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2016-10-25 20:48:20.685 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
2016-10-25 20:48:21.058 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-10-25 20:48:26.417 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0’
2016-10-25 20:50:03.995 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.029 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2016-10-25 20:50:04.031 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.032 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.033 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.034 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.035 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.036 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
2016-10-25 20:50:04.199 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2016-10-25 20:50:04.202 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyUSB-ZME-Sigma’

ls -l /dev/tty* gives me:

crw-rw---- 1 root dialout 166, 0 Oct 25 20:37 /dev/ttyACM0
crw–w---- 1 root tty 204, 64 Oct 25 20:37 /dev/ttyAMA0
crw------- 1 root root 5, 3 Oct 25 20:37 /dev/ttyprintk
lrwxrwxrwx 1 root root 7 Oct 25 20:37 /dev/ttyUSB-ZME-Sigma -> ttyACM0

I have also tried adding:

-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB-ZME-Sigma \

to the config /usr/share/openhab2/runtime/karaf/bin/setenv but it did not help.

Can anyone give some pointers? @chris?

I suspect there’s an error opening the port, but you probably already guessed that ;). Somewhere though, there should be an error printed, but it might only happen with debug logging enabled. When the error occurs, the binding sets the status to OFFLINE, and also passes a reason. The framework should log this somewhere…

If the port had opened correctly, then there would have been an INFO level message logged Serial port is initialized which I don’t see…

Hi @chris

Thanks for the reply. It seems I cant get my port to open. Not sure what I have done wrong. After increasing the log level I get this:

19:39:58.775 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update received
19:39:58.818 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
19:39:58.820 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Initializing ZWave serial controller.
19:39:58.821 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Initializing ZWave Controller.
19:39:58.822 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_softreset to 0
19:39:58.824 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.825 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update security_networkkey to 34 F5 4B F9 55 DB 13 36 3A 97 13 06 AD 18 6F 07
19:39:58.826 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyUSB-ZME-Sigma’
19:39:58.827 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
19:39:58.829 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update security_inclusionmode to 0
19:39:58.830 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_suc to false
19:39:58.836 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.843 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_sync to 0
19:39:58.843 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:2edd90cd’ changed from OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyUSB-ZME-Sigma does not exist to OFFLINE (BRIDGE_OFFLINE): Controller is offline
19:39:58.844 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.846 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update port to /dev/ttyUSB0
19:39:58.847 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_master to true
19:39:58.848 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.849 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update inclusion_mode to 2
19:39:58.851 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update heal_time to 2
19:39:58.853 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_exclude to 0
19:39:58.857 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.862 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:serial_zstick:2edd90cd’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyUSB-ZME-Sigma does not exist
19:39:58.863 [INFO ] [smarthome.event.ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:2edd90cd’ has been updated.
19:39:58.867 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_inclusiontimeout to 30
19:39:58.869 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.871 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_hardreset to 0
19:39:58.873 [WARN ] [zwave.handler.ZWaveControllerHandler] - Trying to send controller command, but controller is not initialised
19:39:58.968 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

I guess it just confirms what you said.

I have tried binding to ttyUSB0 and ttyACM0 but with the same result.

Doing a “lsusb -v” finds the USB device

Bus 001 Device 008: ID 0658:0200 Sigma Designs, Inc.
Couldn’t open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0658 Sigma Designs, Inc.
idProduct 0x0200
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:

Any hints on where to look next?

I followed this to make the USB port assigned to the stick after reboots persistent as I had some problems on other home automation systems. Maybe that was my mistake?
https://www.domoticz.com/wiki/PersistentUSBDevices

Hi @chris

I found this thread:

And here you suggest starting manually using the root user. I did that and changed the binding back to ttyACM0 and suddenly it says “online” … Yeah baby!

2 quick questions:

#1
How to make this run as a service with root privileges? I tried adding the dialout group as suggested in the linked thread, but it did not work

#2
I got some java.io.IOException: Broken pipe and some org.eclipse.jetty.io.EofException in the console when using the .start.sh. I have attached the console out. Could you do a quick check for me, just make sure that I am running a “healthy” system and that these errors are expected.

I would like to say that my system is just setup and my zwave stick is brand new (no devices added yet).
log.xml (185.5 KB)

Thank you for your help so far.