Z-Wave binding from 2.5.1 - 2.5.9 cause periodic reset of all devices connected through USB

Hi,
Im foacing an issue with Z-Wave Binding. I have 4 years system working on 2.4.x. Upgrade to 2.5.0.x work as expected. From 2.5.1.x to 2.5.9 after enable Z-Wave Binding 2.5.x and add Z-Wave controller via Paper UI all my devices connected via serial USB are periodically reseted. I have a smart home with number of Arduino Mega connected through powered hub to RPi 3 B+

HW: RPi 3 B+
OpenHAB: 2.5.1.x - 2.5.9
Binding: Z-Wave 2.5.x
Controller: Z-Wave.Me USB Smart Home Stick

Behaviour: All Arduino’s boards connected via USB are periodically resets in interval 15 - 30 seconds. After disable Z-Wave Controller Thing all works as expected.

Im not able to get any logs via karaf console. Standard log shows only disconnecting of MQTT clients -> Arduinos.

Thank you for any hints to solve this issue and update OpenHAB to newest revision.

Regards,

Majkee

My production system has been running 2.5.2 ever since it was released with no Z-Wave resets.

You are likely overloading the limited resources of the Pi. It is not recommended that much run on it other than openHAB.

I have production system with 9x and another with 4x Arduino Mega on 2.4.x for years. With 2.5.1 and higher revision, Im able to reproduce with only one board connected. This is really strange and Im not able to find which kind of log can describe this behavior with serial port. Should goes from OpenHAB because disabling Thing Z-Wave controller fixed situation immediately.

Was the Thing defined through a text file or through the UI? Each version of OH seems to be more resource hungry. What worked years ago may not work with 2.5.x.

There have also been some misbehaving bindings but I do not recall any issues with Z-Wave

I’d start with the syslog and particularly pay attention to what the kernel is doing. I don’t really see how openHAB could be having any direct impact on this. As far as OH is concerned, at least on Linux, a serial device is just a file. It opens and reads and writes to it just like any file. The OS does some extra work by locking the file so it can’t be opened for writing by more than one program at a time and stuff like that. So openHAB can’t actually do anything directly to cause serial devices it’s not even trying to connect to to reset.

However, the kernel could. There could be something going wrong or weird with the USB hub or perhaps the Zwave controller that is causing the kernel to run into trouble and need to reset all the serial devices. I would hope to see evidence of that occurring in the syslog.

1 Like

While I’m unsure that the logs will help (they may just show a serial error or something) you really should get the debug logs as there could well be important information in them. I don’t really understand why you can’t get logs, and if logging also isn’t working for the ZWave binding etc, then maybe that is also indicative of a wider issue.

Please can you tell us why you can’t enable logging? If I understand correctly, the JVM isn’t crashing, so I assume console works, and in this case logging should work shouldn’t it?

1 Like

Have a look in your events.log for ‘Thing updated’ messages, relating to your controller stick.

Thank you for hints,
I recheked on clear installation 2.5.9 on Debian 10. No logs regarding serial/Z-Wawe under /var/log, either under /var/log/openhab2. Last events.log contains:

2020-11-05 22:54:35.704 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:ac6c6e88’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2020-11-05 22:54:35.742 [me.event.ThingUpdatedEvent] - Thing ‘zwave:serial_zstick:ac6c5e88’ has been updated.

2020-11-05 22:54:35.754 [me.event.ThingUpdatedEvent] - Thing ‘zwave:serial_zstick:ac6c5e88’ has been updated.

I can only check mosquitto.log where Arduino client reconnecting every ~ 20 seconds:

1604613393: New client connected from 10.0.0.231 as arduino_A1 (c1, k15, u’openhabian’).
1604613423: Socket error on client arduino_A1, disconnecting.
1604613423: New connection from 10.0.0.231 on port 1883.
1604613423: New client connected from 10.0.0.231 as arduino_A1 (c1, k15, u’openhabian’).
1604613453: Socket error on client arduino_A1, disconnecting.
1604613453: New connection from 10.0.0.231 on port 1883.
1604613453: New client connected from 10.0.0.231 as arduino_A1 (c1, k15, u’openhabian’).
1604613483: Socket error on client arduino_A1, disconnecting.
1604613483: New connection from 10.0.0.231 on port 1883.
1604613483: New client connected from 10.0.0.231 as arduino_A1 (c1, k15, u’openhabian’).
1604613513: Socket error on client arduino_A1, disconnecting.

I already did under console:

log:set DEBUG org.openhab.binding.zwave

but openhab2.log does not get any updates.

Test environment is simple. Clear 2.5.9 on Debian 10, RPi 3 B+, USB SSD boot, Z-Wave USB Controller ZMEEUZBB, Arduino Mega via USB. Arduino reconnecting every 20 seconds. Disable Z-Wave Controller thing solve problem immediately.

PS: When I edit Z-Wave controller to choose path, Arduino gets disconnected in same way. This is normal I guess and it was presented in previous revisions… But from 2.5.1 - 2.5.9 after choosing right /dev/path, all devices still reconnecting every 20 sec.

image

Thank you for your time guys.

If you upgraded at some time from before 2.5.0 there may be an invalid addon in the configuration causing all addons to reload every minute, trying to load the invalid one. Check addons.config down in the userdata tree.

Hi,
Im tested new clear installation with only few bindings: MQTT, Z-Wave and have same issue. This should eliminated history. I can easily reproduce issue clicking to “Edit” button on Z-Wave Serial Controller


After clicking to edit all my Arduino’s are retested via serial USB connected to Pi. This is relatively dangerous but I can live with it.
Issue from 2.5.1. cause periodic disconnecting of this type. Maybe is something connected with hardware type - RPi 3 B+ but I don know how to debug whats happening on serial port.

Majkee

Did you import your old Things?
Try deleting your “2.4” controller stick Thing. Create a new Thing under the new binding version - make sure to use the same UID, and it will hook up with your other Things.

I tried clean new installation of 2.5.9 on RPi 3B+. Im still able to reproduce issue and still don’t know why this happend. I will try to do same on RPi 4 or change SSD USB to SD card to diagnostic.

Unfortunatelly I can’t catch this behaviour under any log.