If you want to see what the auto-detected config path is set to, you can do it with some python. Run this command, replacing /dev/ttyACM0
with your z-stick’s path:
python -c 'from openzwave.option import ZWaveOption; option = ZWaveOption("/dev/ttyACM0"); print(option.config_path)'`.
Be sure to use the python where HA is installed, e.g. if it’s a virtualenv make sure you activate it first.
Example from my venv. Note that it’s not the default and I installed the configs to /usr/local/etc/openzwave to manage them myself.
(homeassistant-3.6.3) homeassistant@hasspi:~/.homeassistant$ python -c 'from openzwave.option import ZWaveOption; option = ZWaveOption("/dev/ttyACM0"); print(option.config_path)'
/usr/local/etc/openzwave/
In a normal installation, without any configuration, the location of the XML files is in the python-openzwave
module install path. For example, in my python virtualenv the location is ~/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/lib/python3.6/site-packages/python_openzwave/ozw_config
. So depending on how your python enviroment is setup, it will be in the site-packages path.
If you don’t specify a config_path
value in the configuration.yaml, then pyozw will automatically search for it (source code).
So according to the priorities, it would search:
- The directory specified by
config_path
in the configuration.yaml zwave config.
/etc/openzwave
/usr/local/etc/openzwave
- The
python_openzwave.ozw_config
package resource directory, e.g. <python install>/site-packages/python_openzwave/ozw_config
. This is the path I mentioned above.
-
<current dir>/openzwave/config
. The current directory would depend on entirely how hass
is started.
/usr/config
/usr/local/config
/usr/share/openzwave/config
/usr/local/share/openzwave/config
- some obscure locations related to a libopenzwave python distribution
If any of the paths from 1-4 are missing the file device_classes.xml
then they will be ignored. Paths 6-10 are “historical”, and are unlikely to be encountered.
If pyozw cannot find a valid config path it will throw an exception and zwave will never start.
I’m not sure how pyozw would look for <config directory>/config/
, but I maybe I just missed it. There is a separate “user path” that configures where OZW saves logs and the zwcfg*.xml file, that is set to <HA config directory>
(for my venv, ~/.homeassistant
), but that location is not where config XML files are loaded from; except if using the C++ library directly, when omitting a config path OZW will search for <current directory>/config/
(pyozw prevents this from happening).