Aeotec Z-Stick Gen5 disconnects after 3 seconds (HA OS on Unraid VM)

After an update of both Unraid and HomeAssistant my Aeotec Z-Stick Gen5 will no longer stay connected to the HA VM running on Unraid.

If I boot up the VM without any USB devices connected, and then select the Z-Stick in Unraid, HomeAssistant shows the following logs:

Jan 17 19:24:47 homeassistant kernel: usb 2-1: new full-speed USB device number 7 using uhci_hcd
Jan 17 19:24:47 homeassistant kernel: usb 2-1: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
Jan 17 19:24:47 homeassistant kernel: usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 17 19:24:47 homeassistant kernel: cdc_acm 2-1:1.0: ttyACM0: USB ACM device
Jan 17 19:24:50 homeassistant kernel: usb 2-1: USB disconnect, device number 7

As you can see the USB device is initially recognized as ttyACM0, but disconnects after 3 seconds every time. During those 3 seconds it can also be seen in the ā€œAll Hardwareā€ list with the serial path /dev/serial/by-id/usb-0658_0200-if00.

In comparison, this is what the logs look like for my working SONOFF ZigBee Dongle:

Jan 17 19:25:39 homeassistant kernel: usb 3-1: new full-speed USB device number 2 using uhci_hcd
Jan 17 19:25:39 homeassistant kernel: usb 3-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
Jan 17 19:25:39 homeassistant kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 17 19:25:39 homeassistant kernel: usb 3-1: Product: Sonoff Zigbee 3.0 USB Dongle Plus
Jan 17 19:25:39 homeassistant kernel: usb 3-1: Manufacturer: ITead
Jan 17 19:25:39 homeassistant kernel: usb 3-1: SerialNumber: 261cbfcf63c9eb118ea98d4f1d69213e
Jan 17 19:25:39 homeassistant kernel: usbcore: registered new interface driver cp210x
Jan 17 19:25:39 homeassistant kernel: usbserial: USB Serial support registered for cp210x
Jan 17 19:25:39 homeassistant kernel: cp210x 3-1:1.0: cp210x converter detected
Jan 17 19:25:39 homeassistant kernel: usb 3-1: cp210x converter now attached to ttyUSB0

I also tried passing the Z-Stick through to another random Ubuntu VM I had lying around, and it stayed connected even after 30+ seconds, with the logs looking like this:

Jan 17 20:30:58 randomvm kernel: [ 2691.512901] usb 2-2: new full-speed USB device number 2 using uhci_hcd
Jan 17 20:30:58 randomvm kernel: [ 2691.684024] usb 2-2: New USB device found, idVendor=0658, idProduct=0200, bcdDevice= 0.00
Jan 17 20:30:58 randomvm kernel: [ 2691.684030] usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 17 20:30:58 randomvm kernel: [ 2691.699414] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
Jan 17 20:30:58 randomvm kernel: [ 2691.699432] usbcore: registered new interface driver cdc_acm
Jan 17 20:30:58 randomvm kernel: [ 2691.699433] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

So I don’t think it’s a problem with my Unraid setup, as the stick can obviously stay connected to other VMs.

Other things I’ve tried that made no difference:

  • Using a direct USB port instead of an extension cable
  • Using both a 2.0 and 3.0 port
  • Passing the USB port through to the VM before boot and while it’s already running.
  • Restarting the physical Unraid server
  • Factory Resetting the Z-Stick

Thing I haven’t tried yet (cause they’d be really annoying lol)

  • Setting up a completely new HA VM
  • Installing a dedicated PCI USB card
  • Buying a new Z-Stick

Relevant versions:
HA Core: 2024.1.3
HA Supervisor: 2023.12.1
HA Operating System: 11.4
Unraid: 6.12.6

Is the ZWaveJS addon running? Maybe it doesn’t play nice with a soft reset or the watchdog?

1 Like

As mentioned, the soft reset is the problem, so just disable soft-reset in the add-on configuration. A soft-reset of a 500-series controller causes a USB reset.

My understanding is that Unraid doesn’t support hot-plugging of USB devices and VMs, so it doesn’t restore the connection to the VM after the USB reset. If you can get hot-plug working, that’s better than disabling soft-reset, otherwise just disable it.

1 Like

I don’t think this could be the issue, since my Z-Wave add-on isn’t even running. In fact it can’t be running, since it fails to start every time if the configured USB device could not be found.

The way I see it my issue should be completely independent of the Z-Wave add-on, right? Since I’m observing the 3-second disconnect without the add-on even running.

Obviously I tried disabling soft-reset and restating everything, but since I can’t get the add-on to even start I don’t think it matters.

@RickKramer

Are you sure the add-on isn’t running? Did you disable the Z-Wave integration? HA makes sure the add-on is always running.

Unraid and HomeAssistant

Sure you didn’t upgrade anything else? An upgrade of HA Core would not affect your USB devices. Possible Unraid is the problem then. Or did you also update HAOS, or the add-on?

The add-on definitely isn’t running. I’ve disabled the entire Z-Wave JS integration and got the same result.

Unraid and HomeAssistant

You’re right, I should’ve been more clear on that. When I said ā€œHomeAssistantā€ I meant literally everything. I updated Core, Supervisor and the OS, as well as all my add-ons.

This was a ~1.5 year old installation with few updates cause I’m lazy. And aside from the Z-Stick nothing broke during this big update :smiley:

There are a number of open USB issues against HAOS. If it’s not the Z-Wave JS add-on that’s the culprit (you’ll need soft-reset disabled regardless), then maybe you’re hitting one of those.

I bit the bullet over the weekend and bought the Z-Stick 7, with the assumption that it’ll behave the same and I’ll return it.

Lo and behold, it works! I had to manually change the XML USB configuration of the Unraid VM, since the new Z-Stick 7 and my old Zigbee Dongle were being assigned the exact same port by the UI, but after fixing that both devices show up properly in HA and my Z-Wave network is back up and running.

Throwing money at the problem isn’t the most satisfying solution, but I’m happy with it for now.

I’m guessing the old Z-Stick 5 isn’t actually ā€˜broken’, and is indeed hitting some kind of fixable bug, but since the new one works I’m gonna stop investigating :stuck_out_tongue: