HASS making Z-wave changes since ~.36?

I’ve started having a problem where HASS is either renaming my zwave devices, or removing the name that I had stored in my zwcfg_*****.xml. This is breaking Automations, scripts, and customizations by changing my entity IDs

I’ve even opened my zwcfg_*.xml file and manually changed it back to the correct name, only to have HASS remove my changes on the next restart.

I can temporarily fix the issue by recopying my zwcfg file from OZWCP, but it doesn’t stick, and HASS eventually messes up the configuration again.

I think this started around .36.0, but I’m not totally sure. did the Zwave implementation change? or is their something I’m doing wrong. I do get a lot of: “Messages dropped and not delivered:” but I don’t think thats related.

Help please.

Perhaps someone could tell me how to prevent Home Assistant from editing the zwcfg file?

Was thinking maybe changing permissions of the file, but I’m not sure if this would break other functionality.

Simply do a sudo chown pi zwcfg_*.xml

Of course, then you can’t add or remove any Z-Wave devices, and it’s quite possible something will break. That said, I’m not seeing any of the behaviour you describe, and I’ve hand edited the config file. I did it though when HA was stopped, I assume you did?

Hi, yes I have made the edits when HA is stopped, I’ve also downgraded back to .36.1 (from .37.1) in case .37 was the culprit. HA seems to make edits to the zwcfg_ file. It will either erase a name or location of a device entirely, or replace the name field with the product type. I’ll try changing the owner from homeassistant to pi and see how that goes.

I’d suggest you raise a bug report too, since applying work arounds isn’t sustainable. There may well be a bug somewhere that your install is triggering, which mine (and presumably others) isn’t.

HA indeed changes the xml. I diffed it a few times to see what it was doing. At shutdown HA writes the current values of sensors, and reads them back at startup. That’s nice, as it doesn’t cause weird graphs/values at startup until the first message of a sensor.
Furthermore, I’ve seen it killing the xml, my z-stick crashed, and reported zero zwave devices, but HA fully started. At HA shut it wrote that to the xml. Effectively killing my config, which I had customized with names, just as you did. I had a backup, so I just restored that. After that I changed ownership to root.root for the xml only. (I’m running a symlink to another location by the way). Doing that causes weird sensor values at start, as I described above. Seeing temperature readings from december at start, and at the first update, which can take a while for a battery operated device, it will show the correct value. But hey, HA doesn’t kill my xml anymore :stuck_out_tongue:
(it seems to kill my stick though: https://github.com/home-assistant/home-assistant/issues/5501 :smile: )

The Z-Wave changes are from 0.31.

See: https://home-assistant.io/blog/posts/2/#major-breaking-z-wave-changes-ahead

“This is super annoying, I know, especially since we had said in 0.12 that Z-Wave IDs should hopefully never change again, but we are now forced to eat those words. I will state again that Z-Wave IDs shouldn’t change in the future but obviously we see how that went. To sum up on this section… sorry but it had to happen.”

What this means for all you Z-Wave users is that you will need to update your configurations to reflect the change."