Inovelli Z-Wave Red Series Notification LED

That’s how it starts but HA converts it to single quotes. After I save the script it gets changed. I don’t think that should matter though.



Still, the script works when called from the developer tools. It’s just broken coming from the Automation Actions.

For the script editor, try making the outside quotes single and the inside ones double.

  node_id: '{{ state_attr(entity_id,"node_id") }}'

Damn, that works! Think this is a bug worth reporting?

Please do. Whoever coded this probably does quotes in the order that works, so they haven’t noticed it. :slight_smile:

Done. First bug for this project, hopefully I filled it out right.

1 Like

Also managed to extend my first script, which is yours, @BrianHanifin :slight_smile: I added a random colour.

Here’s my working script that anyone can paste into the YAML script editor inside the HA UI.

Scripts > New Script > Click the Kebab (three dots) > Edit as YAML
  node_id: '{{ state_attr(entity_id,"node_id") }}'
  parameter: >
    {%- set dimmer = dimmer|default('true') %} {{ "16" if dimmer == "true" else
    "8" }}
  size: 4
  value: >
    {# Skip the calculations for effect = "off". #} {% if effect|title == "Off"
    {% else %}
      {# Set default values if any needed values are missing. #}
      {% set color = color|default("Yellow") %}
      {% set level = level|default(4) %}{# 1-10 #}
      {% set duration = duration|default("Indefinitely") %}
      {% set effect = effect|default("Pulse") %}
      {# Let's make things easy by using descriptive text instead of hard to understand numbers. #}
      {% set colors = {
        "Red": 1,
        "Orange": 21,
        "Green": 85,
        "Blue": 170,
        "Pink": 234,
        "Yellow": 42,
        "Cyan": 127,
        "Purple": 195,
        "Random": range(1, 255) | random
      } %}
      {% set durations = {
        "1 Second": 1,
        "2 Seconds": 2,
        "3 Seconds": 3,
        "4 Seconds": 4,
        "5 Seconds": 5,
        "6 Seconds": 6,
        "7 Seconds": 7,
        "8 Seconds": 8,
        "9 Seconds": 9,
        "10 Seconds": 10,
        "15 Seconds": 15,
        "20 Seconds": 20,
        "25 Seconds": 25,
        "30 Seconds": 30,
        "35 Seconds": 35,
        "40 Seconds": 40,
        "45 Seconds": 45,
        "50 Seconds": 50,
        "55 Seconds": 55,
        "60 Seconds": 60,
        "2 Minutes": 62,
        "3 Minutes": 63,
        "4 Minutes": 64,
        "15 Minutes": 75,
        "30 Minutes": 90,
        "45 Minutes": 105,
        "1 Hour": 120,
        "2 Hours": 122,
        "Indefinitely": 255
      } %}
      {% set effects = {
        "Off": 0,
        "Solid": 1,
        "Chase": 2,
        "Fast Blink": 3,
        "Slow Blink": 4,
        "Blink": 4,
        "Pulse": 5,
        "Breath": 5
      } %}
      {# Preform the Inovelli mind bending mathmatics automatically for us! :) #}
      {{ colors[color|title] + (level * 256) + (durations[duration|title] * 65536) + (effects[effect|title] * 16777216) }}
    {% endif %}
service: zwave.set_config_parameter

1 Like

Heads up this script won’t work with OZW because the model name is not an attribute on the entity, it’s on the device. I’m not sure if there’s a way to get that data from the script.

Did you just do this recently? I think the recent update to 113 moved the folders around. Now it’s python 3.8 but the /site-packages/ folder is no longer there. Also searching using find / -type d -iname ozw_config doesn’t find anything either…
Anyone know where it got moved so i can add the config there?

Are you using docker, or something else? In the 113.3 image I’m running I have:

bash-5.0# ls -lh /usr/local/lib/python3.8/site-packages/python_openzwave/ozw_config/manufacturer_specific.xml 
-rw-r--r--    1 root     root      138.9K Aug  1 06:44 /usr/local/lib/python3.8/site-packages/python_openzwave/ozw_config/manufacturer_specific.xml

It’s docker on top of pi4. The standard install with hassio etc:

pi@raspberrypi:~ $ sudo docker exec -it hassio_supervisor /bin/bash
bash-5.0# ls -lh /usr/local/lib/python3.8/site-packages/python_openzwave/ozw_config/manufacturer_specific.xml
ls: /usr/local/lib/python3.8/site-packages/python_openzwave/ozw_config/manufacturer_specific.xml: No such file or directory

I have /usr/local/lib/python3.8/site-packages but i don’t have python_openzwave in there. I remember doing these steps a few versions back, when it was on 3.7 still and it did work.

I just migrated my Z-Wave devices to the new OZW integration. The revisions to the original script required are fairly simple. Change service: zwave.set_config_parameter to service: ozw.set_config_parameter and remark out the size: 4 line (e.g. #size: 4). Oh, and instead of passing an entity_id that begins with zwave., just pass the light. entity instead as OZW doesn’t provide zwave. entities.

Below is my current version of the script, including a couple of ideas from @ kschlichter’s version. However, the Product name is not

1 Like

Frankly, I’m just guessing now. I don’t have a pi4 I can put hassio on, but instead of ‘find / -type d -iname ozw_config’ try ‘find / -iname manufacturer_specific.xml’ and that might provide a clue. If python_openzwave isn’t in /usr/local/lib/python3.8/site-packages, what is? Maybe it’s named differently in hassio?

That’s the funny thing I tried that, Inovelli, ozw, python_openzwave nothing comes up

So I wanted to try this out… but I’m having trouble getting this to work consistently. In y’all’s experience, is there some sort of timeout feature on this where you can’t call the service more than once in a certain amount of time?

I feel like I can get it to work once for a duration and then when I try to get it to work to test a second time, there’s no response. Any ideas?

Thank You! Works great on my LZW30-SN Red Switch!

1 Like

There doesn’t seem to be one that I’ve encountered. I haven’t tested rapid updates to a single switch though. For me there’s generally 10 seconds or more before updating the same switch.

That’s interesting. When I test the notification light (i.e. 5 second duration) with the services tab under dev tools, I am unable to replicate 10 seconds after unless I change a variable. Same thing with automations. For instance, if I have the light blink for 5 seconds after, say the door sensor is activated, I’ll wait 5 minutes or so, and try to repeat the process, and it won’t work. :confused:

That should work. Are there any errors in the logs? Which version of the script are you using? What does your automation look like?

No errors showing up in the logs. Just if I hit “call service” consecutively, nothing happens. I’m using @BrianHanifin’s latest version of the OZW script. I had tried using the one posted on your git, but I kept getting this argument of type 'NoneType is not iterable error when calling the service.

My automation was just a super simple one I created in the UI to test the functionality.

- alias: Door OPEN after 10pm
  description: ''
  - device_id: 1c2fbe13fc0c47afa4367cc2dd81a20c
    domain: binary_sensor
    entity_id: binary_sensor.aeotec_back_sensor_backdoor
      hours: 0
      minutes: 10
      seconds: 0
    platform: device
    type: turned_on
  - after: '22:00:00'
    before: '6:00:00'
    condition: time
  - data:
      color: Red
      duration: Indefinitely
      effect: Chase
      entity_id: switch.living_room_light
      level: 10
    service: script.inovelli_led
  mode: restart

I had gotten rid of all the conditions and set the duration to like 10s at one point, but I seemingly can’t get it to work multiple times in a row.

Even when I use Devtools > Services and script.inovelli_led

color: Green
duration: 10 Seconds
effect: Chase
entity_id: switch.office_light
level: 10

I’ll call the service once and it will work, but unless I change say “green” to “red,” I can’t get it to work a consecutive time after the green stops blinking. It’s really odd.

*Forgot to mention, this is on my LZW30-SN on/off

Kind of a dumb question, I havent worked with scripts much, can I just drop script.inovellie_led.yaml into my config folder and have it show up as a callable service or do I need to add anything to my configuration.yaml? Do i need to restart HA after dropping it in?