Zwave JS UI Add On Failed to initialize the driver error

I’m new to Home Assistant and have installed Home Assistant OS on a Windows 10 PC using Virtual Box and have an Aeotec Z-Stick Gen 5 with 26 nodes configured that I have been using with HomeSeer. Having overcome some initial issues re USB drive not being accessible by the VM I successfully installed the Zwave JS add on and Zwave integration with my nodes all being discovered. However, given all the comments online seem to favour the Zwave JS UI add on I have been trying to install that but have not been able to get it working.

I have no other add ons installed, having deleted the Zwave integration and Zwave JS add on as well, so have been trying to start from scratch.

I’ve been following the main Zwave JS UI installation steps, except for the fact that I have entered my S0 and S2 keys which I took from HomeSeer and converted to HA format (for S0) and then from Zwave JS for all 4 (after it generated the S2s). I have also found references online to disabling Soft Reset for my Zstick, so have also tried with and without that enabled.

The error I see when I go to the Control Panel of the Zwave JS UI add on is as follows:

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) (ZW0100)

It’s worth noting that when I had installed the main Zwave JS add on I’m not convinced that was working properly either but as soon as I proceeded to install the Zwave integration all worked fine. However, if I try this with the Zwave JS UI add on installed the integration is not able to connect to the add on with the error “Failed to connect” when I use the ws://a0d7b954-zwavejs2mqtt:3000 address.

Does anyone know how I can solve this?

You haven’t provided a lot of troubleshooting information.

Within Home Assistant Setting > System > Hardware > All Hardware, do you see the USB controller listed in the recognized hardware list? What does that path look like?

In Z-Wave-JS-UI Settings, what have you set for the Serial Port settings?

The official installation guide for Zwave JS UI advises to use serial port “/dev/serial/by-id/usb-0658_0200-if00” but an article on the Aeotec site says to use “/dev/ttyACM0”. I have tried both as well as all the “/dev/ttyS0” options (also ending in 1, 2 and 3). My first post showed results using the /dev/serial … setting. The only other settings I have changed are the 4 keys and Soft Reset.

I have checked the hardware settings you indicated and can confirm that it shows the following:

ttyACM0

/dev/serial/by-id/usb-0658_0200-if00
Subsystem: tty
Device path: `/dev/ttyACM0`
ID: `/dev/serial/by-id/usb-0658_0200-if00`

Attributes:
DEVLINKS: >-
  /dev/serial/by-id/usb-0658_0200-if00
  /dev/serial/by-path/pci-0000:00:0c.0-usb-0:1:1.0
DEVNAME: /dev/ttyACM0
DEVPATH: /devices/pci0000:00/0000:00:0c.0/usb1/1-1/1-1:1.0/tty/ttyACM0
ID_BUS: usb
ID_MODEL: '0200'
ID_MODEL_ENC: '0200'
ID_MODEL_ID: '0200'
ID_PATH: pci-0000:00:0c.0-usb-0:1:1.0
ID_PATH_TAG: pci-0000_00_0c_0-usb-0_1_1_0
ID_REVISION: '0000'
ID_SERIAL: '0658_0200'
ID_TYPE: generic
ID_USB_DRIVER: cdc_acm
ID_USB_INTERFACES: ':020201:0a0000:'
ID_USB_INTERFACE_NUM: '00'
ID_USB_MODEL: '0200'
ID_USB_MODEL_ENC: '0200'
ID_USB_MODEL_ID: '0200'
ID_USB_REVISION: '0000'
ID_USB_SERIAL: '0658_0200'
ID_USB_TYPE: generic
ID_USB_VENDOR: '0658'
ID_USB_VENDOR_ENC: '0658'
ID_USB_VENDOR_ID: '0658'
ID_VENDOR: '0658'
ID_VENDOR_ENC: '0658'
ID_VENDOR_ID: '0658'
MAJOR: '166'
MINOR: '0'
SUBSYSTEM: tty
TAGS: ':systemd:'
USEC_INITIALIZED: '36094539'

Disable Soft-reset in the Z-Wave settings. Since you are using a VM the resulting USB reset can cause issues.

I’d suggesting trying to find another place to run Z-Wave that is not a VM (RPi or other SBC for example), I don’t think Windows and VirtualBox are a stable long-term solution, at least from my experience.

1 Like

I can confirm that Soft Reset was already disabled before posting this thread/ errors. Comments taken on board re using Zwave with VM and will monitor over longer term. but noting that it works when I setup with Zwave JS, the fact that it’s a VM does not seem to be the issue in this case.

Sorry, I missed your comment about Soft reset. You can eliminate the VM completely by running Z-Wave JS UI in Windows as a test case.

You might also want to post the entire debug driver logs. The single message you’ve posted is not enough to provide much help.

1 Like

I’ve created the requested log files but unfortunately can’t work out how to post them here. I have the following files:

  1. zwavejs_2024-03-06.log
  2. zwavejs_current.log
  3. zwavejs_logrotate.json

I’ve tried both Google searches and looking at the introduction to this forum, but can’t see how to include them here as upload only allows images.

There are a number of “pastebin” sites that you can post text files to and link to here, e.g. https://pastebin.com/, etc.

Thank you for the tip @freshcoast. I may be able to take advantage of this in the future. However, I seem to have just solved the issue. I found this thread Z wave js failed to initialize the driver which seems similar to my issue, except that it was happening to existing users rather than new setup. However, many had solved by either removing and putting back their stick, rebooting and/ or changing USB port used. I’ve just worked my way through a combination of these and ultimately after 2 reboots it is now working. For the first reboot I removed the stick and then put back in a different port, but only after I have restarted the VM, but then found the VM could not see the USB stick. For the 2nd reboot I put the stick back in the original port after the shutdown but before starting up the VM. Opening up Zwave JS UI I could then see my 26 nodes shown in the control panel.

Note I had tried removing my USB stick several times before first posting and had also shutdown the VM and reinstalled the add-on, so really not sure what made the difference today although I did leave the USB stick disconnected for much longer today instead of perhaps only a few seconds previously.