Cannot upgrade Z-Wave JS to MQTT or Home Assistant, Z-Wave breaks

I am stuck. I’ve been using this Z-Wave setup for quite awhile, but now if I upgrade Z-Wave JS to MQTT, Z-Wave breaks and I have been unable to figure out why. I have been through 3 or 4 upgrade/restore cycles trying to track this down.

The same thing (it seems) happens whether I upgrade just the add-on, or upgrade both HA Core and the add-on (and I can’t upgrade just HA Core, because the newest core is incompatible with the older 0.26 version of the add-on…so essentially I am totally stuck on core upgrades until I solve this).

After upgrading the add-on, Z-Wave devices become unaccessible. The Z-Wave JS integration shows an error:

Cannot connect to host a0d7b954-zwavejs2mqtt:3000 ssl:default [Connect call failed ('172.30.33.1', 3000)]

The Z-Wave JS control panel shows nothing:

Here is what is in the Z-Wave JS to MQTT log…it looks like it’s having trouble initializing the controller driver? I have an Aeon Z-Stick (gen 5):

 Add-on version: 0.32.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 7.0  (amd64 / qemux86-64)
 Home Assistant Core: 2021.12.1
 Home Assistant Supervisor: 2021.12.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] configuration.sh: executing... 
[cont-init.d] configuration.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[12:21:22] INFO: Starting the Z-Wave JS to MQTT...
/bin/sh: git: not found
2021-12-15 12:21:24.267 INFO APP: Version: 6.1.0
2021-12-15 12:21:24.270 INFO APP: Application path:/opt
 ______                       _     ___                  _   _   
|___  /                      (_)   |__ \                | | | |  
   / /_      ____ ___   _____ _ ___   ) |_ __ ___   __ _| |_| |_ 
  / /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
 / /__\ V  V / (_| |\ V /  __/ \__ \/ /_| | | | | | (_| | |_| |_ 
/_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
                            _/ |                      | |        
                           |__/                       |_|        
2021-12-15 12:21:24.288 WARN STORE: scenes.json not found
2021-12-15 12:21:24.330 INFO APP: Listening on port 44920 host 0.0.0.0 protocol HTTP
2021-12-15 12:21:24.375 INFO MQTT: MQTT is disabled
2021-12-15 12:21:24.384 INFO ZWAVE: Connecting to /dev/serial/by-id/usb-0658_0200-if00
[12:21:24] INFO: Starting NGinx...
2021-12-15 12:21:24.449 INFO ZWAVE: Zwavejs usage statistics ENABLED
2021-12-15 12:21:29.656 INFO ZWAVE: Controller status: 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:3345:23)
    at ZWaveController.identify (/opt/node_modules/zwave-js/src/lib/controller/Controller.ts:673:33)
    at Driver.initializeControllerAndNodes (/opt/node_modules/zwave-js/src/lib/driver/Driver.ts:975:26)
    at Immediate.<anonymous> (/opt/node_modules/zwave-js/src/lib/driver/Driver.ts:855:16) (ZW0100)
2021-12-15 12:21:29.659 INFO ZWAVE-SERVER: Server closed
2021-12-15 12:21:29.715 INFO ZWAVE: Client closed
2021-12-15 12:21:29.719 INFO ZWAVE: Connecting to /dev/serial/by-id/usb-0658_0200-if00
2021-12-15 12:21:29.735 INFO ZWAVE: Zwavejs usage statistics ENABLED
2021-12-15 12:21:34.628 INFO ZWAVE-SERVER: Server closed
2021-12-15 12:21:34.683 INFO ZWAVE: Client closed
2021-12-15 12:21:34.689 INFO ZWAVE: Connecting to /dev/serial/by-id/usb-0658_0200-if00
2021-12-15 12:21:34.703 INFO ZWAVE: Zwavejs usage statistics ENABLED
2021-12-15 12:21:39.483 INFO ZWAVE-SERVER: Server closed
2021-12-15 12:21:39.528 INFO ZWAVE: Client closed
2021-12-15 12:21:39.531 INFO ZWAVE: Connecting to /dev/serial/by-id/usb-0658_0200-if00
2021-12-15 12:21:39.538 INFO ZWAVE: Zwavejs usage statistics ENABLED
2021-12-15 12:21:44.327 INFO ZWAVE-SERVER: Server closed

Restarting HA and rebooting the whole server after the upgrades has not solved the issue.

I tried changing the Serial Port setting in the Z-Wave JS control panel, since it couldn’t seem to find the USB stick. I changed it to /dev/ttyACM0 (instead of the longer path it had before, /dev/serial/by-id/usb-0658_0200-if00) because that’s what the more recent documentation for the add-on suggests:

And it’s what’s shown in the host hardware:

image

After re-starting the add-on, I still have the same problem and the same error (albeit with the upgrade serial port path) in the add-on log.

Also tried disabling “Soft Reset” feature on that page, which indicated it may cause problems with some sticks…still no change. Same error in the add-on log.

Well after screwing around with this a bunch, I changed the Z-Wave stick path in the control panel back to what it had been ( /dev/serial/by-id/usb-0658_0200-if00 ), rebooted the whole server again (not just HA restart, but a full host restart)…and now everything works. For some reason. Because this is a state I was already in before…but it didn’t work…

image

Glad the community could help you solve it :grin:

Probably your Z-Wave JS just heard you talking about it and decided to behave

I’ve been wrestling with this on and off for weeks. Of course as soon as I take the time to start posting about it and collecting screenshots and logs and everything, it decides to work.

This always helps me :slight_smile:
image
sometimes gotta do it 4 or 5 times though!

I’m also onto a similar isue.
I’ve moved to the new zwave js mqtt last week and keep having issues mapping the USB stick (AEOTEC) I run it on a container so I followed the example here: zwavejs2mqtt/docker-compose.yml at c0eb93705f61e71afd1ee2bd2a158296683fa87e · zwave-js/zwavejs2mqtt · GitHub

the recommended docker-compose line to map the USB to the container is beloew but I could never make it work that way.

  • /dev/serial/by-id/usb-0658_0200-if00:/dev/zwave

instead, I could only map with

  • /dev/ttyACM0:/dev/zwave

although It’s working atm, the issue seems to be when it reboots and potentially maps into a ddiferent path on the VM and would in turn break the container mapping.

anyone can spot what could be wrong in the first mapping?

Do you have a by-path option?