I know this is an old thread, but there isn’t much information on this at all and it’s not clearly outlined in the docs either. So I thought I would post and cross link from some other threads to this one to hopefully help explain what I’ve learned from trial & error.
Here is what I’ve gathered that is needed to get a health z-wave network going from a configuration and files perspective.
This post here (from above) is very useful, but I want to add a couple more details I’ve discovered through trial and error.
There are 3 key configuration elements for my z-wave setup to finally work fully:
- Openzwave ‘config’ folders
-
zwcfg_XXXXXX.xml & zwscene.xml file dependencies
-
options.xml for Secured Devices
Openzwave ‘config’ folders:
Depending on the installation you have (I have only used/researched the following), there are 3 valid places that the z-wave ‘config’ folder must be referenced. So to help manage this in one place, we will Symlink 2 of the sources to point to one that is the most practical as a best-practice (I selected it because it’s part of the /srv/homeassistant/ application directory, doesn’t contain versions, and as far as I can tell, is least likely to change).
For each of the following, we will symlink the two listed to all to point to the one target to manage them here:
HASSbian:
/srv/homeassistant/src/python-openzwave/openzwave/config
AIO Installer (prior to December 2016):
/srv/hass/hass_venv/src/python-openzwave/openzwave/config
AIO Installer:
/srv/homeassistant/homeassistant_venv/src/python-openzwave/openzwave/config
The following are all of the ‘config’ folder locations that I’ve found need to be updated for z-wave to function fully; each of these following paths would be updated by deleting the config folder from all 3 locations (create a backup/rename it to be safe) and then re-create a Symlinked folder pointing to the respective location above (simply used WinSCP to create the symlinks from Windows most easily (:
HASSbian:
/srv/homeassistant/src/open-zwave-control-panel/config
Note, the version numbers in the next path may differ…
/srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.4.0.31.egg-info/config
AIO Installer via apt-get (installed Prior to December 2016; more info here):
/srv/hass/hass_venv/src/open-zwave-control-panel/config
Note, the version numbers in the next path may differ…
/srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.4.0.31.egg-info/config
AIO Installer via apt-get (recently installed):
/srv/homeassistant/homeassistant_venv/src/open-zwave-control-panel/config
Note, the version numbers in the next path may differ…
/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/libopenzwave-0.4.0.31.egg-info/config
zwcfg_XXXXXX.xml & zwscene.xml:
HomeAssistant is dependent on these files to actually drive the Z-Wave entity configurations within HomeAssistant. I read some details, but can not recall where I found them, but this is a cached configuration file holding all of the data read from Z-Wave nodes/devices. This file is constructed by the Open Z-Wave Control Panel application (OZWCP) and stored when you click “save” in the top right side of OZWCP (fyi, some useful information on managing and “saving” devices and their data with OZWCP can be found here).
These files are expected to exist within the .homeassistant configuration folder, so rather than copy them, as I’ve read in many posts, I also want to manage these in only one place. And since they are generated by the OZWCP application (the more powerful Z-Wave config UI vs HomeAssistant itself), I think the best-practice is to leave them where they are and then symlink to them directly at the file level.
So, regardless of your installation, you will want to symlink the following files in the .homeassistant configuration folder to their respective locations within the open-zwave-control-panel application folder as follows:
/home/homeassistant/.homeassistant/zwcfg_XXXXXXX.xml ==symlinked to==> /home/homeassistant/.homeassistant/open-zwave-control-panel/zwcfg_XXXXXXX.xml
and
/home/homeassistant/.homeassistant/zwscene.xml ==symlinked to==> /home/homeassistant/.homeassistant/open-zwave-control-panel/zwscene.xml
options.xml for Secured Devices:
This file is where you must specify a valid Encryption Key for adding Secure devices to your z-wave network. This is described really well in the docs here under ‘adding secure devices’.
This is stored inside the OZWCP config folder. However, since we’ve already updated all of our ‘config’ folder references (above), now this file is in one place so we can edit it in this location:
HASSbian:
/srv/homeassistant/src/python-openzwave/openzwave/config/options.xml
AIO Installer (prior to December 2016):
/srv/hass/hass_venv/src/python-openzwave/openzwave/config
AIO Installer:
/srv/homeassistant/homeassistant_venv/src/python-openzwave/openzwave/config
BUT, because I wanted to more easily manage my options.xml file while debugging secure devices, I did take it one step further. I created a new folder in my .homeassistant configuration folder so that I could easily update/debug from my samba share via Windows (on HASSBian):
/home/homeassistant/.homeassistant/zwave-config
Then I copied the options.xml into this folder (from the above location), and symlinked to this file directly:
/srv/homeassistant/src/python-openzwave/openzwave/config/options.xml ==symlinked to==> /home/homeassistant/.homeassistant/zwave-config/options.xml
Additional ‘config’ folder and ‘options.xml’ locations that can be ignored (and just added confusion):
I also found that z-wave config folders and options.xml files existed at the following paths . . . but they do not seem to be relevant so I did not touch them. My system is functioning fully, with secure Lock devices, so I think these paths can be ignored:
HASSBian (note: I did’nt confirm if similar folders existed on the AIO installation, but I suspect they do):
/srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config
/srv/homeassistant/lib/python3.4/site-packages/python_openzwave-0.4.0.31-py3.4-linux-armv7l.egg/python_openzwave/ozw_config