Node:undefined undefined

Howdy all…hate to say it, but I’ve got the same error that came about under different circumstances. What I did was a factory reset on a thermostat…end of the world ensues.
I have follwed the directions under https://www.home-assistant.io/docs/z-wave/adding/ for “Remove Failed Node”, but every time I set the thermostat to is_failed: true then the Node: Undefined Undefined issue happens and I am unable to remove the node marked as failed because it has no node_id.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1204, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: required key not provided @ data['node_id']

I even found some suggestions to Refresh the USB stick node, tried that and the error message got even less helpful:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1226, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/zwave/__init__.py", line 808, in refresh_node
    node = network.nodes[node_id]
KeyError: 1

I’m all ears if anyone has a fix for this. I’d really like to get this thermostat off my node list so I can put the right one in :).

Same here … Logfiles aren’t very helpful too?!

Any Ideas?

Refreshing nodes brings them back for me, but then all entities have new names and I have to go through all of them and rename them back.

I despair with it

Just happened to me this morning. Whole zwave network died. I can see all the nodes reporting status and power values in OZW_log but HA is listing all of them as undefined.

I’ve been having the same issues. Also noticed that entries in .storage/core.device_registry and the zwave xml file are missing entries/information. I don’t see any open issues for this but it seems like there are enough users experiencing this in a short time span that it might be worth creating one.

1 Like

Same for me, 50% of my z-wave devices are undefined… :astonished:

This is possibly the same issue as https://community.home-assistant.io/t/moved-ha-and-lost-zwave-mostly/166860, which can be fixed (temporarily?) by restoring an old version of your zwcfg_*.xml file (if you have a backup).

2 Likes

Unfortunately no; I’ve replaced backup XMLs a few times. Comparison before and after shows chunks rewritten with null data or basic structure missing on subsequent reboots. Same for the .storage/core.device_registry.

Right now the only working solution I have come up with is to remove the devices from their original locations, bring them close to the server and initiate an Add Node, then press the action button on the device. I’ve been able to do some in place - but what’s really puzzling is that many of the devices I lost and had to relocate to pair were PLUG IN devices! Battery powered devices seem to be able to pair in place. Would have thought it to be the other way round.

After getting them recognized, it appears all the entity associations come back and I run a heal node once I place them back in their locations. I try to do this a few nodes at a time, so as not to overwhelm the network traffic. I have two-three more to attempt tomorrow, but I’ll let it settle overnight.

This seems to have appeared about 3-4 versions ago. Been running since 2013 and while I’ve had the occasional reboot of the host cause the Stick to not init properly, another restart or two and everything is back up. This is different. This is segments of the ZW net just get ‘eaten up’ for lack of a better term and chunks of the two files I mentioned missing ZW info. And so far, the stick ALWAYS comes up, no matter what other pieces go missing, leading me to believe the stick is working normally.

Yesssss! That seems to have done it for me. Thanks.

Yesterday my Ubuntu server had some updates that I decided to install and reboot server.

Zwave stick locked(no flashing lights) and entire zwave network down same symptom as you all reported.

I removed and reinserted stick and flashing was back but still no connect to HA. When from sumlink /dev/zwave to /dev/ACM0 and now only (4) nodes show. (2) working and other (2) missing the controllable device. All other nodes show incomplete.

This is docker install
Anyway…just more info

Same problem for me, I got 7 devices and all are now undefined. :frowning:

I got the same issue, maybe it has to do something with the new version of Hassio. I upgraded it to 0.107.X this week.

Mine was specifically caused by ubuntu upgrade but yes it look like 107 also have some issue

Just chiming in that restoring old zwcfg_*.xml from a snapshot fixed the Node: undefined undefined problem for me as well.

Unsure why it ensued in the first place. Had done some minor changes in automations and restarted to reload config. A routine-restart. Once it had started, I experienced the same problems others have reported. Tried some restarts; some z-wave restarts; some heal network. Nothing worked — except replacing with a old zwcfg_*.xml. (Sooo relieved that did work! Would’ve been quite a chore to re-add all the nodes, all the customized names, and all the… rest.)

1 Like

Also having this problem on my system, many non-function undefined zwave devices after a restart. I submitted bug report here: https://github.com/home-assistant/core/issues/33486

The issue is re-occurring for me. Happens at some, but not all, restarts of HA.

It’s easily resolvable, as I now have a working zcfg -file stored, and can fix it by replacing faulty zcfg with the working backup. But obviously not a desirable situation, where there repeatedly is a need to do so. Great that you filed a bug report, @MattMattMattMatt! I’ll see if I can contribute to the discussion / troubleshooting over there.

I also suddenly had all my nodes at node:undefined. In my case it could revive it by restarting my virtual machine on which I have a docker HASS…pffff

I replaced zwcfg_*.xml from a backup of 0.107.6 and restarted and all zwave entities/devices came back. Thanks!

I had the same issue myself today. Unfortunately, I added the device late last night and hadn’t backed up yet.

I was lucky, I had another device of the exact same type (Both Aeotec Recessed door sensors). I copied the section <Manufacturer …> to from the working sensor to the undefined sensor. The undefined sensor started working again. At least well enough for me to do a ‘heal node’ / ‘refresh node’

So in my case:

<Manufacturer id="86" name="AEON Labs">
     <Product type="102" id="59" name="ZW089 Recessed Door Sensor Gen5" />
</Manufacturer>

Update: To get the entities back afterwards, I had to copy the entire Command Classes section as well.

<CommandClasses>
...
</CommandClasses>
1 Like

Running 0.107.5 and had the same issue.

Solved it by selecting that node, tapping the Node info-button and there I found an option to remove that node.

Now it’s gone from my system.

hassio on Ubuntu 18.O4, had 30% of my nodes dissapear after upgrading to 0.107.5 , shutting down, replacing zwc_*.xml with one out of a snapshot (extract the previous snapshot /usr/share/hassio/backup/xxxxxxx.tar and cherrypick zwx_*xml out of homeassistant.tar.gz) fixed it. Thanks guys!

EDIT:Did something change in the zwave stack. I have no numbers, but loading network seems waaaaay slower.