Aeotec Z-wave stick on Synology/docker Goes offline every few days

Hi,
I,m running Openhab 3 in a docker container on Synology. I have an aeotec z-wave stick connected to the Synology. I Made the Synology run a script at startup to give docker Root Access to the serial ports. Synology does an autoreboot every nicht. Z-wave stick is found and works fine. But every few days Z-wave stick suddenly Goes offline. The only way to fix the issue is giving the Synology a reboot. Anyone an idea?

Maybe a hint here:

That is not the issue. It works, and then suddenly stops working. I found out that re-running the script to enable Access to serial USB followed by restarting docker container fixes the problem. Somehow at a sudden moment docker/Openhab looses the permission to Access the usb serial Port.

I don’t have any experience with the docker setup and requirements, but

can be tough on OH if sudden. Do you stop OH before the reboot?

Assuming this is well after startup to eliminate the lock problem, is there a dmesg with docker that gives any clues about the serial port being dropped?. Also anything in the OH logs? The zwave debug logs get long quickly (especially with a startup), so are not likely to help catch a rare event, but could be worth a try as a last resort.

edit: One suspicious log entry around the time of failure might be:
2023-06-13 16:37:33.745 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null

That would indicate the zwave binding is trying to restart.

Yes indeed, the problem occurs wel after startup. I’m not sure What dmesg means. I checked the Openhab container logs on docker, and the docker logs. I did not find any zwave or serial error. I know let docker stop, run the USB serial authorisation script and then start docker Again.

Not much to go on. It sounds to me like there is a problem with the connections between the Z-stick and server/container. If the zstick suddenly disappears there will not be any OH or zwave binding error. If the loss was temporary the INFO message I noted above would appear upon reconnection (however the lock issue noted above would likely prevent an automatic restart from working with this type of failure). What else is USB-connected to the server? Did some other docker app suck up memory or power? Some versions of the Aeotec stick have had problems with Rpi4. It should be in a USB2 slot. Don’t know what else to suggest.

dmesg is run on the linux server command line and would show if any usb had a connection problem. I recently did some maintenance on my zstick, so I stopped the binding, took out the stick and put it back about 2 minutes later. Here is the dmesg for that time.

[6738129.666832] usb 1-1.3.1: USB disconnect, device number 4
[6738129.667258] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[6738129.667724] cp210x 1-1.3.1:1.0: device disconnected
[6738345.144018] usb 1-1.3.1: new full-speed USB device number 5 using xhci_hcd
[6738345.275328] usb 1-1.3.1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[6738345.275362] usb 1-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[6738345.275380] usb 1-1.3.1: Product: Zooz_ZST10_700_Z-Wave_Stick
[6738345.275395] usb 1-1.3.1: Manufacturer: Silicon Labs
[6738345.275409] usb 1-1.3.1: SerialNumber: 928c2438ac21ec11a9e3be942c86906c
[6738345.280262] cp210x 1-1.3.1:1.0: cp210x converter detected
[6738345.289527] usb 1-1.3.1: cp210x converter now attached to ttyUSB0

I have the same setup as @Idolaat (Synology/Docker/Z-stick Gen 5/openHAB 3.4) but do not have this issue. Since rerunning the boot script and restarting the container resolves the issue it seems to me it is some sort of a USB connection issue – if I unplug my z-stick and plug it back in the device assignment changes from ACM0 to ACM1 and I need to rerun the boot script and restart the container to move the z-stick back to ACM0. Perhaps you are experiencing some sort of instantaneous power issue that caused the z-stick to reconnect but is not significant enough to cause the NAS to restart. Is the Synology on a UPS?

Some things you could try:
Move the z-stick to a different USB port.
If the z-stick is plugged into a USB extension cord try a different cord.

If you putty into the NAS and enter ls /dev/ttyACM* it will list the device name the z-stick is plugged into. That will probably be /dev/ttyACM0. I suspect that if you run the ls command again when the issue is occurring the z-stick will be assigned to /dev/ttyACM1.

DSM 7.1.1-42962 Update 6
Docker 20.10.391308
OpenHAB 3.4.2 Release Build

1 Like