Zwave serial controler issues since V2.5

  • Platform information:
    • Hardware: _Raspberry PI 3 model B Plus 1.3 / 64GB Flash
    • OS: Openhabian
    • openHAB version: V2.5

Hi
Since I installed V2.5 OH constantly cycle through connecting and disconnecting my AEOTEC Z-Stick Gen5. It’s been working well for many month before.

I reset the controler, rebooted, even uninstalled/reinstalled the ZWave binding to no avail.
I made several searches on the forum but found no articles relating to that issue

Here a log snapshot with several iterations of the loop.

2019-12-19 14:08:03.682 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:03.684 [me.event.ThingUpdatedEvent] - Thing 'zwave:serial_zstick:2f3f2eed' has been updated.

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:03.689 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:03.690 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM1 does not exist to OFFLINE (BRIDGE_OFFLINE): Controller is offline

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:03.761 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized

2019-12-19 14:08:03.836 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

2019-12-19 14:08:03.840 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:15.544 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2019-12-19 14:08:15.556 [me.event.ThingUpdatedEvent] - Thing 'zwave:serial_zstick:2f3f2eed' has been updated.

2019-12-19 14:08:19.482 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from ONLINE to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:22.560 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:22.638 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:24.214 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-restdocs, openhab-binding-HP Printer Binding'

2019-12-19 14:08:35.021 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:35.349 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:35.378 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:35.381 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:08:35.484 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized

2019-12-19 14:08:35.545 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

2019-12-19 14:08:35.548 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

==> /var/log/openhab2/events.log <==

2019-12-19 14:08:46.871 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2019-12-19 14:08:46.888 [me.event.ThingUpdatedEvent] - Thing 'zwave:serial_zstick:2f3f2eed' has been updated.

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:09:14.936 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-restdocs, openhab-binding-HP Printer Binding'

==> /var/log/openhab2/events.log <==

2019-12-19 14:09:45.870 [vent.ItemStateChangedEvent] - AstroSunData_Radiation_DirectRadiation changed from 38.29049957069636 W/m² to 35.91617957316753 W/m²

2019-12-19 14:09:45.873 [vent.ItemStateChangedEvent] - AstroSunData_Radiation_TotalRadiation changed from 116.53795354565747 W/m² to 113.03996658446229 W/m²

2019-12-19 14:10:15.205 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from ONLINE to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:10:18.302 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2019-12-19 14:10:18.343 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:10:19.686 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-restdocs, openhab-binding-HP Printer Binding'

2019-12-19 14:10:29.871 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null

==> /var/log/openhab2/events.log <==

2019-12-19 14:10:30.177 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:10:30.204 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

==> /var/log/openhab2/events.log <==

2019-12-19 14:10:30.204 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:10:30.235 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized

2019-12-19 14:10:30.276 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

2019-12-19 14:10:30.277 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

==> /var/log/openhab2/events.log <==

2019-12-19 14:10:40.877 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2019-12-19 14:10:40.897 [me.event.ThingUpdatedEvent] - Thing 'zwave:serial_zstick:2f3f2eed' has been updated.

2019-12-19 14:11:15.397 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:2f3f2eed' changed from ONLINE to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==

2019-12-19 14:11:18.592 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

Can someone help?

PS: I’m not an expert in computer science, Linux etc and as such I’m seriously considering stepping over to another (home assistant) platform that is less cryptic to non IT experts and does hopefully not require hours of config resolving for every upgrade. My experience up till now is that to experiment OH is fabulous, but if I had to install a system at a friend’s or for a customer I would not go for this platform. Any thoughts on this would be appreciated.

Txs!

Look for invalid addons in addons.cfg or addons.config.
A common one is restdocs that moved from misc to ui.
The addon loader reloads all addons every minute trying to load the invalid addon.

2 Likes

Hi Bruce,
Txs for the hint. Took me a while to locate the addons.config and finally found it here “/var/lib/openhab2/config/org/openhab/addons.config”.

Here is the current content:

//action="nma"
:org.apache.felix.configadmin.revision:=L"5"
binding="HP\ Printer\ Binding,astro,denonmarantz,evohome,hue,network,openweathermap,tradfri,zigbee,hdpowerview,myq1,zwave"
misc="restdocs,openhabcloud,ruleengine,market,hueemulation"
package="expert"
service.pid="org.openhab.addons"
transformation="map,regex,xslt,exec,javascript,scale,xpath,jsonpath"
ui="classic,basic,paper,habpanel,habmin,homebuilder"
voice="googletts"

Following what you suggest, here is how I could edit the file to remove the HP printer binding I don’t use and gives errors in the log and to move restdoc to UI.

//action="nma"
:org.apache.felix.configadmin.revision:=L"5"
binding="astro,denonmarantz,evohome,hue,network,openweathermap,tradfri,zigbee,hdpowerview,myq1,zwave"
misc="openhabcloud,ruleengine,market,hueemulation"
package="expert"
service.pid="org.openhab.addons"
transformation="map,regex,xslt,exec,javascript,scale,xpath,jsonpath"
ui="restdocs,classic,basic,paper,habpanel,habmin,homebuilder"
voice="googletts"

Can you let me know whether this looks ok?

Txs!

Luc.

I think OH needs to be stopped before editing that file. I would make a backup copy, remove the addons, and install restdocs through the UI after restarting OH.

I have basically the same issue. I’m trying to get OH2.5.0 to run Z-wave on my new RPi4B 2GB. Loading the OH was easy, but it refuses to accept my Aeotec Z-Stick. The only/default port available is /dev/ttyAMA0. Same happened with OH2.5.0 on my older RPi3B+. BUT, there a second port ( /dev/ttyACM0 ) was available and saved me. This sounds like a port issue to me. Any suggestions for a solution? I have spent hours already.

Plug the stick into a USB2 hub. The stick reports itself as USB3 capable but it is not. Plugging it in through a hub works around the issue.

The fixes I always have to make for these issues are:

  • adding the serial ports to EXTRA_JAVA_OPTS
  • once your operating system is running and the stick is plugged in, issue a ls -al /dev/tty* command. You want your serial ports to look like this:

crw-rw-rw- 1 root dialout 188, 0 Jan 8 13:12 /dev/ttyUSB0

  • if they don’t show like this, issue chown root:dialout /dev/ttyXXX and chmod 666 /dev/ttyXXX, where XXX is the serial port associated with your device.

Very poor advice, security wise. That opens that port to ANYTHING on that machine, Just make sure the openhab user is part of the dialout group.

I can’t get it to work without the chmod. It works for me, I don’t have anything else on the machine my openhab is running on, so I’m fine with it. I’d spent hours trying to get this stuff to work reliably.

Thanks for the hint Bruce, but remember: RPi4B contains 2xUSB2 and 2xUSB3 ports and none of the USB2 ports accepts the Z-Stick, which is my worry. Do you know if this is a hardware issue on RPi4B or just a much needed software fix that will come, given some time? Not very font of dongles.

My understanding is the issue is in the stick itself when placed in USB3 ports. That would mean a Z-Stick fix. I seem to remember one user getting the stick to work in a USB2 port on the Pi4 . I thought it only had 1 USB2 port.

I found out from experience that USB3 cables are very sensitive to damage. I have a USB3 external drive that worked on USB2 but would not work reliably on USB3 until I replaced the cable.

Your zwave controller thing has a port definition that sometimes matches the physical port and sometimes does not as the physical port number can change if you reboot or attach/detach USB.
Don’t do that and set your thing config to match what’s current.

Pi4 has two USB2 and two USB3. And two USB-C :slight_smile:

1 Like

Thanks Marcus. Remember that OH PaperUI assigns a special USB port to the Stick when attached, and this port never change, as far as I know. On my old RPi3B+ with OH2.5.1-0 the PaperUI gave me the 2 port options /dev/ttyAMA0 and /dev/ttyACM0 where only the last one worked. On RPi4B with 2.5.1-0 the Stick is detected by PaperUI, but only the (first non working) /dev/ttyAMA0 port shows up. So, is this simply a OH2.5.0-1 port assignment issue? It prevents me/us from using RPi4B and a Z-Stick with OH 2.5.1-0, so investigation required. Any suggestions on how to proceed?

Define your ports manually using symlinks.

The UI is not doing the detecting. It is just getting the information from the OH API and showing you what is returned.

Well. When OH suggests a port there is also a driver involved and my thinking is that the two RPi3B+ ports i have seen may have different drivers, so I/we need OH PaperUI to suggest the port with the correct RPi4B USB2 driver for the Stick. Right?

No… Regarding the zwave specific, I agree there is something different. Since 2.5 (first snapshot) It has always chosen ACM0 for some reason.
But it is mainly controled by the Linux behind. So if you have other devices using the same ACM0, you´ll risc that they change port in OH.
By creating a symlink, you´ll be able to tell through OH (PaperUI) exactly what device to be use, wether or not Linux had exchanged their physical port adresse.

Thanks Kim. I have nothing else connected to RPi4B than the Z-Stick and the LAN cable so OH should suggest the correct port right away, and I feel very strongly about that. Mind you, if this does not work then the very first step in adding a z-wave device (the very controller itself) to RPi4B running OH2.5.0 fails. Not very user friendly at all, and should be fixed!! So again, how can we remove this critical obstacle? Do you know how it can be brought to the attention of the right people?

True, the PaperUI initiates the detection. Semantics.