Driver: failed to open the serial port. error: no such file or directory, cannot open /dev/serial/by-id/

Hi all,

I’m experiencing a lot of problems with my Z-Wave controller lately. I’m using a Aeotec Z-Stick 7 with Z-Wave JS. Every other day the controller crashes and gives the following error: driver: failed to open the serial port. error: no such file or directory, cannot open /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_de7aacb77425ed11abe770c2f9a97352-if00-port0

I then have to reboot system (only restarting HA isn’t enough) and when it’s booted back up everything works fine for like a day (or 2).

Does anybody know what’s going on here?

Kevin

1 Like

We’d need information on how HA is installed, hardware it is running on, what version of zwavejs you are using, how the stick is connected to the computer, and the firmware version / model of the stick.

Hi PeteRage,

Thanks for replying. Here’s all the requested information:

  • HA installed on an Odroid N2+ with 4GB of RAM and 64GB eMMc memory
  • Z-Wave JS v12.4.2
  • Z-Wave JS UI v19.8.1
  • Stick connected through USB cable directly in the Odroid N2+
  • Stick model Aeotec Z-Stick 7 FW7.19.3

You should not be running both zwavejs and zwavejsui. That could be the problem.

I’m not, I’ve only got Z-Wave JS UI installed as an add-on. If you hoover over the i-icon in the top right (next to where it says ‘controller is ready’) inside Z-Wave JS UI it gives you the version of Z-Wave JS and Z-Wave JS UI somehow.

I followed this guide to install and configure my stick a few months ago: Setup Home Assistant with Z-Stick 7 and Z-WaveJS UI : Aeotec Help Desk.

Edit:
Found these lines in recent logs:

LOG 2024-02-02:

2024-02-02T23:22:33.738Z CNTRLR Failed to execute controller command after 1/3 attempts. Scheduling next try i
n 100 ms.
2024-02-02T23:22:34.849Z CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i
n 1100 ms.
2024-02-02T23:22:36.953Z CNTRLR The controller is unresponsive
2024-02-02T23:22:36.955Z DRIVER Attempting to recover unresponsive controller by restarting it…
2024-02-02T23:22:36.956Z CNTRLR Performing soft reset…
2024-02-02T23:22:37.961Z CNTRLR Failed to execute controller command after 1/3 attempts. Scheduling next try i
n 100 ms.
2024-02-02T23:22:39.064Z CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i
n 1100 ms.
2024-02-02T23:22:41.170Z CNTRLR Soft reset failed: Timeout while waiting for an ACK from the controller (ZW020
0)
2024-02-02T23:22:41.171Z DRIVER Attempting to recover unresponsive controller by reopening the serial port…
2024-02-02T23:22:42.175Z DRIVER Serial port reopened. Returning to normal operation and hoping for the best…
2024-02-02T23:22:42.175Z CNTRLR The controller is no longer unresponsive

LOG 2024-02-14:

2024-02-14T05:07:24.740Z DRIVER Serial port errored: The serial port closed unexpectedly! (ZW0100)
2024-02-14T05:08:01.200Z DRIVER ███████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ███████╗ ██╗ ███████╗
╚══███╔╝ ██║ ██║ ██╔══██╗ ██║ ██║ ██╔════╝ ██║ ██╔════╝
███╔╝ █████╗ ██║ █╗ ██║ ███████║ ██║ ██║ █████╗ ██║ ███████╗
███╔╝ ╚════╝ ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝ ██ ██║ ╚════██║
███████╗ ╚███╔███╔╝ ██║ ██║ ╚████╔╝ ███████╗ ╚█████╔╝ ███████║
╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ ╚════╝ ╚══════╝
2024-02-14T05:08:01.202Z DRIVER version 12.4.3
2024-02-14T05:08:01.202Z DRIVER
2024-02-14T05:08:02.235Z CONFIG version 12.4.3
2024-02-14T05:08:03.113Z CNTRLR querying Serial API capabilities…
2024-02-14T05:08:04.392Z CNTRLR Failed to execute controller command after 1/3 attempts. Scheduling next try i
n 100 ms.
2024-02-14T05:08:05.497Z CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i
n 1100 ms.
2024-02-14T05:08:07.607Z DRIVER Failed to initialize the driver: ZWaveError: Timeout while waiting for an ACK
from the controller (ZW0200)
at Driver.sendMessage (/opt/node_modules/zwave-js/src/lib/driver/Driver.ts
:5256:23)
at ZWaveController.identify (/opt/node_modules/zwave-js/src/lib/controller
/Controller.ts:897:37)
at Driver.initializeControllerAndNodes (/opt/node_modules/zwave-js/src/lib
/driver/Driver.ts:1432:26)
at Immediate. (/opt/node_modules/zwave-js/src/lib/driver/Driver
.ts:1226:16)

Is there anybody who can shine their light on this? After working well for 2 weeks it happened again yesterday. Same error. Besides being annoying, my smoke detectors work with Z-Wave, so I’m really keen on fixing this.

The Z-Wave JS version mentioned before is probably being displayed in Z-Wave JS UI because of the intergration itself. I don’t have both add-ons installed.

@freshcoast, excuse me for mentioning you, but I saw you helping people in so many threads that I thought I’d give it a go.

If you have the time, would you mind taking a quick look at the problem described above?

In addition:
The problem looks similar to what people are experiencing if they have the ‘Use the Z-Wave JS Supervisor add-on’ option checked in the integration, but I don’t. Also, I have the right URL configured (server: ws://a0d7b954-zwavejs2mqtt:3000).

Any help will be greatly appreciated. I’ve got multiple logs available if desired.

Kind regards,
Kevin

Not really sure, but with errors like this maybe it’s a hardware problem. Z-Wave JS can’t work if it can’t access the serial device. Maybe check host logs like dmesg for insight.

Thanks for your reply. I think I found the solution. I have 2 identical USB extension cables, one for the Z-Wave dongle and one for my Zigbee dongle. All I’ve done is switch the dongles and now everything is working smooth, not an error for days. Who would’ve thought the solution would be so simple after all those months. Don’t know why this works, but I guess it’s the result that counts.

I have the same problem and it always happens when there has been an update of Zwave JS.

It looks like he loses the connection to the usb port. I use a Proxmox VM btw and it is something of the last half a year.

Same here with Proxmox and Z-Wave JS UI update . Can be operated normally after reconnecting Z-Stick 5 and restarting Z-Wave JS UI

same here with Proxmox and Z-Wave JS. I get the error:
Driver: Failed to open the serial port: Error: No such file or directory, cannot open…
I have found that rebooting HA virtual machine from Proxmox brings it all back up, but this consistently has to be done every few days.