Z-Stick Gen5 disappears from VM on DSM7

AEON Labs ZW090 (Z-Stick Gen5)
Synology DS916+
DSM 7.0-41890
VMM 2021-07-13
HASS OS 6.2
HASS core-2021.8.8
HASS supervisor-2021.06.8

After running HASS on DSM7 for almost 2 months without any isssue whatsoever on the ZWave front, over the last 24h I’ve had 2 exactly identical incidents where my zwave stick suddenly disappears/dismounts from VMM.

This is what I see when I open the edit window on the running VM:

imagem

and this is what was supposed to be there (it was there when the VM started):

imagem

The only logs I have are on HASS side on Z-Wave add-on that stated something like “Error in driver ZWaveError: The serial port closed unexpectedly.”.

By the way, side question: the log is far too long now with many events after the hour when it gave the error and I can’t rollback to that specific message. Is there any way via bash on the container or whatever method to get the full log and not just the tail of it as it appears on HASS gui?

I have searched the logs on DSM7 gui as well and can’t find anything, neither at the VMM log nor at the DSM log itself, so I’m baffled with this.

Does anyone here have a clue of what might be happening?
Is there any log hidden in the HASS operating system, Synology operating system, or VM internal logs that might help diagnose what is going on?

I’ll restart the VM this time with USB 2.0 instead of 3.0, although this is silly, using 3.0 never was a problem till now, most certainly it won’t help.

Any help from Linux/Synology expert users would be very welcome on this.

p.s. - I might have a defective stick, but that is so unlikely I prefer to dwell into the software part.

TIA,
-jprates

1 Like

It just happened again.
Any help/idea would be greatly appreciated.

And again…

2021-09-06T17:12:14.240Z DRIVER   Serial port errored: The serial port closed unexpectedly!
Error in driver ZWaveError: The serial port closed unexpectedly!
    at SerialPort.<anonymous> (/usr/src/node_modules/@zwave-js/serial/src/ZWaveSerialPort.ts:39:10)
    at SerialPort.emit (events.js:400:28)
    at SerialPort.emit (domain.js:470:12)
    at binding.close.then.closing (/usr/src/node_modules/@serialport/stream/lib/index.js:435:12) {
  code: 5,
  context: undefined,
  transactionSource: undefined
}
Z-Wave error ZWaveError: The driver is not ready or has been destroyed
    at Driver.ensureReady (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:1518:10)
    at Driver.sendMessage (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:2581:8)
    at Driver.sendCommand (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:2787:28)
    at Driver.sendSupervisedCommand (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:2848:27)
    at Driver.trySendCommandSupervised (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:2880:16)
    at MultilevelSwitchCCAPI.set (/usr/src/node_modules/zwave-js/src/lib/commandclass/MultilevelSwitchCC.ts:173:47)
    at Proxy.MultilevelSwitchCCAPI.<computed> (/usr/src/node_modules/zwave-js/src/lib/commandclass/MultilevelSwitchCC.ts:323:33)
    at ZWaveNode.setValue (/usr/src/node_modules/zwave-js/src/lib/node/Node.ts:798:14)
    at Function.handle (/usr/src/node_modules/@zwave-js/server/dist/lib/node/message_handler.js:19:44)
    at Object.node (/usr/src/node_modules/@zwave-js/server/dist/lib/server.js:38:91) {
  code: 8,
  context: undefined,
  transactionSource: undefined
}

Am I the only unfortunate guy running DSM 7 and Z-Stick 5 having this issue?

Are all other DSM 7 users with this stick running flawlessly?

Hi, I am running the Aeotech Z-Stick gen 5 but still on DSM 6.2 so can’t really comment on your specific problem, I am however interested to see you find a solution as I would like to move to DSM 7. My VMM “Others” settings are the same as yours except that I also have a Zigbee CC2531 as an additional USB device.

One thing that did occur to me was to ask what happens to the state of the Zwavejs add-on in Supervisor when the problem occurs? Does the add-on stop in which case is the Watchdog switched to on to enable an automatic restart if a crash occurs?

Also, zwavejs has just been updated to 0.1.38 so there is a faint possibility that may help.

Failing that you could try logging your problem with the Developers here:

The moment JS driver fails because the stick device is unmounted from the VMM side, there is nothing HASS can do, either integration or add-on wise.

This has nothing to do with HASS, please read the problem description.
The underlying host VMM takes away the USB device from the VM by dismounting it, hence HASS looses it, it just disappears from VM HASS OS - HASS can do nothing about it.

Hi, did you manage to get anywhere with this problem and is it still occurring?

Hi,

I was precisely to come here this weekend and share some good news, or so it seems to be the case.

During the last 2 weeks I’ve been exchanging messages with Synology Support, and managed to get up to the Product Management team. I also contacted AEOTEC support to make sure I was not asking for something from Synology I shouldn’t or needed to.

From Synology they first gave me the reasoning behind the step back on device support, that I won’t go into details here, mainly to do with security and OEM support for all those devices.

From AEOTEC they confirmed that the only thing we need on Linux based operating systems is the package cdc-acm.ko and nothing else:

The primary module that you need is the cdc-acm.ko from kernet. USBSerial and ftdi-sio are unnecessary for Z-Stick Gen5 connection.

I had read here in this forum that some people couldn’t even see the stick on VMM and they needed to run these commands to install 3 packages upon system boot:

modprobe usbserial
modprobe ftdi_sio
modprobe cdc-acm

Although I could see it, and Synology said I shouln’t need them if I was to run the stick on VMM, I decided to give it a try and include them on my host system startup (DS916+).

The system log messages when recognizing the stick are now different, no more errors logged as before, and so far the stick has been running flawless, notice the specific cdc-acm messages:

[Thu Sep  9 19:02:31 2021] usb 3-2.4: new full-speed USB device number 6 using etxhci_hcd-170202
[Thu Sep  9 19:02:31 2021] Got empty serial number. Generate serial number from product.
[Thu Sep  9 19:02:31 2021] cdc_acm 3-2.4:1.0: This device cannot do calls on its own. It is not a modem.
[Thu Sep  9 19:02:31 2021] cdc_acm 3-2.4:1.0: ttyACM0: USB ACM device

Based on my experience and of others recommending the above commands, Synology said I should create a task on task manager to run on boot with these commands:

/sbin/modprobe usbserial
/sbin/modprobe ftdi_sio
/sbin/modprobe cdc-acm

And the best part is that they said, and I quote them:
Currently we are not sure about the cause of the unexpected removal of the Z-Stick in DSM 7.0, but if this can be solved permanently by manually run the modprobe cdc-acm command in Task Scheduler, we’ll discuss the possibility to add it back as a system default in future DSM updates.

So it seems (at least so far) that running the modprobe cdc-acm command solves the problem, and Synology is considering putting that module back on some next minor release so that we don’t need to create a task for loading it ourselves.

Hope this info helps others here.

3 Likes

Hi, did your problem still solved ?

I think I have the same kind of issue :

  • HAOS on DSM7.1 VMM that works perfectly
  • 4 USB sticks mounted and connected (Conbee 2, Aetoec 5, RFXCom, Bluetooth)

But, once a week, the Conbee 2 stick disappears and becomes unmounted. I can fix this easely but it’s manuel, I have to go on DSM and VMM.

Questions :

  • Why does it disappear, without any apparent reason ? Electric issue with the USB Hub and one of the port ? Issue with DSM ?
  • Is there a way to do a DSM script that checks that all USB sticks are still mounted and that mounts them again ?
    Thanks for your help.
1 Like

I really don’t know what else do you want me to say, the solution to the problem was detailed above, what else do you need???

The said solution has been keeping my system stable for almost 2 months now, it’s rock solid.

Hi, just to know if it was still stable, if you don’t heard other solutions since, if you figured out the very root of the issue, etc… this kind of things.
So, I’ll try this :


Usually, these 3 lines are useful for Docker on DSM not VMM, I thought.
Thank you

Hi,

Yes, like I said it has been running stable for almost 2 months, and I can add that I even did a DSM upgrade recently to the latest minor version and the script still works fine.

For the Z-Stick the only thing we need is the cdc-acm according to AEOTEC, plus this script method was not only approved by Synology but suggested by them as well.

1 Like

Thanks for pursuing this with Synology, and getting an answer from them. I got nowhere when I tried discussing this intentional crippling of the USB ports with them.

I have yet to upgrade to DSM7, precisely because my zigbee stick might not work. I run Docker instead of VMM, but I would hope this would work for that too.

@jprates I have done the trick but Conbee 2 still continues to unmount once a week…
I have never had a problem with my other sticks. Strange, I’ll try to permut sticks on the hub.

I can’t speak for any other sticks than the AEOTEC Z-Stick Gen5, that’s the one I use and validated the solution on my own.

You might want to open a new thread on the Conbee 2 since this thread is for Z-Stick only, and thus you won’t find others with the same problem (and possibly solution for it) here.

Thnaks, you are right, I’ll open a new thread about Conbee 2.

Very very strange today, Z-Wave JS has an update. I have tried 5 times to upgrade from .45 to .46. Each time, my Aetotec Gen 5 is unmounted. When I go back to .45, I can mount again the stick.
It’s first time I have an issue with this stick.

image

There is an issue opened on Github : Update Zwave-JS to 1.46 crahing heavy HA · Issue #2252 · home-assistant/addons · GitHub

1 Like

I have the Aeotech Z-Stick and made the jump to DSM7 a couple of weeks ago after sitting on the sidelines for a while, since then Zwave has been running fine and I also went through the minor upgrade about a week ago.

So far I have not had to use the script you documented above so am unsure why some systems need it while others do not. I am running a DS918+ with 2 cores and 3MB of 8MB allocated to the HA VM. Zwave-js is at version 0.1.45 and I see that 0.1.46 has just been released today.

In Supervisor-Host-Hardware I have the following (the first item is the Zstick and the second item is my Zigbee radio):

image

Thought I would detail my experience in case it is helpful to others.

There is an issue with 0.1.46 that performs a soft reset :


That soft reset unmounts stick from VMM.

1 Like