Z-Wave JS UI Driver: Failed to open the serial port Cannot lock port (ZW0100)

Thanks, this helps explain it, especially the history.

Totally why I installed it too, and agree wholeheartedly.

I’m guessing that “integration with” means that it encapsulations the same Z-Wave JS Server that HA uses, is that right?

Do you mind explaining this? In my head it looks like
HA → Z-Wave JS UI addon → (contains Z-Wave JS server → (contains Z-Wave JS driver)), but that’s probably way off :upside_down_face:

When I originally installed the Z-Wave JS addon, it didn’t have a great UI, and certainly not the UI that the Z-Wave JS UI addon has, unless I missed it? Because this seemed kind of lacking, I looked around and found the same name with “UI” tacked on the end, and mistakenly assumed this was a UI addition. Maybe (probably!) I’m missing your point, though.

Yes, it means supporting HA users by means of the websocket server, as opposed to HA needing to use MQTT (which is limited for HA’s purposes). It just helped with the adoption of Z-Wave JS, as it gave users an alternative, but the core add-on is still the “official” Z-Wave JS application for HA.

Not quite. Both add-ons are Javascript applications. The Z-Wave JS driver and the Z-Wave JS server are separate components that the application manages. The server is only given a reference to the driver instance, it has no responsibility for its lifetime, which is why it is optional in ZUI.

The architecture of the components is explained here:

Z-Wave JS UI is a Javascript application, so it has direct access to calling the Z-Wave JS Javascript APIs and talks to the driver over the JS API, it doesn’t use the Websocket. This means it can provide functionality that isn’t supported by the Websocket API. HA is limited to the Websocket API features.

The core add-on doesn’t have any UI on purpose, Home Assistant is the UI.

1 Like

Hi All,

Just wanted to share my issue and solution, since I ran into this similar issue today when upgrading to the following:

Z-Wave JS UI
From ? > Z-Wave JS UI - 3.4.0

Home Assistant Core
From 2024.1.8 > 2024.2.3

Operating System
From 11.2 > 11.5

I first noticed the problem because the Z-wave Integration failed to start.
I went to the Z-Wave JS UI Add-On and noticed the error message in the Logs

 Failed to open the serial port: Error Resource temporarily unavailable Cannot 
lock port

I tried reseating my Z-wave stick physically from the USB Port, but that did not change.

I knew the system could see the stick because I could verify that in:
Settings > System > Hardware > All Hardware > ttyACM1

  • /dev/serial/by-id/usb-0658_0200-if00
    Screenshot 2024-02-24 at 11.32.41

When looking closer in the Z-Wave JS UI settings I noticed that the USB path has changed to ttyACM0 Which is used for my Zigbee Stick???

How on earth this changed I have no idea, but changing the value to the correct serial portttyACM1 instead of ttyACM0 fixed the issue.

Z-Wave JS immediately saw all my entities and I could not re-enable and start the Z-wave Integration again.

1 Like

That problem is why HA and ZUI have always recommended using the persistent path /dev/serial/by-id/usb-0658_0200-if00. With the add-on it’s even available as a selection in the menu.

Next time you reboot, they might switch back, and you’ll be in the same situation.

2 Likes

Thank you for the recommendation freshcoast I was not aware of this. I have changed this now, so hopefully it does not happen again :slight_smile:

2 Likes