Z-wave config files for Inovelli LZW60 with Home Assistant docker

I have an Inovelli LZW60 multi-sensor, and Home Assistant set up in a Docker (on Unraid). I have tried to follow the instructions here, but I don’t know where any of the openzwave config folders are.

Currently the device is working, but I can’t set parameters.

Any help would be much appreciated.

The Inovelli lzw60 has a config xml already in the new OpenZwave. I can find this at:

/usr/share/hassio/addons/data/core_zwave/ozw/config/inovelli

However, if you are using the older Zwave implementation then that path may point you in the right direction. You could try:

# cd /usr/share/hassio
# find ./ -name "*.xml"

Which will find all the xml files at that point down and there are loads of them for open Zwave.

Changes may get overwritten on upgrades …

1 Like

Thanks Jon, I’m not using HassIO, rather this docker: https://hub.docker.com/r/homeassistant/home-assistant/

I assume that I don’t have the config xml, the device showing up as “Unknown: type=000d, id=0001”.

So I don’t have a hassio folder in /usr/share. I don’t suppose that you know where I might find it in this context?

My HAs run on docker as well and I don’t use HassIO either. That path is valid for: “Home Assistant Supervised”

I’ll try out that image you linked to on my laptop now.

Could you tell me what installation_type you have listed at: Configuration -> Info -> System Health?

Home Assistant Container

OK the wine is kicking in but I’ve got a container up and running 8)

installation_type Home Assistant Container

I had to specify the location of /config. I ran this:

$ docker run --init -d --name="home-assistant" -e "TZ=Europe/London" -v /home/BLUELOOP/gerdesj/docker/test-ha:/config -p 8123:8123 homeassistant/home-assistant:latest

-v is a volume and is mapped to /config inside the container. That is your equivalent to /usr/share/hassio In my case here, I specified a sub directory of my home directory.

I suspect that you are running the “old” OpenZwave and that is version 1.4. The new one looks like it will be superb but it is beta grade at the moment. However it includes ozw 1.6 which has support for your device. Me? I’d switch to the new one.

Although there is some controversy about HA Supervised, it is the best set up as far as I’m concerned (sysadmin for nearly 30 years). You get a full Hass system on a full Linux distro.

However, the new OpenZwave is also a container. You get it “for free” with supervised or DIY as a container: https://github.com/OpenZWave/ozw-admin

Get “Portainer” up and running. It will tell you with a nice pretty web GUI where your volumes are coming from.

Thanks heaps for that Jon, I really appreciate it. I’m running in Unraid, so do have quite a nice GUI for Docker, but maybe there is something that I’m missing. Is the config mapping the folder in which I would find configurations.yaml etc?

$ docker run --init -d --name="home-assistant" -e "TZ=Europe/London" -v /home/gerdesj/docker/test-ha:/config -p 8123:8123 homeassistant/home-assistant:latest
da9f457140901d04f09686d4e7dd764405c04cbac633eda5b897880424cbc334

$ docker ps
CONTAINER ID        IMAGE                                 COMMAND             CREATED             STATUS              PORTS                    NAMES
da9f45714090        homeassistant/home-assistant:latest   "/init"             47 seconds ago      Up 45 seconds       0.0.0.0:8123->8123/tcp   home-assistant

$ docker exec -it home-assistant  /bin/bash
bash-5.0#

Right, now we are talking!

# find / -name "*.xml"

and we get this path:

/usr/local/lib/python3.8/site-packages/python_openzwave/ozw_config/

If you fiddle with files in there they will get overwritten on an update. Off the top of my head a docker-compose job might be a good idea because you could deploy your changes into the container. Failing that, for simplicity keep your changes available and re apply them when updating the container.

I’m running fishwaldo’s OZW 1.6 in a separate docker container on a Pi where my RaZberry hat is which is separate from Debian box running HA. That way I just re-pull to get the latest & greatest and not have to wait for HA to implement a newer rev.

docker_version  | 19.03.12
------
hassio  | true
host_os  | Debian GNU/Linux 10 (buster)
installation_type  | Home Assistant Supervised
docker pull openzwave/ozwdaemon:allinone-latest
docker run -d \
 --name ozwd \
 --restart=unless-stopped \
 --security-opt seccomp=unconfined \
 --device=/dev/ttyAMA0 \
 -v $PWD/ozw:/opt/ozw/config \
 -e MQTT_SERVER="192.168.1.104" \
 -e MQTT_USERNAME="homeassistant" \
 -e MQTT_PASSWORD="Aighio8ooVa3xaif4aipha2gi..........ohmeiph8Ciuthu8ThieHoopie0uth" \
 -e USB_PATH=/dev/ttyAMA0 \
 -e OZW_NETWORK_KEY=0xBC,0x87,0xD5, , , , , , , , , , , ,0xF9,0xD6,0x17 \
 -p 1983:1983 \
 -p 5901:5901 \
 -p 7800:7800 \
 openzwave/ozwdaemon:allinone-latest

Here is the inovelli “031E” section from my manufacturer_specific.xml:

  <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="LZW30 Switch" 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"/>
    <Product type="000d" id="0001" name="LZW60 4-in-1 Sensor" config="inovelli/lzw60.xml"/>
    <Product type="000e" id="0001" name="LZW36 Fan/Light Dimmer" config="inovelli/lzw36.xml"/>
  </Manufacturer>

Here is my inovelli/lzw60.xml:

<Product Revision="1" xmlns="https://github.com/OpenZWave/open-zwave">
  <MetaData>
    <MetaDataItem name="OzwInfoPage">http://www.openzwave.com/device-database/031E:000d:0001</MetaDataItem>
    <MetaDataItem name="ProductPic">images/inovelli/lzw60.png</MetaDataItem>
    <MetaDataItem id="0001" name="ZWProductPage" type="000d">https://products.z-wavealliance.org/products/3723</MetaDataItem>
    <MetaDataItem name="ProductPage">https://inovelli.com/shop/smart-sensors/z-wave-4-in-1-sensor/</MetaDataItem>
    <MetaDataItem name="ProductSupport">https://inovelli.com/shop/smart-sensors/z-wave-4-in-1-sensor/</MetaDataItem>
    <MetaDataItem name="ExclusionDescription">To Exclude your switch, put your HUB in exclusion mode and press the Sensor Button on the back of the device one (1) time.</MetaDataItem>
    <MetaDataItem id="0001" name="FrequencyName" type="000d">U.S. / Canada / Mexico</MetaDataItem>
    <MetaDataItem name="ProductManual">https://products.z-wavealliance.org/ProductManual/File?folder=&amp;filename=product_documents/3723/Inovelli%204-1%20Sensor%20Manual.pdf</MetaDataItem>
    <MetaDataItem name="Description">Control and Monitor Temperature, Light, Motion, and Humidity with the 4 in 1 Sensor.</MetaDataItem>
    <MetaDataItem name="Name">LZW60 4-in-1 Sensor</MetaDataItem>
    <MetaDataItem id="0001" name="Identifier" type="000d">LZW60</MetaDataItem>
    <MetaDataItem name="InclusionDescription">To include your switch, start the inclusion process on your HUB and Sensor Button on the back of the device one (1) time.</MetaDataItem>

    <ChangeLog>
      <Entry author="Eric Maycock - [email protected]" date="7 Nov 2019" revision="1">Initial Release</Entry>
    </ChangeLog>
  </MetaData>
  <!-- Configuration Parameters -->
  <CommandClass id="112">
    <Value genre="config" type="byte" size="1" index="10" label="Low Battery Power Level Alarm" min="10" max="50" value="10">
      <Help>
      Value at which the sensor reports low battery to the gateway
          Range:10-50
      Default: 10
      </Help>
    </Value>
    <Value genre="config" type="byte" size="1" index="12" label="PIR Sensitivity" min="0" max="10" value="8">
      <Help>
      Change the sensitivity of the PIR (Motion) Sensor
          0 = off, 1 = Low sensitivity, 10 = High sensitivity
      Default: 8
      </Help>
    </Value>
    <Value genre="config" type="short" size="2" index="13" label="PIR Trigger Time (seconds)" min="5" max="15300" value="30">
      <Help>
      The amount of seconds between motion detection (ie: the interval)
          Range:5-15300
      Default: 30
      </Help>
    </Value>
    <Value genre="config" type="list" size="1" index="14" label="Basic Set Command Send after PIR Trigger" min="0" max="1" value="0">
      <Help>
      Should Basic Set Command be sent after PIR is triggered? This is used to turn other devices on/off when motion is detected.
      Default: No
      </Help>
          <Item value="0" label="No"/>
          <Item value="1" label="Yes"/>
    </Value>
    <Value genre="config" type="list" size="1" index="15" label="PIR Trigger Correspondence Action" min="0" max="1" value="0">
      <Help>
      Ability to reverse the Basic Set behavior for devices associated in group 2
      Default: ON when motion is tripped, OFF when motion stops
      </Help>
          <Item value="0" label="ON when motion is tripped, OFF when motion stops"/>
          <Item value="1" label="OFF when motion is tripped, ON when motion stops"/>
    </Value>
    <Value genre="config" type="int" size="4" index="101" label="Temperature Sensor Read Interval" min="0" max="2768400" value="7200">
      <Help>
      The interval in which the temperature sensor is checked, in seconds. Set to 0 to disable (Note: will be rounded to the nearest minute)
      Default: 7200 (2 hours)
      </Help>
    </Value>
    <Value genre="config" type="int" size="4" index="102" label="Humidity Sensor Read Interval" min="0" max="2768400" value="7200">
      <Help>
      The interval in which the humidity sensor is checked, in seconds. Set to 0 to disable (Note: will be rounded to the nearest minute)
      Default: 7200 (2 hours)
      </Help>
    </Value>
    <Value genre="config" type="int" size="4" index="103" label="Luminance Sensor Read Interval" min="0" max="2768400" value="7200">
      <Help>
      The interval in which the luminance sensor is checked, in seconds. Set to 0 to disable (Note: will be rounded to the nearest minute)
      Default: 7200 (2 hours)
      </Help>
    </Value>
    <Value genre="config" type="int" size="4" index="104" label="Battery Level Read Interval" min="0" max="2768400" value="86400">
      <Help>
      The interval in which the battery level is checked, in seconds. Set to 0 to disable (Note: will be rounded to the nearest minute)
      Default: 86400 (24 hours)
      </Help>
    </Value>
    <Value genre="config" type="list" size="1" index="110" label="Sensor Report Method" min="0" max="1" value="0">
      <Help>
      Sensor reports are only checked at the interval defined in parameters 101-104.  Should the sensor data always be reported, or only if the value has changed more than the threshold configured in parameters 111-114?
          Always: Send sensor data every interval, even if the value did not change.
          Threshold: Send sensor data on interval, but only if the value has changed by more than the defined threshold since the last report was sent.
          Default: Always
      </Help>
          <Item value="0" label="Always"/>
          <Item value="1" label="Threshold" />
    </Value>
    <Value genre="config" type="short" size="2" index="111" label="Temperature Threshold" min="1" max="500" value="10">
      <Help>
      Set the temperature threshold of the sensor.  If Sensor Report Method = "Threshold", the temperature change must exceed this value in order to be reported to the hub.
          Range: 1-500
          1 = 0.1 degrees Celcius, 500 = 50 degrees Celcuis
      Default: 10 (1 degree Celcuis)
      </Help>
    </Value>
    <Value genre="config" type="byte" size="1" index="112" label="Humidity Threshold" min="1" max="32" value="5">
      <Help>
      Set the humidity threshold of the sensor.  If Sensor Report Method = "Threshold", the humidity change must exceed this value in order to be reported to the hub.
          Range: 1-32, 1 = 1%, 32 = 32%
      Default: 5%
      </Help>
    </Value>
    <Value genre="config" type="short" size="2" index="113" label="Luminance Threshold" min="1" max="65528" value="150">
      <Help>
      Set the luminance threshold of the sensor (in lux).  If Sensor Report Method = "Threshold", the luminance change must exceed this value in order to be reported to the hub.
          Range: 1-65528
      Default: 150
      </Help>
    </Value>
    <Value genre="config" type="byte" size="1" index="114" label="Battery Threshold" min="1" max="100" value="10">
      <Help>
      Set the battery threshold of the sensor (percent).  If Sensor Report Method = "Threshold", the battery level change must exceed this value in order to be reported to the hub.
          Range: 1-100
      Default: 10
      </Help>
    </Value>
  </CommandClass>

  <!-- Association Groups -->
  <CommandClass id="133">
    <Associations num_groups="2">
      <Group index="1" label="Lifeline" max_associations="5" />
      <Group index="2" label="PIR Trigger Basic Set" max_associations="5" />
    </Associations>
  </CommandClass>
</Product>

Hope that helps!

Thanks for the tip!!! Got “Portainer” up and running! It’s great!!

I finally now understand what -v $PWD/ozw:/opt/ozw/config \ actually means/does!
I was also able to fix my time/timezone inside the container via

mv /etc/localtime /etc/localtime.backup
ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime

and in figuring out the above, I think I can add -e TZ=America/Vancouver \ to my docker run command so I should not have to fix it in future…

Thanks both, Daniel is it straightforward to get an external Openzwave running with HA docker? Slightly worried about destroying my config!

In retrospect I would say It is straightforward however at 3 am and xx # beers I cannot guarantee my response is coherent! If you understand my above docker pull / docker run commands then it should be painless… Lemme know if you have trouble or need clarification of anything. I’ve done lots of reading and experimenting to get to where I am and am willing to help shortcut the learning process.
I did change my run command (-v $PWD/OZW:/opt/ozw/config \ & added the TZ variable) to my liking:

docker run -d \
 --name ozw \
 --restart=unless-stopped \
 --security-opt seccomp=unconfined \
 --device=/dev/ttyAMA0 \
 -v /opt/ozw/config:/opt/ozw/config \
 -e TZ=America/Vancouver \
 -e MQTT_SERVER="192.168.1.104" \
 -e MQTT_USERNAME="homeassistant" \
 -e MQTT_PASSWORD="Aighio8 . . . . Hoopie0uth" \
 -e USB_PATH=/dev/ttyAMA0 \
 -e OZW_NETWORK_KEY=0xBC,..,0xD5,..,0x51,..,0xA7,..,0x05,..,0xEA,..,0xBC,..,0xD6,.. \
 -p 1983:1983 \
 -p 5901:5901 \
 -p 7800:7800 \
openzwave/ozwdaemon:latest

Tip: Doing -v /etc/localtime:/etc/localtime:ro will import the hosts timezone automagicly for you :wink:
The ‘ro’ is read only so the container doesn’t try to change the host’s timezone on you.

Thanks! I’ve updated my docker cheatsheet and will use that on my next update.
HA Supervisor is logging in UTC. Would I make the same change for it or does it always log in UTC?

Same tweak should work there as well.

I edited /usr/sbin/hassio-supervisor which is launched by the systemd service hassio-supervisor.service and added -v /etc/localtime:/etc/localtime:ro \ and restarted the service but hassio failed to initialize. So I reverted my change, rebooted, connected to the container using portainer and issued the following:
cat /usr/sbin/zoneinfo/Canada/Pacific > /etc/localtime and ‘date’ was then correct. I restarted the service, reconnected to the container and ‘date’ is still correct. I’ll re-try the -v option…maybe I had a typo in it???

TBH I’ve never started a Docker manually, but I’m learning a lot here! I wonder if a sneaky pip upgrade of openzwave in the Home Assistant docker would have the desired effect…

Ah, now I see that the openzwave implementation is a special Home Assistant package :confused: