Z-wave XML config files

Is there a way to add a z-wave configuration XML files in Hass.io ?

I would like to update the Fibaro ZMNHWD1 configuration XML file to include missing options so I can configure specific properties.

https://github.com/OpenZWave/open-zwave/blob/master/config/qubino/ZMNHWD1.xml

I’ve been searching for a while but can’t find the answer.

Thanks

If you have SSH access you can update the files in the python_openzwave ozw_config directory. The path on my server is /srv/homeassistant/lib/python3.6/site-packages/python_openzwave/ozw_config/. You will likely have to exclude and then re-include your device in order for it to pick up the new configuration. If you are able to do that and everything works as you expect I would recommend you submit a pull request to the openzwave project, more information can be found here https://github.com/OpenZWave/open-zwave/wiki/Adding-Devices.

Little bit of a frustrated rant, but also a legit need. I respect the HA devs ported their own fork of OpenZwave. But I have some devices that have been in the OpenZwave config for over TWO YEARS are still not part of the HA zwave default database. Having to exclude the devices, hack n slash some xml files and then re include them can’t be seen as a quality experience by the HA devs can it? Based on my time in the HA community, I just get the feeling no one really uses Zwave to the extent I do since I keep popping into zwave issue after zwave issue that exist in HA but not in OpenHab or Domoticz. oh well! If anyone has a good (detailed) tutorial on how to import manufacturer XML configs from openzwave into Hass.io it would be appreciated! I have even tried adding

zwave:
  usb_path: /dev/ttyACM0
  config_path: /config/z-wave/open-zwave/config

but Home assistant seems to give two censored about it because, well why not! Even though the OWZ logs confirm it is now using the open-zwave config directory, it still is not pulling in the right manufacturer database or xml files. Oh well, time to just rebuild for the 4th time, because, ya know, everyone loves building but no one loves using :slight_smile: (sorry for the rant, still ingesting coffee)

I can understand the frustration, it would be nice if there was a better way to keep the device configuration more current. I’m just a casual user of HA myself so I can’t speak for the developers but it is my understanding the openzwave fork had something to do with openzwave taking too long to implement the “Barrier” command class. Here is what I have been doing to try to keep the config up to date with openzwave.

Clone the openzwave repository (I checked it out in /home/homeassistant/git on my machine)
git clone https://github.com/OpenZWave/open-zwave.git

Copy the config directory out without the “.git” directories
sudo rsync -a --exclude='.git/' git/open-zwave/config/ open-zwave-master/config/

Copy from the new config directory to the ozw_config directory in the python lib directory and make sure it has the correct owner/group
sudo rsync -avh open-zwave-master/config/ /srv/homeassistant/lib/python3.6/site-packages/python_openzwave/ozw_config/
sudo chown -R homeassistant:homeassistant /srv/homeassistant/lib/python3.6/site-packages/python_openzwave/ozw_config/

When openzwave updates the config directory you can update it on your machine by pulling the changes and re-running the last three commands (I have them in a bash script, I probably should set up cron to keep it up to date)
cd git/open-zwave && git pull

I have been running home-assistant using hassbian on a raspberry pi, I’m not sure how different hass.io is (truth be told I don’t know much about hass.io). I know its not the prettiest solution but hopefully it helps. The beauty of open source is you are free to contribute if you come up with a better way. :wink:

HA has a built-in service call to update the config files, but it doesn’t actually work. The upstream project has been fixed for months but for whatever reason the HA fork is not pulling in fixes. https://github.com/home-assistant/home-assistant/issues/19893

I also manage my own config files with git. If your config looks like this:

zwave:
  config_path: /config/z-wave/open-zwave/config

Then you can use git to setup the config directory:

mkdir /config/z-wave
cd /config/z-wave
git clone --depth=1 https://github.com/OpenZWave/open-zwave.git

You can skip the rsync if you use your own config_path.

If you’re using Hassio then the default config files live inside the container. Every time you upgrade Hassio you will lose any config file updates because the docker image contains the installed files, which are almost always older. So for Hassio I would recommend you store the config files in the persistent data volume anyways. If the devs ever fix the pyozw fork, then you can go back to using the zwave.update_config service instead of using git, along with the custom path.

2 Likes

Thanks for your reply! This seems to be exactly what I was looking for.
Will try this shortly !

When I copied over the files, I lost all my existing configs. How can I tell which file is my current config? I assume then I can just drop in ‘/config/z-wave/open-zwave/config’

What are you trying to do exactly? If you have config_path in your configuration.yaml file, then that’s the path it is using. If you go through my message history you can find a python command to display the autodetect path.

You should be wary of topics that are 7 months old, this information in this topic is outdated now. If you want to use config files from OpenZWave you need to use the 1.4 branch. Currently there are only a handful of devices that exist in OpenZWave 1.4 but are missing from HA. So using config path is unnecessary unless you need to make manual changes, or have one of those missing devices.

When you say

So for Hassio I would recommend you store the config files in the persistent data volume anyways.

… I’m using Hassio with docker but I’m using the native ZWave config panel (not the OZWCP) and I think I’m missing some functionality from some of my zwave devices. From what I can tell I might be able to fix this by using an updated version of OpenZwave by doing the following:

  1. Download the master branch from GitHub - OpenZWave/open-zwave: a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
  2. From that download, rename the folder “config” to “openzwave_config”
  3. Copy that into my hassio/config directory (alongside all my hassio config files)
  4. Add the following code fo my configuration.yaml file:
zwave:
  config_path: /config/openzwave_config
  1. Restart Hassio and now my Zwave network and all devices should be able to reference/use the updated files/code in the new config directory?

Almost. The OZW master branch has v1.6 config files. You want v1.4 files, so you would download the v1.4 HASS fork instead.

If there is some config you need from 1.6, you’ll want to convert it to the 1.4 format. Sometimes there is nothing to change, depends on the device.

1 Like

Ah ok, so download the 1.4 HASS fork which will be newer than whatever comes pre-configured in the Hassio install? If absolutely necessary I might want to cherry pick some xml files or even individual lines of code from somewhere deep in the 1.6 files for a specific device.

The latest version of HA already comes with the most up-to-date config files. The HASS fork includes all of the OZW 1.4 files plus a few extras. There is no need to download unless you want to modify them.

So the HASS fork is newer than the version included in the HA install? Or it’s the same and I should only bother downloading if I want to modify it with items included in OZW 1.5 or 1.6?

No, the HA fork is not newer than what’s installed with HA 0.103, it ships with the latest set of files in the fork (at the time this comment was written), specifically it’s these files. When in doubt, you can locate the files within your HA install to verify.

To be clear:

  • The HA fork of OZW is based on OZW 1.4. It has all of the same config files as upstream OZW 1.4, plus some extras that are not in upstream 1.4.
  • When you install HA, it includes a snapshot of the config files in the HA OZW fork.
  • OZW 1.6 is newer and has more config files, but they are incompatible (in general) with 1.4.

If the HA fork does not have a config file for your device, then in that case you’d want to look at OZW 1.6 (master branch) and see if it exists. If it does, you may need to do some work to backport it to 1.4.

In any case, when you want to setup a custom config path in HA, it’s just better to base it off of the HA fork so that you’re including those additional files that have been added.

4 Likes

THANK YOU so much for the detailed explanation. I’m very much still learning all this stuff and responses like these are so tremendously helpful.

Did you manage to get it sorted??

I’ve downloaded the V1.4 files from the HASS fork; added

zwave:
  config_path: /config/openzwave_config

Removed the node, rebooted hass.io, re-added the node, rebooted again and still do not have the additional configuration parameters foe my device?? ( FYI - Checked they were in the xml files!)

I’ve read through; but is there a line in the OZW log that shows which folder it is using? I couldn’t see it!

What version of HA are you using? If you are running HA 0.107 then the config files are the same as what you would have downloaded from the HASS fork, so there would be no difference.

The OZW log does not show the config path.

What device are you trying to use?

Im 107.07; and the device I’m using ( Fakro ZWS12) is 3 yr old! But in xml has configuration parameters that I want; but can’t access? I figured trying the code myself would help…

There are no config parameters under the Node; and below is the node info from my zwave.cfg file… as you can see no configuration parameters. But the Manufacturer, and ID’s match?!!

<Node id="49" name="" location="" basic="4" generic="17" specific="6" type="Motor Control Class B" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete"> <Manufacturer id="85" name="Fakro"> <Product type="3" id="1" name="ZWS12 Chain actuator 12VDC" /> </Manufacturer> <CommandClasses> <CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" request_flags="4" mapping="38"> <Instance index="1" /> </CommandClass> <CommandClass id="37" name="COMMAND_CLASS_SWITCH_BINARY" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="bool" genre="user" instance="1" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" /> </CommandClass> <CommandClass id="38" name="COMMAND_CLASS_SWITCH_MULTILEVEL" version="3" innif="true"> <Instance index="1" /> <Value type="byte" genre="user" instance="1" index="0" label="Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="255" /> <Value type="button" genre="user" instance="1" index="1" label="Open" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" /> <Value type="button" genre="user" instance="1" index="2" label="Close" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" /> <Value type="bool" genre="system" instance="1" index="3" label="Ignore Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" /> <Value type="byte" genre="system" instance="1" index="4" label="Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" /> </CommandClass> <CommandClass id="39" name="COMMAND_CLASS_SWITCH_ALL" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="list" genre="system" instance="1" index="0" label="Switch All" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="3" size="1"> <Item label="Disabled" value="0" /> <Item label="Off Enabled" value="1" /> <Item label="On Enabled" value="2" /> <Item label="On and Off Enabled" value="255" /> </Value> </CommandClass> <CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true"> <Instance index="1" /> </CommandClass> <CommandClass id="115" name="COMMAND_CLASS_POWERLEVEL" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="list" genre="system" instance="1" index="0" label="Powerlevel" units="dB" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1"> <Item label="Normal" value="0" /> <Item label="-1dB" value="1" /> <Item label="-2dB" value="2" /> <Item label="-3dB" value="3" /> <Item label="-4dB" value="4" /> <Item label="-5dB" value="5" /> <Item label="-6dB" value="6" /> <Item label="-7dB" value="7" /> <Item label="-8dB" value="8" /> <Item label="-9dB" value="9" /> </Value> <Value type="byte" genre="system" instance="1" index="1" label="Timeout" units="seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" /> <Value type="button" genre="system" instance="1" index="2" label="Set Powerlevel" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" /> <Value type="byte" genre="system" instance="1" index="3" label="Test Node" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" /> <Value type="list" genre="system" instance="1" index="4" label="Test Powerlevel" units="dB" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1"> <Item label="Normal" value="0" /> <Item label="-1dB" value="1" /> <Item label="-2dB" value="2" /> <Item label="-3dB" value="3" /> <Item label="-4dB" value="4" /> <Item label="-5dB" value="5" /> <Item label="-6dB" value="6" /> <Item label="-7dB" value="7" /> <Item label="-8dB" value="8" /> <Item label="-9dB" value="9" /> </Value> <Value type="short" genre="system" instance="1" index="5" label="Frame Count" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-32768" max="32767" value="0" /> <Value type="button" genre="system" instance="1" index="6" label="Test" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" /> <Value type="button" genre="system" instance="1" index="7" label="Report" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" /> <Value type="list" genre="system" instance="1" index="8" label="Test Status" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1"> <Item label="Failed" value="0" /> <Item label="Success" value="1" /> <Item label="In Progress" value="2" /> </Value> <Value type="short" genre="system" instance="1" index="9" label="Acked Frames" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-32768" max="32767" value="0" /> </CommandClass> <CommandClass id="117" name="COMMAND_CLASS_PROTECTION" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="list" genre="system" instance="1" index="0" label="Protection" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1"> <Item label="Unprotected" value="0" /> <Item label="Protection by Sequence" value="1" /> <Item label="No Operation Possible" value="2" /> </Value> </CommandClass> <CommandClass id="133" name="COMMAND_CLASS_ASSOCIATION" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Associations num_groups="1"> <Group index="1" max_associations="5" label="Lifeline" auto="true"> <Node id="1" /> </Group> </Associations> </CommandClass> <CommandClass id="134" name="COMMAND_CLASS_VERSION" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="string" genre="system" instance="1" index="0" label="Library Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="3" /> <Value type="string" genre="system" instance="1" index="1" label="Protocol Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="3.42" /> <Value type="string" genre="system" instance="1" index="2" label="Application Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="4.13" /> </CommandClass> <CommandClass id="152" name="COMMAND_CLASS_SECURITY" version="1" request_flags="4" innif="true"> <Instance index="1" /> <Value type="bool" genre="system" instance="1" index="0" label="Secured" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" /> </CommandClass> </CommandClasses> </Node>

The configuration parameters in that file are all commented out, thus there are no config parameters as far as OZW and HA are concerned.

The parameters were commented out in this commit, with the message “Configuration parameters are not yet implemented in this version”. Since you have your own config files downloaded, you can delete the comment markers <!-- (line 5) and --> (line 57) and give it a try.

But you also don’t need the XML file to set config parameters, just use the zwave.set_config_parameter service call with the params and values you want.

The zwave product db lists two versions of the ZWS12. The older one that you have does not list any config parameters in the DB. It’s not always accurate of course, but just be aware, it could be your version does not implement it as the OZW commit says. The newer one that supports zwave plus (and has different product ID and type) has some config params defined, but it doesn’t match 100% with the config file.

Ah mate; thank you VERY much. Ive been deliberating over that for days…

I tried the service call but it don’t work… I presumed it was because it wasn’t defined in the xml file. However; now I;ve looked and your right… I have the older non z-wave plus.

Thanks for you time; much appreciated!