Z-wave & Homeassistant cli

Hi,

I was wondering if there was some kind of cli to get the Home Assistant nodes and the Z-Wave nodes.

Ideally, the following workflow would be nice:

  • ssh to the hass.io instance
  • use the cli to get the HomeAssistant and Z-wave nodes
  • use whatever tool (grep, awk, sed, …) to generate the correct information for the configuration files

My use case is the following:
I have configured Home Assistant a couple of months ago, added and removed nodes and I’d like to do some cleanup in the configuration. Some entities are showing up (and I’d like to hide them) and I’m sure I still have entities in the conf. files that should not be there.

Thanks in advance for your help.

Emmanuel

Zwave nodes are stored in a xml file in your config directory. Easier to just pop it open in Notepad++ and remove anything ‘dead’.

thanks!
I found a config/zwcfg_0xf6a6645f.xml containing all the entities.

Just make sure you have stopped HA before editing the xml file.

I did. However, a new xml gets generated once I restart HA.
Is it possible?

If it is the case, I believe that I should first cleanup at the controller level and then the xml file. Correct?

I don’t know why a new file would be created, unless you didn’t keep the same file name. If you are trying to get ride of some nodes, have you tried going through the Configuration > Zwave menu to remove nodes?

Yes exclude/remove them from the controller, then modify your XML altho they should technically sync.

1 Like

I might have been too quick in deleting entities from the zwcfg_xxxx.xml file… I actually renamed it and restarted Home Assistant.

Now, one on the node does not show up in the list of nodes in Home Assistant: Node 10 is missing
2018-09-03_21-56-12

However, when I look at the logs (OZW Log), I can see that actions on that node are actually received by the controller:

Furthermore, I noticed that the zwcf_xxx.xml file has not been re-generated. I need to click on save to generate it.

How can I get the node to show-up again?

Alternatively, can I:

  • generate the file again (by clicking on save)
  • and merge the missing node from the backup xml file I created?

Thanks in advance for your help! :slight_smile:

As long as you didn’t exclude it, yes. Make sure homeassistant isn’t running when you modify the files.

I’m doomed… the backup I thought I had actually does not have the missing node… :frowning:

I believe my only option is now:

  • exclude the node from my controller
  • re-include it

I should probably do it directly on the controller (Aeotec ZW090 Z-Stick Gen5 EU) since I believe I cannot do it from Home Assistant (ZWave config / Remove Node, since the node does not show up)

Using remove node then doing the exclusion process on the device sometimes still works.

I’m back in business by doing:

Then everything is back to normal…

Time to play a bit and figure out the automations… :smiley:

You want to get away from removing the zwave controller and pressing the button to add devices. This is especially critical with zwave-plus devices if you want to add them in secure mode (this is required for some devices such as locks). Instead, use the zwave network managment menus under Configuration to add nodes.

For his specific issue jaepetto was doing it the right way really. His specific case using the hardware button was the proper solution.

I wish I could. But how can you remove a node that does not show up in the list of nodes?