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

**URL:** <https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299>\
**Category:** Bindings\
**Tags:** docker, aeotec, aeonzwavestick, openhab3\
**Created:** [June 16, 2023, 4:27pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299 "2023-06-16T16:27:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Idolaat](https://community.openhab.org/letter_avatar_proxy/v4/letter/i/8baadc/32.png) [@Idolaat](https://community.openhab.org/u/Idolaat)\
**Post date:** [June 16, 2023, 4:27pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/1 "2023-06-16T16:27:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Andrew\_Rowe](https://community.openhab.org/user_avatar/community.openhab.org/andrew_rowe/32/37075_2.png) [@Andrew\_Rowe](https://community.openhab.org/u/Andrew_Rowe)\
**Post date:** [June 16, 2023, 4:44pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/2 "2023-06-16T16:44:48Z")

</div>

Maybe a hint here:

> [@\[SOLVED\] OH3: zwave binding Z-Wave Serial Controller Aeotec Z-Stick Gen5 remains offline](https://community.openhab.org/t/solved-oh3-zwave-binding-z-wave-serial-controller-aeotec-z-stick-gen5-remains-offline/108182):
>
> My Aeotec Z-Wave serial controller does not work in OH3. On the same server, I installed OH2 and tested with the same settings and there it works. Below you find all the relevant information I gathered so far. If you need additional output, please advice. Platform information: Hardware: Intel® Pentium® Silver J5005 CPU @ 2.8GHz OS: CentOS Linux release 8.2.2004 (Core) # dmesg | grep tty [10.134643] cdc\_acm 1-2:1.0: ttyACM0: USB ACM device # lsusb Bus 001 Device 004: ID 0658:0200 Sigma D…

---

<div class="post-metadata">

**Author:** ![Idolaat](https://community.openhab.org/letter_avatar_proxy/v4/letter/i/8baadc/32.png) [@Idolaat](https://community.openhab.org/u/Idolaat)\
**Post date:** [June 16, 2023, 5:35pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/3 "2023-06-16T17:35:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![apella12](https://community.openhab.org/user_avatar/community.openhab.org/apella12/32/117154_2.png) [@apella12](https://community.openhab.org/u/apella12)\
**Post date:** [June 16, 2023, 8:30pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/4 "2023-06-16T20:30:45Z")

</div>

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

> [@Idolaat](#):
>
> Synology does an autoreboot every nicht

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

> [@Idolaat](#):
>
> and then suddenly stops working

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.

---

<div class="post-metadata">

**Author:** ![Idolaat](https://community.openhab.org/letter_avatar_proxy/v4/letter/i/8baadc/32.png) [@Idolaat](https://community.openhab.org/u/Idolaat)\
**Post date:** [June 18, 2023, 4:45pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/5 "2023-06-18T16:45:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![apella12](https://community.openhab.org/user_avatar/community.openhab.org/apella12/32/117154_2.png) [@apella12](https://community.openhab.org/u/apella12)\
**Post date:** [June 19, 2023, 9:22pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/6 "2023-06-19T21:22:34Z")

</div>

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.

```auto
[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

```

---

<div class="post-metadata">

**Author:** ![JimH](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@JimH](https://community.openhab.org/u/JimH)\
**Post date:** [June 20, 2023, 2:47pm UTC](https://community.openhab.org/t/aeotec-z-wave-stick-on-synology-docker-goes-offline-every-few-days/147299/7 "2023-06-20T14:47:51Z")

</div>

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
