OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
355 stars 93 forks source link

[NB] how to add custom devices #279

Closed jaburges closed 4 years ago

jaburges commented 4 years ago

Hi there, hopefully of use to others when using custom device.xml. A few things needed, most importantly mapping the correct folder in the zwave2mqtt docker.

  1. map this location /usr/local/etc/openzwave/ to a local folder. your docker command will be something like this:

    docker run --name=zwave2mqtt --restart=always -it -p 8091:8091 --device=/dev/serial/by-id/usb-0658_0200-if00 -e TZ=America/Los_Angeles -v /home/user/docker/zwave2mqtt16:/usr/src/app/store -v /home/user/docker/zwave2mqtt16/config:/usr/local/etc/openzwave robertslando/zwave2mqtt:2.2.0
  2. Clone the OZW rep and copy ALL the files from the OZW config folder into the local config folder you mapped above. When the docker starts the new files will be loaded into the container (and it is persistent now so changes will remain) PLUS its also easier to edit if needed.

  3. You will need to edit a couple more things. The list of devices OZW uses to identify what is what called manufacturer_specific.xml and the device.xml itself. Part 1: Firstly edit the device xml you want to add simply by ammending the revision number at the top to a very high number (which prevents it from being over written when OZW 1.6 queries for updates. If your device eventually gets an official release, you can change/update later. Top line:

    Product Revision="999"

    Then move the device.xml to where it needs to be. In my case the Inovelli lzn31.xml device into the innovelli folder inside the config directory: config inovelli lzn31.xml

Part 2: Now finally, you need to tell OZW it exists, and how to identify it (note you'll sometimes see device types show up as unknown id=0004 type=0001. Edit the manufacturer_specific.xml to include the device id and type or the zwave device you want to be identified like so: [Be sure to check for the right Manufacturer block to simply add your device within]

  <Manufacturer id="031E" name="Inovelli">
    <Product type="0002" id="0001" name="LZW30-SN Switch Red Series" config="inovelli/lzw30-sn.xml"/>
    <Product type="0004" id="0001" name="Test Fan" config="inovelli/lzw30.xml"/>
    <Product type="0001" id="0001" name="LZW31-SN Dimmer Red Series" config="inovelli/lzw31-sn.xml"/>
    <Product type="0003" id="0001" name="LZW31 Dimmer" config="inovelli/lzw31.xml"/>
    <Product type="0005" id="0001" name="LZW42 Multi-Color Bulb" config="inovelli/lzw42.xml"/>
    <Product type="0006" id="0001" name="LZW41 Multi-White Bulb" config="inovelli/lzw41.xml"/>
    <Product type="0007" id="0001" name="LZW40 Dimmable  Bulb" config="inovelli/lzw40.xml"/>
  </Manufacturer>
robertsLando commented 4 years ago

Thank you so much for this 🙏🏻

On 29 Feb 2020, at 05:03, jaburges notifications@github.com wrote:

 Hi there, hopefully of use to others when using custom device.xml. A few things needed, most importantly mapping the correct folder in the zwave2mqtt docker.

map this location /usr/local/etc/openzwave/ to a local folder. your docker command will be something like this: docker run --name=zwave2mqtt --restart=always -it -p 8091:8091 --device=/dev/serial/by-id/usb-0658_0200-if00 -e TZ=America/Los_Angeles -v /home/user/docker/zwave2mqtt16:/usr/src/app/store -v /home/user/docker/zwave2mqtt16/config:/usr/local/etc/openzwave robertslando/zwave2mqtt:2.2.0 Clone the OZW rep and copy ALL the files from the OZW config folder into the local config folder you mapped above. When the docker starts the new files will be loaded into the container (and it is persistent now so changes will remain) PLUS its also easier to edit if needed.

You will need to edit a couple more things. The list of devices OZW uses to identify what is what called manufacturer_specific.xml and the device.xml itself. Part 1: Firstly edit the device xml you want to add simply by ammending the revision number at the top to a very high number (which prevents it from being over written when OZW 1.6 queries for updates. If your device eventually gets an official release, you can change/update later. Top line:

Product Revision="999" Then move the device.xml to where it needs to be. In my case the Inovelli lzn31.xml device into the innovelli folder inside the config directory: config inovelli lzn31.xml

Part 2: Now finally, you need to tell OZW it exists, and how to identify it (note you'll sometimes see device types show up as unknown id=0004 type=0001. Edit the manufacturer_specific.xml to include the device id and type or the zwave device you want to be identified like so: [Be sure to check for the right Manufacturer block to simply add your device within]

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

robertsLando commented 4 years ago

I also add a link to this guide: https://github.com/robertsLando/Zwave2Mqtt-docker#auto-update-ozw-device-database

jaburges commented 4 years ago

@robertsLando in the 3.0.0 I confirmed your guide works. Closing this for your persistent guide.

robertsLando commented 4 years ago

@jaburges Thanks for the feedback!