Aeotec Z-Stick 7 - Cannot lock port error

Hi HA Community.

I have been using HA for many years, and have been using a HA Yellow for about 6 months now, running a combination of Z-Wave, Zigbee and WiFi devices, using an Aeotec Gen 5+ Z-Stick.

Now to the issue. I decided it was time to upgrade to the Aeotec Z-Stick Gen-7 in the hope it would address a few latency issues, however i have not been able to get it to work. I was originally using Z-Wave JS with the Gen 5 and attempted to swap to the new device (knowing i would likely need to re-include everything) however this did not function, with logs showing “Unable to start driver ZWaveError: Failed to open the serial port: Error Resource temporarily unavailable Cannot lock port (ZW0100)”.

Things I have attempted:

  1. Swapped back the Gen5+ Z-Stick as a test, which restored Z-Wave functionality.
  2. Uninstalled the Z-Wave JS add-on, rebooted, and installing Z-Wave JS UI. Z-Wave JS UI presented the same error. Reverted.
  3. Attempted to swap between USB ports, with no change.
  4. Tested the USB device via Simplicity Studio 5 (as per Aeotec documentation) which confirmed the device is functioning as it should.
  5. Updated Z-Stick 7 to latest firmware and attempted use via HA, with no change.
  6. Attempted to map to the device in Z-Wave JS UI config, using the full path “/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_…” as obtained via the “ls /dev/serial/by-id” command. No change.

A full log extract is included below, showing the attempted add-on start sequence, and subsequent errors.

Grateful for any guidance the community may have.

Z-Wave JS Log Output

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/
[20:05:48] INFO: Both ‘network_key’ and ‘s0_legacy_key’ are set and match. All ok.
[20:05:50] INFO: Virtual Machine not detected, enabling soft-reset
cont-init: info: /etc/cont-init.d/ exited 0
cont-init: info: running /etc/cont-init.d/
cont-init: info: /etc/cont-init.d/ exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun zwave_js (no readiness notification)
s6-rc: info: service legacy-services successfully started
[20:05:53] INFO: Successfully send discovery information to Home Assistant.
2023-07-05T10:05:57.560Z DRIVER ███████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ███████╗ ██╗ ███████╗
╚══███╔╝ ██║ ██║ ██╔══██╗ ██║ ██║ ██╔════╝ ██║ ██╔════╝
███╔╝ ██║ █╗ ██║ ███████║ ██║ ██║ █████╗ █████╗ ██║ ███████╗
███╔╝ ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝ ╚════╝ ██ ██║ ╚════██║
███████╗ ╚███╔███╔╝ ██║ ██║ ╚████╔╝ ███████╗ ╚█████╔╝ ███████║
╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ ╚════╝ ╚══════╝
2023-07-05T10:05:57.572Z DRIVER version 10.23.2
2023-07-05T10:05:57.574Z DRIVER
2023-07-05T10:06:06.721Z DRIVER Failed to open the serial port: Error Resource temporarily unavailable Cannot
lock port
Unable to start driver ZWaveError: Failed to open the serial port: Error Resource temporarily unavailable Cannot lock port (ZW0100)
at Driver.openSerialport (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:1224:9)
at Immediate. (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:1059:5) {
code: 100,
context: undefined,
transactionSource: undefined
[10:06:07] WARNING: Halt add-on

Look at this thread,

Sounds like you have more than one zwave running.

1 Like

Thanks for the guidance, I will take a look and report back. I have tried hard to avoid two zwavejs instances as it was a common theme across many forums and guides. Even uninstalled every trace of zwave add-ons and integrations.

I must note that the Z-wave JS add-on (not UI) was stubborn and persisted through several attempts to uninstall, reappearing upon reboot. This may have been prior to uninstalling the integration, but was unexpected behaviour nonetheless.

Not sure how, but after returning home, the Z-Stick 7 had been recognised by Z-Wave JS. Now facing a different issue where i am unable to include devices via HA. getting the following unhelpful “status=failed” error captured in the log:

2023-07-07 00:31:32.748 INFO Z-WAVE: Success zwave api call startInclusion true
2023-07-06T14:31:39.984Z CNTRLR handling add node request (status = NodeFound)
2023-07-06T14:31:42.662Z CNTRLR handling add node request (status = Failed)
2023-07-06T14:31:42.665Z CNTRLR Adding the node failed
2023-07-07 00:31:42.666 INFO Z-WAVE: Controller status: Inclusion failed
2023-07-06T14:31:42.668Z CNTRLR stopping inclusion process…
2023-07-06T14:31:42.713Z CNTRLR The inclusion process was stopped
2023-07-07 00:31:42.714 INFO Z-WAVE: Controller status: Inclusion stopped