After upgrading to JS UI re-adding zwave integration fails to connect

I recently switched to a Aerotex Z-Stick Gen5+ and then upgraded to wave JS to JS UI. Much like the question in After upgrade to z-wave js UI I don’t see entities? I don’t see the entities.

I uninstalled the standard zwave-js from the integrations and then tried to re-add z-wave integration . I unchecked box for Z-Wave JS Supervisor add-on and used the url ws://a0d7b954-zwavejs2mqtt:3000. It fails to connect. I don’t see anything obvious in any logs, but I’m not sure what logs to check and where to find them.

Log please. We’re guessing without it.

Have a suspicion but the log is helpful.

I’m not sure which logs would be useful.

z-wave-ui log:
2023-10-04 16:32:07.463 INFO APP: GET /health/zwave 301 1.023 ms - 191

system log: lots errors for missing entities

2023-10-04 16:31:17.702 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Landing Light Off' could not be validated and has been disabled: Unexpected value for condition: 'stateswitch.multirelay_3'. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data['condition'][0]. Got {'condition': 'stateswitch.multirelay_3', 'entity_id': 'input_boolean.millers_away', 'state': 'on'}

2023-10-04 16:31:19.614 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Master bath lights' failed to setup actions and has been disabled: Unknown device '35f1e488f3fe02363f060f701a2671d6'

2023-10-04 16:31:20.180 ERROR (MainThread) [homeassistant.components.automation.coffee_off] Error setting up trigger Coffee off

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/components/device_automation/trigger.py", line 64, in async_attach_trigger

return await platform.async_attach_trigger(hass, config, action, trigger_info)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1380, in <listcomp>
    return [async_validate_entity_id(registry, item) for item in entity_ids_or_uuids]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 1349, in async_validate_entity_id
    raise vol.Invalid(f"Unknown entity registry entry {entity_id_or_uuid}")
voluptuous.error.Invalid: Unknown entity registry entry 34837c978c3cf744462f0bb29af152b8

2023-10-04 16:45:04.316 ERROR (MainThread) [frontend.js.latest.202310020] Uncaught error from WebKit 605.1.15 on Mac OS 10.15.7
TypeError: undefined is not an object (evaluating 'e[this.id]')
_keyFunction (src/components/data-table/ha-data-table.ts:362:56)
s (src/directives/repeat.ts:56:34)
t (src/directives/repeat.ts:94:6)
t (src/lit-html.ts:1085:33)
this (src/lit-html.ts:1362:29)
t (src/async-directive.ts:366:29)
this (src/virtualize.ts:139:22)
dispatchEvent ([native code]::)
_notifyRange (src/Virtualizer.ts:803:6)
_notifyRange (src/Virtualizer.ts:535:11)

2023-10-04 16:45:04.317 ERROR (MainThread) [frontend.js.latest.202310020] Uncaught error from WebKit 605.1.15 on Mac OS 10.15.7
TypeError: undefined is not an object (evaluating 'e[this.id]')
_keyFunction (src/components/data-table/ha-data-table.ts:362:56)
s (src/directives/repeat.ts:56:34)
t (src/directives/repeat.ts:94:6)
t (src/lit-html.ts:1085:33)
this (src/lit-html.ts:1362:29)
t (src/async-directive.ts:366:29)
this (src/virtualize.ts:139:22)
dispatchEvent ([native code]::)
_notifyRange (src/Virtualizer.ts:803:6)
_notifyRange (src/Virtualizer.ts:535:11)

Could it be that I did not fully succeed at removing the original Z-wave JS? The Z-wave JS add-on reappeared on my add-one page. In the JS UI interface the little i icon on the top right shows:

zwave-js-ui: 9.0.3
zwave-js: 12.0.2
home id: 4107592288
home hex: 0xf4d4e260

How to I properly remove z-wave js? It not in my integrations page.

If you deleted the integration, then all your devices and entities are removed along with it.

If you switched to the Z-Wave JS UI add-on, then you can delete the Z-Wave JS add-on. There are instructions for switching add-ons without deleting the integration, but it sounds like you didn’t follow that.

I was following the instructions you pointed to, but perhaps I didn’t understand all the steps clearly. Although the Z-wave JS UI found the devices I had added to my new Z-stick, HA did not have any of the devices or entities. Other posts with similar problems recommended making sure I wasn’t running both Z-Wave JS and Z-Wave JS UI, which is why I deleted the Z-Wave JS Addon. But re-adding the Z-wave JS integration failed:

  • I selected “Setup another instance of Z-Wave”
  • I unchecked “use the Z-Wave JS Supervisor Addon”
  • For the URL I used “ws://a0d7b954-zwavejs2mqtt:3000" but got the error “Failed to Connect”

Where do I go from here? Should I remove the Z-wave JS UI Addon and repeat steps 2-4 (add JS UI back to the add-ons and see if I can add the Z-wave JS integration)? I had only added about 10 devices which I could add again if need be.

In your original post you mentioned that you “uninstalled the standard zwave-js from the integrations”. If you truly meant “integration” and not “add-on”, then that uninstall would remove all of the Z-Wave devices and entities. Adding the integration will bring them back.

Usually the “Failed to Connect” error would mean the add-on is not running properly. Also double check that you didn’t add any extra trailing whitespace for the URL, e.g. "ws://a0d7b954-zwavejs2mqtt:3000 " (which can happen with copy/paste), the dialog will not clean those out and it will fail to connect.

You could try looking at this guide, which provides more detail than the docs. If ZUI is already running successfully you can skip the parts about restoring the cache, or any other details that don’t apply.

If all that fails, feel free to post the driver debug logs from ZUI, to see if there’s some other issue. If you have a 500-series controller (Aeotec Gen5, etc.) be sure to disable Soft Reset in the Z-Wave settings.

1 Like

Wow, that guide looks a lot more helpful. I’ll give it another try when I get home on Sunday. Thanks!

1 Like