Long story short, I had an all-in-one install working fine for the past 6 months or so with 19 z-wave devices. Ultimately I struggled to keep the 8g SD card I was using from filling up. I decided to start over with a larger SD card and used Hassbian 1.1 for the new install. Everything I had read previous told me that the Z-stick should save all of the device info like names, location etc and I would just need to plug it into the new install.
Well that hasn’t worked for me.
Hassbian installed fine and I ran the ozwcp script to get that installed. All devices show up, but only 3 have the names I gave them under the previous install. The rest are the generic device names so obviously none of my automation or front end is working correctly.
Not the end of the world, as I figured I could open up zwcp and recreate my names. I had my old configuration backed up anyways to pull names from. I stopped HA, ran ozwcp, renamed everything in oawcp, hit “SAVE” under “Backup Controller”, closed ozwcp and restarted HA with fingers crossed. No luck…
I can see the z wave config xml file getting re-written on most HA restarts as the timestamp for the file changes.
I then went back into ozwcp to check the naming and none of my previous names that I had just entered were stored… UGH. So I renamed everything a second time making sure to give it time to catch up. Hit save and restarted HA. Again no luck.
I have tried multiple config paths in my HA config file and none of them change anything.
Based on the hassbian ozwcp script, the makefile it is using seems to indicate:
“/srv/homeassistant/src/python-openzwave/openzwave” as the config location. The sim link that exists in my configuration folder is “/srv/homeassistant/lib/python3./site-packages/libopenzwave-0.-linux*.egg/config” based on the ozwcp install script.
I quit last night after working at it for 2 hours…
I feel like this is an issue that always comes up and it seems harder than it needs to be. With all of the various ways to install HA it just confuses things. Any help is appreciated as I’m obviously missing something simple.
The name info for devices is stored in the XML, not on the stick.
Here are the locations for my XML:
Open Zwave: /srv/hass/src/open-zwave-control-panel/zwcfg_XXX.xml
Hass: /home/hass/.homeassistant/zwcfg_XXX.xml
I’m not an OZCP expert, but I never use the “backup controller” feature when using OZCP - I just click “close” before exiting and that appears to update my XML.
After I do something that updates my XML, I copy it manually from OZCP’s location to HASS.
This is an All-in-One install. Pre December 2016 (which means my “hass” in the path may be “homeassistant” for others).
The name info for devices is stored in the XML, not on the stick.
OK if this is true, then that explains why the names weren’t brought over with the stick. It doesn’t explain why when I update the names in ozwcp they aren’t sticking or being updated in the xml.
I only hit “save” because I thought I was supposed to and it says “changes need saving” It has worked for me in the past.
I will search for the ozwcp zwcf xml file tonight to make sure I’m looking at the right one.
Yeah - after you click “close”, check the contents of the XML in the OZCP folder and see if your changes are reflected there. You should see a series of 's with name & location attributes that you’ve set.
Thanks - I understand how it’s “supposed” to work. It just never seems to work haha. For some reason when I check the OZWCP folder there is never an XML file in there so I must be looking in the wrong place. I will search for it tonight and see if I can figure out its location.
I have the same installation as @brett5150. Since you are successfully running ozwcp, you know that you have to cd to its directory before running it. There has been some discussion about ozwcp and homeassistant using the same zwcfg file. My current solution is to link the zwcfg_0x... file in .homeassistant to the open-zwave-control-panel one.
Start up the homeassistant virtual environment.
Switch to the .homeassistant directory.
The only place I’ve found to name your devices is in ozwcp.
I think that under some circumstances homeassistant writes the zwcfg file and deletes some of your names. Keep a copy of a working zwcfg file where homeassistant can’t get to it.
This is wrong from what I can tell, or atleast it was for my install. I deleted the above symlink and created a new one linking back to my zwcfg_xxx.xml file in the /srv/homeassistant/src/open-zwave-control-panel/ directory using the command @MojaveTom indicated.
I then removed the config_path under the zwave component in my HA configuration.yaml file as the default is to look in the HA configuration directory. I guess you could technically put /home/homeassistant/.homeassitant (or your actual config location if you wanted to.
I tried putting my zwcfg_xxx.xml file in a subdirectory of .homeassistant, and then used config_path: /home/homeassistant/.homeassistant/ZWaveConfig in my configuration.yaml file. Using config_path: totally confused homeassistant; it was looking for .xsd files and not finding them. I resolved that by using find to locate all the relevant .xsd and .xml files and putting links to them in the ZWaveConfig directory. In spite of all that, homeassistant insisted on reading zwcfg_xxx.xml from .homeassistant. My final configuration is to have config_path: /home/homeassistant/.homeassistant/ZWaveConfig in configuration.yaml and a link to zwcfg_xxx.xml as above in .homeassistant.
I was hoping I could collect all the z-wave related files in one directory and then create a git repository for it to keep track of various versions. That didn’t work; the only things in the ZWaveConfig directory are links to .xsd and .xml files in /srv/homeassistant/src/python-openzwave/openzwave/config/, plus zwscene.xml which is virtually empty since I haven’t figured out how to use z-wave scenes.
I think not using config_path: in configuration.yaml and putting a symlink in .homeassistant to zwcfg_xxx.xml may be the best way. I think specifying /home/homeassistant/.homeassistant for config_path would confuse homeassistant when it looks for the additional .xsd and .xml files.