How to add a device to OpenZWave for support in Home Assistant

Tags: #<Tag:0x00007f7396356950>

I just got a new Zwave Fan Speed controller from Leviton and it’s not currently listed in OpenZwave and therefore doesn’t show up correctly in Home Assistant.

I’ve started to add the device myself and contribute to their open source project, but I’ve hit my technicaly ability limitation and don’t know what to do from here.

I’ve been going through the instruction listed in https://github.com/OpenZWave/open-zwave/wiki/Adding-Devices

And I’ve got a pull request pending to add the device to the device list. I have one waiting for the device image and I have a config file I’m editing.

But I don’t know how to finish this config file.

This section on Creating Configuration Variables is above my pay grade, I don’t understand at all.

Any one have experience with this?

Here’s my config file -> https://github.com/chansearrington/open-zwave/blob/99bc1dc63f1e24e7f647515b38ff9bd4f906c55b/config/leviton/zw4sf.xml

And here’s the link to the device
https://products.z-wavealliance.org/products/3832

Any help is greatly appreciated.

Right now HA is howing this as an unkown lite. :frowning:

I would start by looking at how other fan controls are done. The one I have is mapped to the configuration file of a dimmer of the same brand - the code in the manufactorer configuration looks like:

<Product config="ge/12724-dimmer.xml" id="3131" name="14287 Fan Control Switch" type="4944"/>

You could probably do the same - since the basic class would probably look the same - it sets a numeric value between 0 and 255 to set the speed.

What you may have to implement differently is the configuration parameters block - your switch has a couple specified.

In the command class 112, for example, you could add a configuration like this:

<CommandClass id="112">
    <Value genre="config" index="5" label="Preset Level" max="1" min="0" size="1" type="list" value="0">
      <Help>Preset Level for On</Help>
      <Item label="Last Speed" value="0"/>
      <Item label="Level" value="1"/>
    </Value>
</CommandClass>

The values come from the configuration parameters of your device in the z-wave alliance page. The example above is for the parameter 5 - index in the configuration file, just to confuse things. The values you can figure out from the documentation.

And so on.

I recommend you change the files in your open-zwave local configuration to make sure it works before submitting upstream.

1 Like

Thanks! This helps a ton!

How would I add this to my local HA instance to test before I submit a pull request?

I did my first (and so far only) pull request for a new device several months ago, and like mrwho, I did a compare of the xml files for a device(s) from the same manufacturer, and also a compare of xml files for a similar device from a different manufacturer to get a feel for how to do your own.

1 Like

Assuming you’re using the OpenZWave integration, you should be able to edit the files in the addon data folder. You would find it in the configuration folder of home assistant, under the addons folder.

1 Like