Z-Wave JS: Have to restart HA every time I update or restart ZWaveJS2MQTT

Every time I upgrade ZWaveJS2MQTT, I have no entities (e.g., the UI shows Entity not available: light.living_room) until I also restart Home Assistant Server. I’m up-to-date with the latest release of Home Assistant (2021.2.2) and just upgraded zwavejs2mqtt tonight.

I’m not sure if this is a known issue, or if something might be wrong on my end. I figure I should ask if this is known before filing an issue, but I couldn’t find one.

(It’s still amazing how much better ZWaveJS is for my setup!)

I’ve seen others report the same behavior.

I don’t know if it’s been reported as a bug or not but it’s a good assumption that it has.

I could see there is thread in github ” Z-Wave JS - entities disappear if zwave-js server restarts #46180”.
But for me I completely lost the entities and new ones appeared after restart of HA. I.e, the names I gave the devices and entities as well as what area they belong to are gone. As being newbie with home assistant I wonder if this is expected? When I read your issue it still seems that your “old” devices with entities(name&area etc) appeared agan as they were before they disappeared during upgrading zwavejs2mqtt?

1 Like

I found the issue you mentioned here, in case anyone else is looking for it. Thanks for finding it!

Your issue sounds like something more serious. I only have the minor annoyance of a fairly quick restart of HA core, and everything pops right back up.

1 Like

Yes, fortunatly i didnt have many nodes paired yet or any automation to speak of but im a bit reluctant to proceed without knowing what i did wrong. I susepct that, since prior to the restart of the addon i had the usb stick removed for pairing a device in other building, the “server” was temporary empty, i.e. no nodes available while restarting HA. Its a bit odd though that HA would toss all devices and entities due to this, but i saw in the zwavejs integration that no devices or entities were available. I would prefer duplicates if for some reason the nodes disappear and come back again in the server… but again, i dont know if this is what happened…

I upgraded to 1.3 yesterday and all my nodes disappeared. The wired ones came back after a few minutes but the battery powered ones are still missing until now. I am now reluctant to upgrade to 1.4. Has this issue been resolved? Or, is there a proper way to upgrade a docker installation (kind of a newbie with docker)?

I also had some issues and wanted to reload the integration regularly. There is no service to reload an integration but the API allows you to do so.

Step 1)
Find the UID of your integration by command-clicking (on a Mac, control-click maybe on a windows machine?) on the “configure” link on the integrations page.


Step 2)
Create a long lived access token for the rest command of next step
Step 3)
Create rest_command in configuration.yaml:

rest_command:
  reload_zwavejs: 
    url: !secret reload_zwavejs_url
    method: POST
    headers:
      authorization: !secret reload_zwavejs_token
      content-type: application/json

where the secrets are
reload_zwavejs_token: "Bearer <token>"

reload_zwavejs_url: "http://192.168.0.9:8123/api/config/config_entries/entry/<UID in step 1>/reload"

This gives you this service rest_command.reload_zwavejs

You can reload from the Integrations page. (Sounds like you want to automate it, but this is another option).

The issue is that this button is sometimes not available. You need this detour to get it running again quickly.