Problem with Z-Wave JS UI upgrade from 13.6.1 to 13.7.0

HAOS running in VirtualBox on Gentoo Linux hosts. It’s been wokrking mostly fine for months, but the latest upgrade of Z-Wave JS UI from 13.6.1 to 13.7.0 took multiple attempts, with the HA system completely freezing and requires a clean start. The upgrade finally went through, but on the Overview, all my devices are disabled. The areas (garage and porch) seem enabled, but toggling them has no apparent effect. Going to Settings/Addons/ZWave JS UI and clicking “Open Web UI” gives “The add-on seems to not be ready, it might still be starting. Do you want to try again?” Telling it to retry gives the same message again, and telling it to not try again says “502: Bad Gateway.”
Loading the backup from just before that upgrade sucessfully downloads to 13.6.1 and the system works correctly. I’ve tried the upload again, and it did take two reboots of the VM, after which I have again the same problems.
The last line in the ZWave JS UI log is “s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/discovery/type: must be oneshot, longrun, or bundle” and I thought I had seen more of that message earlier today, but don’t see it now.
Is this a known issue, or what logs should I post, or what other troubleshooting can I do myself?
Thanks for any suggestions.

S6 is the init service that most docker containers use. If your seeing an error saying onewhot, etc. it’s because one of the s6 service run files has wrong syntax or missing syntax. Does it say what service the error is coming from?

No, that’s the whole message. This whole installation is pretty standard. I have not yet done anything “creative.” What logs should I look in? (I’ll try to download that entire log, in case there is something I’m not seeing by not scrolling back far enough.

I set the log level to debug, and while the addon was restarting I already see this at the end of the log;

s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/discovery/type: must be oneshot, longrun, or bundle

s6-rc: fatal: unable to take locks: No such file or directory

s6-linux-init-shutdownd: warning: /run/s6/basedir/scripts/rc.shutdown exited 111

s6-rc-compile: fatal: invalid /etc/s6-overlay/s6-rc.d/discovery/type: must be oneshot, longrun, or bundle
When it finishes restarting, I’ll download the whole log and browse/grep for problems.

Open an issue in the z wave JS repo, that’s the init code and is baked into the docker layers from building the image. One of the maintainers needs to fix an S6 service file.

It’s weird your the only one with the issue so far though, if it’s really an S6 unit file, all docker images should be throwing this error from that version.

While trying to find various version info for logging that issue, I found that Settings/Devices and Services/Integrations/Z-Wave shows

Failed setup, will retry: Failed to connect: Cannot connect to host a0d7b954-zwavejs2mqtt:3000 ssl:default [Connect call failed (‘172.30.33.0’, 3000)]

but the config shows URL ws://a0d7b954-zwavejs2mqtt:3000 which seems to be what the docs call for. Poking around some more shows the hub as “unavailable.” Hub is a Zooz 800 ZST39 LR, which is definitely connected, showing up in lsusb on both the host and in the VM, and it is one of the 7 Z_Wave devices shown.

I’m restarting the VBox again, but I"m just getting increasingly confused.

Shutdown, remove power, remove stick, wait 5 minutes, restart.

I shutdown the VBox VM, not the Gentoo host, but did physically unplug the stick… Waitied 10 minutes before restart. No change in behavior. Per comment 5, I’ve opened Z-Wave JS UI stopped working after upgrade to 13.7.0 · zwave-js/node-zwave-js · Discussion #7414 · GitHub but no response yet.

In the issue you posted, you also claim to be running the core add-on (0.9.0):

Driver (node-zwave-js): 13.10.3
Z-Wave JS UI: 13.7.0
Home Assistant Z-Wave Integration: ...(where do I find this?)
Home Assistant Z-Wave JS Addon: 0.9.0
ioBroker.zwave2 Adapter: ...(where do I find this?)

You can’t run both add-ons at the same time with a single controller. Is it actually running? Make sure it’s not running, and delete it if so.

https://www.home-assistant.io/integrations/zwave_js/#can-i-switch-between-z-wave-js-and-z-wave-js-ui

I also just noticed that the name of the file you’ve attached is named suspiciously like the Z-Wave JS core-addon file names. ZUI driver debug logs are typically named zwavejs_<date>.log, but your filename is zwave_<date>.log which is how the core add-on names files. Where’d you get it from? Sounds like you at least have the wrong add-on running.

The JS addon is installed, but definitely not running, I’ve checked multiple times. Actually for one of my tests, I stopped the JS UI and started the JS, and had at least one of my devices able to respond. I then stopped JS and restarted JS UI and am back where I started.

At this point, I’m going to have to try to retrace my steps to figure out where I actually got that log, but I believe I used either the SSH addon or a second console for the VM, found the log, and scp’d it to my host. I was also curious about the “wrong” naming, but it does look like a driver log, not an app log, so I’m also very confused. I did just post both the JS and JS UI app logs to the issue.

The JS addon is installed, but definitely not running, I’ve checked multiple times.

Ok. It is quite confusing to include these logs then without added context.

zwave_2024-11-17.log is the driver log from the core add-on, and you must have enabled the option to log to file because it’s disabled by default.

core_zwave_js_2024-11-20T02-26-48.282Z.log is the container logs for the core add-on, which will almost be identical to the driver logs. These logs show it was running 11/14 and 11/17, so I suppose these were the times you turned it on temporarily?

a0d7b954_zwavejs2mqtt_2024-11-20T02-26-16.101Z.log is the Z-Wave JS UI add-on container log. This are equivalent to the ZUI application logs (by default). You probably don’t have driver logs enabled because it’s off by default. Or, you haven’t provided the driver logs from this add-on, because those would be named zwavejs_<date>.log. Curiously, you have MQTT enabled and topics were being published to. Are you actually using the Z-Wave integration functionality, or MQTT?

The HA error:

Failed setup, will retry: Failed to connect: Cannot connect to host a0d7b954-zwavejs2mqtt:3000 ssl:default [Connect call failed (‘172.30.33.0’, 3000)]

Means the Z-Wave integration is configured to use the ZUI add-on. Since the add-on is offline HA can’t connect to it. I’m confused what you mean by “I stopped the JS UI and started the JS, and had at least one of my devices able to respond”. You can’t control the devices without the integration being loaded and connected to the add-on’s websocket server.

Have you looked in Settings → Systems → Logs → Supervisor and seen if there are any unusual messages related to the Z-Wave JS UI add-on?

Apologies if I’m misusing terminology. When I talk about starting and stopping JS and JS UI I’m talking about the addons. I don’t believe I ever explicitly stopped the integration.

Are there more than one Driver Logs? I think I more stumbled on the one I posted than actually found it in a known location. However, you are correct that I explicitly set it to log to file. I’ll try to be more explicit about where I got any log I post in the future.

I don’t remember exactly when I tried switching from the JS UI back to the JS addon, but those two date (14th and 17th) sound likely.

I don’t see anything which looks like a smoking gun in the Supervisor logs on a fairly quick review, but I"ll have to look again in more detail, and will probably post at least a few questionable lines.

However, I note again that everything was working fine until the upgrade of the Z-Wave JS UI addon…

I understood that, but unless you are re-configuring the integration to talk to the core-addon (if so, this hasn’t been mentioned, your error message refers to the ZUI add-on only) when you enable the core add-on, you won’t be able to control any devices and use them in HA.

Are there more than one Driver Logs?

Each add-on will have their own driver logs.

However, I note again that everything was working fine until the upgrade of the Z-Wave JS UI addon…

FYI this is classic “running both add-ons at the same time” behavior. In this scenario just by pure luck the add-on you’re actually using takes control of the USB controller and locks out the other one, then you upgrade the working add-on or reboot your host, and the other add-on takes over, rendering the other one non-functional. Usually it doesn’t not result in these kinds of errors, you’d see actual driver errors, not s6 init errors.

As far as I know, I never had both addons running at the same time. On their addon pages one always had the red circle and the otehr had the green. I’ve certainly forgotten exactly how I switched from the JS which I had originally set up to the JS UI, but I’m quite sure I followed the instructions I was using, and it worked just fine for many months, until the JS UI addon was upgraded.

Should I just uninstall the JS Addon? For some reason, I thought I had read it should be disabled but not removed. I’ll be glad to try removing it if it won’t make things worse.

However - you talk about configuring the integration to talk to one or the other addon. Where do I do that, other than by only having one of them running at a time.

As I’ve said, the two times I simply applied the backup from before the JS UI addon updgrade, everything startted working again, and as soon as I reapplied the upgrade, things stopped working.

Back to logs, I know of two ways to get logs through the web interface. One - Settings/System/Logs and then choose the log from the dropdown at the top. Two - Settings/Addons/pick an addon/click log at the top. At least for the two addons in question, what (if anything) is the difference between those two paths? My thougth was that those were the addon application logs. Where should I look for the driver log for an addon? I seem to have gotten one, but I feel like it was only by following a maze of twisty, little, paths, all different, and I’m not confident I could find it again. (Feel free to point me to any relevant docs, but all the ones I’ve seen describe settings that don’t match what I see, so I don’t know if it’s just because things have changed since they were writtes, or I’ve just not found the right one.

I would remove it, it’s just causing confusing. There’s no reason to have it installed when you are using Z-Wave JS UI. Take a backup if you’d like before removing it.

At this point, the problem seems unlikely to be related Z-Wave at all, and is solely an add-on problem, especially since the core add-on is working. I would guess filesystem corruption in your VM or a corrupted Docker container image.

I would check the container first. If you install the community Terminal & SSH add-on and disable protection mode, you can interact with Docker CLI. I would remove the image and pull it again.

  1. Make sure the ZUI add-on is currently stopped, otherwise the delete will fail
  2. Open a terminal shell and delete and pull the add-on image. These would be the commands for amd64 platform. Use docker image ls to find your image if different:
docker image rm ghcr.io/hassio-addons/zwave-js-ui/amd64:3.17.0
docker image pull ghcr.io/hassio-addons/zwave-js-ui/amd64:3.17.0
  1. Once pulled, start the add-on again

If that doesn’t work, if possible I’d test a new VM.

1 Like

I’ll give that a try. The issue I opened seems to have ended up with essentially the same conclusion.
Maybe it’s just fortuitous timing. I’ve been slowly planning on migrating from the VM to an odroid M1 I recently bought. Hopefully I can get an appropriate backup so I don’t have to reinstall the whole thing (I do plan to use the same Zooz stick.) I know I need to read more on backups first, however.

@freshcoast: Thank you thank you thank you.
Aside from having to restart the ssh addon after changing protection mode, removing and refetching the addon worked, and my system is back to where it was before the problem showed up. Do I just chalk it up to “phase of the moon and blue magic dust” causing corruption of my initial download of that version of the addon? Cosmic rays, perhaps?

1 Like

I don’t have a better explanation than that. I had searched around previously and found one obscure GitHub issue where re-downloading the image was the solution. I thought I saw something similar in these forums as well but I can’t recall it.