Control LEDs and LED Effects on Inovelli Black, Red, and Blue Devices by Floor, Area, Group, Device ID, or Entity

I wasn’t going to be able to let this go so I’ve made the changes. Would you mind testing it in script form with both Zigbee2MQTT 1.35 and 1.36? I want to make sure it picks up both the old and new device names so people don’t need to worry about forward / backward compatibility. I’ve typed out steps for you below, in case you need them. It would really help me out. I don’t have any Blue Series devices. If this works, I can publish a new blueprint tomorrow.

  • In Home Assistant:
    • Click on “Settings” in the left-hand navigation pane.
    • “Automations & Scenes”
    • “Scripts” near the top in a horizontal menu / tab.
    • Blue, “+ Add Script” button in the lower-right.
    • “Create new script”
    • In the upper-right click the vertical ellipsis (three dot) menu and then “edit in Yaml”.
    • Delete the pre-populated lines.
  • Open a new tab
  • In Github (beta script)
    • Since this hasn’t been merged into master yet, in the left-hand nav pane, under files, there’s a drop-down that says “master”. Change that to “Zigbee2MQTT-Inovelli-Device-Name-Change”.
    • On the right side, click the “copy raw file” in between the “raw” and “download” buttons.
  • In Home Assistant:
    • Paste the contents into the Yaml editor.
    • In the vertical ellipsis select “Edit in Visual Editor”
    • Blue, “Save Script” button in the lower right.

To test the script, you can use “developer tools” → “Services” and type “Inovelli LED Settings and Effects” to use the UI, and “Go to Yaml Mode” to see the code for automations. That code can be modified with templates.

I can confirm that this is working for me. Thank you for the quick response!

Thanks for this amazing blueprint/script! Would it be possible to enhance this to support using the Hubitat integration as well? I’m running HA in a VM and using that integration to expose my Hubitat-connected devices to HA via the Maker API.

I’d love to be able to make a group of Inovelli switches (as exposed via the Hubitat integration) within HA and have this script send the appropriate commands to each device in the group. My group would be mixing and matching various Inovelli switch models, of course.

I’ve published this release. Update the blueprint and let me know if you run into any issues. I don’t use blueprints so I’m not sure if there’s something I need to do for the “import” button to update.

I don’t have Hubitat so I’d need you to do all the testing. The first step would be to figure out what the service calls look like for Z-Wave and Zigbee devices. From there it’s probably just a lot of copy / paste. Once you have that, open an issue on GitHub and we’ll go from there.

# Zwave JS
- service: zwave_js.set_config_parameter
  data:
    entity_id: "{{ repeat.item.entities }}"
    parameter: >-
      {% set effect_param = repeat.item.device_type + '_ledbrightness_off' %} 
      {{ "off" if parameters[effect_param] == 0 else parameters[effect_param] }}
    value: "{{ LEDbrightness_off }} "
# Zigbee2mqtt
- service: mqtt.publish
  data:
    topic: >-
      zigbee2mqtt/{{ states[repeat.item].attributes.friendly_name }}/set
      payload: >-
        { "ledIntensityWhenOff": {{ (LEDbrightness_off * 256 / 10) }} }

If anyone has a Red 800 Series “2-in-1” device, I could use some help testing some new code to enable brightness in steps of 1 instead of 10. Previously the script and blueprint could only set brightness to 10%, 20%, … 100%. The new code will set it from 1% to 100% in steps of one for Red 800 Series and Blue Series devices. I don’t have any Red 800 Series devices to test.

Red 500 Series and Black 500 Series are limited by the device to only support steps of 10% so this feature doesn’t apply to these devices.

Beta code to test

How to import and test:

  • In Home Assistant:
    • Click on “Settings” in the left-hand navigation pane.
    • “Automations & Scenes”
    • “Scripts” near the top in a horizontal menu / tab.
    • Blue, “+ Add Script” button in the lower-right.
    • “Create new script”
    • In the upper-right click the vertical ellipsis (three dot) menu and then “edit in Yaml”.
    • Delete the pre-populated lines.
  • Open a new tab
  • In Github (“Beta code to test” link above)
    • Since this hasn’t been merged into master yet, in the left-hand nav pane, under files, there’s a drop-down that says “master”. Change that to “Zigbee2MQTT-Inovelli-Device-Name-Change”.
    • On the right side, click the “copy raw file” in between the “raw” and “download” buttons.
  • In Home Assistant:
    • Paste the contents into the Yaml editor.
    • In the vertical ellipsis select “Edit in Visual Editor”
    • Blue, “Save Script” button in the lower right.

To test the script, you can use “developer tools” → “Services” and type “Inovelli LED Settings and Effects” to use the UI, and “Go to Yaml Mode” to see the code for automations.

My apologies, I forgot to enable notifications on the thread. I would love to beta test for you!

I’ve been able to find this in the Hubitat HACS documentation:

  • Send a command to a Hubitat device
service: hubitat.send_command
data:
  entity_id: switch.some_switch
  command: on
service: hubitat.send_command
data:
  entity_id: light.some_light
  command: setHue
  args: 75
service: hubitat.send_command
data:
  entity_id: light.some_light
  command: setLevel
  args: [50, 3]

I believe this would use the Hubitat Maker API and you wouldn’t be sending the native Z-Wave commands as you do with Zwave JS. Is this sufficient or do you need additional details?

I used the script from 19-can-we-modify-the-brightness-slider-to-be-a-float/inovelli_led.yaml. I’m not 100% sure that each brightness step in .1 increments is working. But it didn’t cause any errors.

1 Like

I do have a credit for your code in my post, it’s in the thanks section. It’s been there since you offered to let me use it. I only copied your implementation of iterating over multiple areas, devices, and entities. I even edited it to use the target selector instead of using 3 separate fields. I’m sorry if you think I copied without credit.

1 Like

I apologize. I only looked at the code on github. I overlooked the comment in the post and I’m so sorry. I’ve edited my comment above, which was totally unnecessary in the first place.

2 Likes

Thanks, I appreciate it. You do bring up a good point, I don’t have any credits on my Github. I will be adding that later today.

GitHub updated with a thanks section. Once again thanks for your code!

Thanks for being so cool about this. I was out of line. I’m really sorry for how I conducted myself.

2 Likes

Forgive me in advance if this is a completely stupid question and feel free to tell me or ignore me if it is! I’m just getting started with blueprints and these Inovelli Red 800 2-1 switches are much more complicated than some of the other zwave devices I’m dealing with.

My goal is simple. I would like all of the LED’s (all 7 of them?) to be Blue and on at all times. I would then like LED’s 1, 2 & 3 to turn red and stay red whenever the “Garage Under Cab Lights” light switch is activated, and for them to return to their previous state (blue) when the “Garage Under Cab Lights” are turned off.

To accomplish this do I use the:

“number.garage_lights_led1_strip_effect_color”
“number.garage_lights_led2_strip_effect_color” 
“number.garage_lights_led3_strip_effect_color”

Entities in the “Entity” section of your Blueprint?

It’s especially confusing because this light switch exposes the following entities for every LED:

“led1_strip_effect_duration”

“led1_strip_effect_level”

“led1_strip_effect_color”

Thanks for creating and sharing this Blueprint!

if this is a completely stupid question

It’s not. :slight_smile:

I would like all of the LED’s (all 7 of them?) to be Blue and on at all times.

service: script.inovelli_led
data:
  entity: "{{ template to your light.* entity id that you'd use to turn it on or off }}"
  LEDcolor: Blue
  LEDcolor_off: Blue
  LEDbrightness: 7
  LEDbrightness_off: 3

I would then like LED’s 1, 2 & 3 to turn red…

My script isn’t able to control individual LEDs just yet. I’ve been adding more granularity to the on / off brightness (0 – 100 instead of 0 ­– 10) and I got sidetracked with adding ZHA support. Controlling individual LEDs is next on my list. I thought I’d have it done by the end of the month but setting non-effect LED colors in ZHA has me wrapped around the axle at the moment.

Ultimately, I think I’ll have the script track down the number.* entities to configure all of this but it feels fragile since it depends on a specific naming schema for those entities. I’m trying to find a way to configure these through a service call into the firmware directly, which should be more stable.

For now, you’re struggling to make it work because my blueprint won’t do that for you. I think I’ve seen others that will but they’ll only set effects (not the on / off color) and they seem to only work with one integration or another.

1 Like

Someone loaned me a Blue Series dimmer and—after a few weeks of struggle and finally asking for help—I have ZHA working. Nobody seems to have been asking for it but that’s what I use for my three Zigbee devices and I’m too lazy to convert them to Zigbee2MQTT. Adding support seemed easier (at first).

@taeuscherpferd updated the brightness levels to be floats (0.0 – 10.0). For Red 800 Series and Blue Series devices, the brightness levels will be multiplied by 10 to give you 0 – 100 granularity. Older Black Series and Red 500 Series devices are rounded off since they only support 0 – 10, stepping every 10%. Old automations will continue to work, even with newer devices, but if you need more granularity in the brightness levels, then you can get that now.

I’ll work on the individual LED settings next.

2 Likes

I think I have individual LED control working for ZHA now. The effects and the on / off LEDs work, with a couple of color sets for the latter. I thought I saw this on Inovelli’s website somewhere but I can’t find it now or it was someone else’s script, so I made up two of my own: “USA” is red, white, and blue; “unicorn” is… for my daughter. I’ll probably add Christmas and Halloween at some point. I’d welcome suggestions for other themes (or if someone can find that documentation…?). These will only work if you set LEDnumber: ‘all’, since they use the whole bar to display the theme. Effects only work with single colors, not color sets, since you can only control one LED at a time. I also have a “clear” color to wipe the individual LEDs so the whole bar color can be used.

If you have a Blue Series dimmer on ZHA I would appreciate some feedback. I don’t use Zigbee2MQTT so that’ll have to wait until I’m back from vacation, and the Red 800 Series individual control I’ll be doing strictly on documentation, since I don’t have a device. I might be able to find some time to draft a beta for someone to try while I’m on vacation next week.

Individual LED control in ZHA (beta): I only have the script drafted right now. Instructions for adding this as a script for testing are up in comment 16.

Since the Red 800 Series only support effects for individual LEDs and not the on / off colors, this turned out to be easier than I thought. It should be working now but I don’t have a Red 800 Series device so I’m not sure. I could really use some feedback here.

I’ve also fixed some bugs in the Blue Series ZHA code.

Black Series and Red 500 Series are protected against any of the individual LED configurations. If you pass LEDnumber: led {{n}} these devices won’t change anything or clear effects.

The defaults are such that any old automations should still work with the new updates. Mine do.

Since I don’t have Zigbee2MQTT for my Zigbee devices, this will take me some time to read up on and figure out. If anybody has the service calls handy for configuring individual LED on / off and effect settings, the rest should be easy. I’ll re-use the logic from ZHA to loop through them.

Beta code to test

Instructions for importing the beta (but use the code linked in this comment and not that one).

1 Like

Take a look here home-assistant-blueprints/script/inovelli_blue_led_zigbee2mqtt.yaml at 3a2cc81afb7ff2c1fba30d048e533052b690771a · zanix/home-assistant-blueprints · GitHub

I set up a variable based on whether all or a single LED is selected.
This is sent via MQTT to Z2M.

1 Like