Inovelli Z-Wave Red Series Notification LED

Would it theoretically be possible to make this into an integration in HACS? I’m not too familiar with the process, so I figured I’d ask that first. Thanks in advance!

It wouldn’t be too hard to convert it into a service call. I don’t recall seeing packages/scripts as an option on HACS.

Also @datascope11
This new feature probably makes this whole process much easier. Us UI plebians can now just copy/paste the whole script.

2 Likes

Edit: Update. I’m able to get the below working by just using the LED ON script, and changing the effect to off. Not sure exactly what the inovelli_led_off script is supposed to do, I thought it was to save me from having to put in the data for “off” into each automation when calling the script. Suspect my problem lies in using it as provided, as it has a default entity of light.family_room.

Having a bit more trouble. I’ve got the led script working in automations just fine, but now I’m having issues with the inovelli_led_off sript. My script looks like this:

inovelli_led_off:
  mode: parallel
  variables:
    entity_id: '{{ entity_id|default("light.family_room") }}'
    model: |
      {% set models = {
        light.family_room: "dimmer"
      } %}
      {{ models[entity_id] }}
  sequence:
    - service: script.inovelli_led
      data_template:
        entity_id: "{{ entity_id }}"
        effect: "Off"

Error message in logs references ‘light’ is undefined. After having success with the LED on script, I get these errors for the led_off script if using either in automation or by calling tools in Dev Tools as follows:

Service: script.inovelli_off
Service Data section:
entity_id: light.main_entry_switch

For reference, what I was trying to achieve was automations using these scripts as follows:
Automation 1: When alarm is set to arm_home or arm_away, call script.inovelli_led to change dimmer LED’s to a specific color/effect indefinitely. This works fine.
Automation 2: When alarm state changes to disarm, call script.inovell_led_off on those same dimmers. This is where the error is.

Now I can’t stop the LEDs :slight_smile:

I removed the variables section… it was completely unnecessary as this script needs one parameter. In fact, this script is technically unnecessary, as we are just calling the main script.inovelli_led and setting the effect to “Off”. :slight_smile:

inovelli_led_off:
  sequence:
    - service: script.inovelli_led
      data:
        entity_id: "{{ entity_id }}"
        effect: "Off"
1 Like

Thanks for all of the work on this. Just though I would share a quick GUI I put together for this after having the wife make a couple of change requests and wanting to be able to do it from the front end.

Created helpers for all of the parameters so they could be represented in a lovelace card like so:
Screen Shot 2020-12-08 at 12.47.11 PM

Then edited the script to accept the helpers:

mode: single
variables:
  model: >
    {% if model is string %}
      {{ model }}
    {%- elif state_attr(states('input_select.inovelli_lights'), 'product_name')
    is string %}
      {%- if 'LZW31' in state_attr(states('input_select.inovelli_lights'), 'product_name') %}
        dimmer
      {%- elif 'LZW36' in state_attr(states('input_select.inovelli_lights'), 'product_name') %}
        combo_light
      {%- else %}
        switch
      {%- endif %}
    {%- else %}
      dimmer
    {%- endif -%}
  entity_id: '{{states("input_select.inovelli_lights")}}'
  node_id: '{{state_attr(states("input_select.inovelli_lights"),"node_id")}}'
  color: '{{states("input_select.inovelli_led_color")|default("Blue")}}'
  level_on: '{{states("input_number.inovelli_led_level_on")|default("10")}}'
  level_off: '{{states("input_number.inovelli_led_level_off")|default("3")}}'
  parameters:
    dimmer:
      color: 13
      level_on: 14
      level_off: 15
    combo_light:
      color: 18
      level_on: 19
      level_off: 22
    combo_fan:
      color: 20
      level_on: 21
      level_off: 23
    switch:
      color: 5
      level_on: 6
      level_off: 7
  colors:
    'Off': 0
    Red: 1
    Orange: 21
    Yellow: 42
    Green: 85
    Cyan: 127
    Teal: 145
    Blue: 170
    Purple: 195
    Light Pink: 220
    Pink: 234
sequence:
  - variables:
      color: '{{ colors[color|title] }}'
      color_parameter: '{{ parameters[model]["color"] }}'
      level_on_parameter: '{{ parameters[model]["level_on"] }}'
      level_off_parameter: '{{ parameters[model]["level_off"] }}'
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ entity_id.split(".")[0] == "zwave" }}'
        sequence:
          - service: zwave.set_config_parameter
            data:
              node_id: '{{ node_id }}'
              parameter: '{{ color_parameter }}'
              size: 2
              value: '{{ color }}'
          - service: zwave.set_config_parameter
            data:
              node_id: '{{ node_id }}'
              parameter: '{{ level_on_parameter }}'
              size: 1
              value: '{{ level_on }}'
          - service: zwave.set_config_parameter
            data:
              node_id: '{{ node_id }}'
              parameter: '{{ level_off_parameter }}'
              size: 1
              value: '{{ level_off }}'
    default:
      - service: ozw.set_config_parameter
        data:
          node_id: '{{ node_id }}'
          parameter: '{{ color_parameter }}'
          value: '{{ color }}'
      - service: ozw.set_config_parameter
        data:
          node_id: '{{ node_id }}'
          parameter: '{{ level_on_parameter }}'
          value: '{{ level_on }}'
      - service: ozw.set_config_parameter
        data:
          node_id: '{{ node_id }}'
          parameter: '{{ level_off_parameter }}'
          value: '{{ level_off }}'
      - service: logbook.log
        data:
          name: 'LED Script '
          message: >-
            {{color}} {{entity_id}} {{node_id}} {{level_on}} {{level_off}}
            {{color_parameter}}

Eventually I’d like to build this out so that it had all of the configurable parameters for the inovelli’s.

I should mention that while this works the “model” selection is always returning “none” for me. My devices don’t have model as an attribute so I am not sure that is something I messed up or what.

3 Likes

Started getting errors when using this script, anyone else?

openzwavemqtt.exceptions.InvalidValueError: Value 67766979 out of range of parameter (Range: 0-32767)

That’s a range check, value 67766979 > 32767
Sounds like the XML needs fixing.

Any idea where that xml lives when using the ozw beta?

All the Inovelli XML configs live here:

This is such a n00b question that I’m almost embarrassed to task it, but is any of this possible without connecting the switch through a USB stick? I currently have mine connected through my SmartThings hub and I can’t add the Z-Wave or OZW integrations without providing a physical address.

Dont feel embarrassed to ask any question! We all started out knowing nothing and that’s a valid question. In your situation, you would have to unpair your current device from your SmartThings, then you’ll be able to add the device to the stick. It can only be paired with one hub at a time.

Hope that helps!

I think that’s where my confusion is coming from. Isn’t my switch connected to the SmartThings hub via Z-Wave? Is it that HA can’t interact with Z-Wave devices connected to a different hub?

It’s a little more nuanced than that. HA interacts with SmartThings and can control your smartthings connected z-wave devices, but HA at that point doesn’t know that they are z-wave since they are connected through a totally different integration. Additionally I think the only way to control z-wave parameters with automation in SmartThings is via WebCore(that is how you’d change the LED settings).

zwave_js.set_config_parameter was added to Home Assistant version 2021.03 (which is in beta as of this writing). So the updated script replaces OpenZwave service call with the zwave_js version.

3 Likes

…And that’s the last piece I’ve been waiting for! Time to switch to zwave js! Thanks for doing this script, @BrianHanifin. My family get’s a TON of usage out of it.

1 Like

Thanks Kevin, that’s nice to hear! Just make sure you are running the latest Home Assistant 2021.03.0 beta version (b2 at the moment).

You might also try keep your Z-Wave JS server of choice as up to date as possible as well. I was having Z-Wave devices disconnecting from the network, and updating this morning to Z-Wave JS Server version 1.1 appears to have stabilized things. (Talk about bleeding edge.) :wink:

Holy Bananas YESSSSS! Such an easy change for NR nodes as well!!!

Can I just say you guys are amazing? Man, I may not always know what you’re saying and/or doing, but I love seeing how passionate you guys are in making things work. It’s truly inspiring.

Thanks @BrianHanifin for quarterbacking this. Excellent work.

4 Likes

Good to know. For those running the docker container, that’s tag 2.0.0 (or “latest”).

2 Likes