Z-wave XML config files

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!

Just to be sure, what was your service call data? Based on the XML, you’d want something like this to change “Speed motor I”:

node_id: <id>
parameter: 7
value: 1
size: 1

Size should be set in this case, otherwise if you leave it out it defaults to 2. If you set the wrong size the device will ignore the command.

Just tried having my breakfast… its no go :/. Tried the service call with a WRGB dimmer I know I can set programmed scene and the call worked so wasn’t syntax etc.

Thanks for your help; I’ve learnt something at least!

THANKS!!!

Thank you. This was exactly the straight forward info I was missing.

I’m having a similar issue. It seems none of my Zooz devices are recognized, and it may be only because the config file has the hex letters capitalized, whereas the data from the device does not. Can anyone confirm that?

From zwcfg:

<Node id="19" name="" location="" basic="4" generic="17" specific="1" roletype="5" devicetype="1540" nodetype="0" type="Multilevel Power Switch" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
		<Manufacturer id="27a" name="Zooz">
			<Product type="a000" id="a008" name="Unknown: type=a000, id=a008" />
		</Manufacturer>

Note the id’s from the device are a000, and a008.

From the config:

<MetaDataItem id="A008" name="ZWProductPage" type="A000">https://products.z-wavealliance.org/products/3791</MetaDataItem>
<MetaDataItem id="A008" name="FrequencyName" type="A000">U.S. / Canada / Mexico</MetaDataItem>
<MetaDataItem id="A008" name="Identifier" type="A000">ZEN30</MetaDataItem>

There it seems the id is A008, and type A000.