Issues with changing light color on LZW45

I didn’t try changing the colors through the HA UI specifically, but I messed around with updating it through zwavejs2mqtt instead. In my experience I found that I can change to most any color (especially if I’m changing things multiple times in a row), but it ends up needing a couple commands before it’ll actually take at times. That could be a repeat of the same command sent, or a brightness change, or on/off, etc. Not seeing errors in the debug logs though, just the commands being sent and then re-sent when I tell it to.

For reference -
Home Assistant Core 2021.9.7 (I know, want to upgrade but run into an error past this point and haven’t had the time to deal with it)
zwavejs2mqtt: 6.0.3
zwave-js: 8.8.3

1 Like

Having the same exact issue. Have multiple sets that are doing it. Here is a video for anyone needing clarity.

I am experiencing the same issue as well. Changing brightness, temperature don’t have an issue. When selecting a color, it flashes like that and doesn’t take. Though, as @chack had mentioned, if you select a color and then change the brightness, the color change takes effect immediately.

I recently got 2 sets of the light strips and I’ve had the same issues as mentioned above but I noticed that home assistant showed an error code that as far as I can tell wasn’t mentioned previously.

“Failed to call service light/turn_on. Z-Wave error 1405: The node failed to decode the message (ZW1405)”

Home assistant OS: 7.0
Home assistant Core: 2021.12.5
Home assistant supervisor: 2022.12.2
Z-wave JS: 8.9.0-beta.1
Zwavejs2mqtt: 6.1.1
Strip Firmware: 1.2.0
Z-wave controller: Silicon Labs ZST10-700
Z-wave controller firmware: 7.15

1 Like

Also experiencing this issue with colors. Just picked up 2 sets. Running zwavejs2mqtt on HA 2021.12.7

Any ideas on how to make these light strips somewhat functional via Lovelace UI? I can’t very well have the wife punching in parameters into a service call. Honestly, I think she’d throw me out if I showed her how to do that… lol

“Honey, it’s easy. Just call up the service zwave_js.bulk_set_partial_config_parameters and set the appropriate data in the parameters you’d like to change. Oh, and bring your calculator…”

1 Like

I’ll give the caveat I haven’t done this myself yet as I keep mine pretty static, but you should be able to use input select to swap through predefined parameters using a combination of the below -

If you’re looking to cycle through normal colors, etc you can just put the light strip in as an entity and click on the icon for it to pull up the color wheel. That method does need multiple clicks to change like the last few posts in this thread are pointing out though.

Thanks, funny enough I woke last night dreaming about using input selects for all these pixel effects. Will take some time to add the 40+ effects, but I think it’s the only way to go here in order to get some usage out of the effects… Combined with the script, it should work ok.

Regarding your comment about cycling through normal colors, I think that is the exact issue of this thread. If I pull up the color wheel in HA for this device and attempt to change colors - they don’t work properly. Perhaps I’m missing something in your comment, but this has been my experience. The only way I can get it so work, is after picking a color on the wheel (which most times doesn’t change the color on the strip), changing the brightness will then cause it to change the color. Something ain’t right there.

1 Like

May be able to grab the list at least from the script to speed it up hopefully?

Yep, agreed on the normal colors. I can also click the same color a few times and it’ll take, but changing the brightness after picking the color is the quickest/most consistent way. It’s not ideal, but it’s an option at least.

I’m glad I wasn’t the only one that had this issue. I posted about this during the summer and got no response I contacted inovelli and they did some troubleshooting but once I said I used a script to fix my issue I never got a final answer as to why this was occuring.

Where it was most profound was attempting to turn the lights on to anything other than white I figured out using a delay of a second or 2 then sending the command again would adjust it properly. For example if I wanted 45% brightness it would go to maybe 10% then a second or 2 later actually go to 45% because of the script even though at the 10% the controller on the strip said 45% it was certainly not 45%. I don’t even touch the color wheel. I just use scripts.

I believe that Home Assistant is sending a Multi Level Set command immediately after sending the Color Switch command and that is stopping the color change from talking place. Is it possible to either 1. Make HA stop sending the Set Level? Or 2. Specify the duration of the Color Switch to be 0?

@nathanfiscus has created a Blueprint that solves the problem with color, but it creates the problem on the color temperature. So we are close to finding a workaround. :wink:

Edit: It has been updated and should be working now. Just need to:

Import the blueprint from the above URL:
Configuration > Blueprint > Import
image

After the import, create an automation (should be an option during the import process):

Select the correct entity, save, then make sure it is enabled:

4 Likes

@cwitter can you please test the workaround and if it works mark this post as the solution?

This is great timing! I just installed my strip over the weekend and was disappointed to experience the same behavior as the others. I just added the blueprint and the color wheel works now! I am able to bounce around the wheel and go back and forth between the wheel and temperature bar without (much) issue. There was one point where I probably went too fast and it took several seconds for the strip to catch up. But it did! Haven’t tried mixing color commands with pixel effects, but that seems low risk.

Edit: went to show my wife and wouldn’t you know it, it lagged right away, but caught up when I started messing with the brightness. Still happy overall though

While I’m here, anyone discovered a way to make pixel effects more functional in Lovelace? Like the users above, making dozens of buttons would be tedious.

1 Like

I think using input selects would be the way to go if you need it in Lovelace as it’ll end up as one dropdown for you to choose the specific effect from your dashboard (instructions up the thread on how to do that). Otherwise I’d just use Node-Red as seen here.

Though, why would you need more than this one? :wink:
image

4 Likes

Thanks for the link, I think I can make this work.

1 Like

Absolutely, and if you’re not already using Node-Red with HA, it’s a lot simpler for more complicated or involved automations imo. Lots of videos and documentation on it, along with it being very visually-oriented.

Hi - looks like that Blueprint works about 60% (up from 0%!) of the time to fix the color change issue (at least on my end) - but it looks like if you add a delay of 1 second before the light.turn_on action, it works 100% of the time.

Here’s a link to my edited Blueprint YAML: BetterPaste

I was having trouble with changing colors as well. I tried the blueprint; it helped but didn’t fully solve the problem. While troubleshooting I discovered exactly what you mentioned, that the Multi Level Set command was being sent immediately after a Color Switch Command was issued. I resolved it slightly differently by creating a template light. Works well and best of all, supports color change transitions!

light:
  - platform: template
    lights:
      boys_room_matthew_light_frontend:
        friendly_name: "Matthew's LED Strip"
        level_template: "{{ state_attr('light.boys_room_matthew_light', 'brightness')|int }}"
        value_template: "{{ state_attr('light.boys_room_matthew_light', 'brightness')|int > 0 }}"
        temperature_template: "{{ state_attr('light.boys_room_matthew_light', 'color_temp') | int}}"
        color_template: "{{ state_attr('light.boys_room_matthew_light', 'hs_color') }}"
        turn_on:
          service: zwave_js.set_value
          data:
            command_class: "38"
            endpoint: "0"
            property: targetValue
            value: "255"
            options:
              transitionDuration: >
                {%- set tran_time = (transition | default(1)) %}
                {{ [tran_time | int,'s'] | join }}
          target:
            entity_id: light.boys_room_matthew_light
        turn_off:
          service: zwave_js.set_value
          data:
            command_class: "38"
            endpoint: "0"
            property: targetValue
            value: "0"
            options:
              transitionDuration: >
                {%- set tran_time = (transition | default(1)) %}
                {{ [tran_time | int,'s'] | join }}
          target:
            entity_id: light.boys_room_matthew_light
        set_level:
          service: zwave_js.set_value
          data:
            command_class: "38"
            endpoint: "0"
            property: targetValue
            value: "{{ (( brightness / 255) * 99 ) | int }}"
            options:
              transitionDuration: >
                {%- set tran_time = (transition | default(1)) %}
                {{ [tran_time | int,'s'] | join }}
          target:
            entity_id: light.boys_room_matthew_light
        set_temperature:
          - service: zwave_js.set_value
            data:
              command_class: "51"
              endpoint: "0"
              property: targetColor
              value:
                warmWhite: "{{ ( color_temp - 153) / (370 - 153) * 255 }}"
                coldWhite: "{{ ( 1 - (( color_temp - 153) / (370 - 153))) * 255 }}"
                red: 0
                green: 0
                blue: 0
              options:
                transitionDuration: >
                  {%- set tran_time = (transition | default(1)) %}
                  {{ [tran_time | int,'s'] | join }}
            target:
              entity_id: light.boys_room_matthew_light
          - service: zwave_js.refresh_value
            data:
              entity_id: light.boys_room_matthew_light
        set_color:
          - service: zwave_js.set_value
            data:
              command_class: "51"
              endpoint: "0"
              property: targetColor
              value:
                warmWhite: 0
                coldWhite: 0
                red: >
                  {%- set h1 = h / 360 | float %}
                  {%- set s1 = s / 100 | float %}
                  {%- set v = 1 | float %}
                  
                  {%- set i = (h1 * 6)|int %}
                  {%- set f = h1 * 6 - i %}
                  {%- set p = v * (1 - s1) %}
                  {%- set q = v * (1 - f * s1) %}
                  {%- set t = v * (1 - (1 - f) * s1) %}
                  
                  {%- if i % 6 == 0 %}
                    {% set r = v %}
                    {% set g = t %}
                    {% set b = p %}
                  {%- elif i % 6 == 1 %}
                    {% set r = q %}
                    {% set g = v %}
                    {% set b = p %}
                  {%- elif i % 6 == 2 %}
                    {% set r = p %}
                    {% set g = v %}
                    {% set b = t %}
                  {%- elif i % 6 == 3 %}
                    {% set r = p %}
                    {% set g = q %}
                    {% set b = v %}
                  {%- elif i % 6 == 4 %}
                    {% set r = t %}
                    {% set g = p %}
                    {% set b = v %}
                  {%- elif i % 6 == 5 %}
                    {% set r = v %}
                    {% set g = p %}
                    {% set b = q %}
                  {%- endif %}
                  
                  {{ (255*r)|round(0) }}
                green: >
                  {%- set h1 = h / 360 | float %}
                  {%- set s1 = s / 100 | float %}
                  {%- set v = 1 | float %}
                  
                  {%- set i = (h1 * 6)|int %}
                  {%- set f = h1 * 6 - i %}
                  {%- set p = v * (1 - s1) %}
                  {%- set q = v * (1 - f * s1) %}
                  {%- set t = v * (1 - (1 - f) * s1) %}
                  
                  {%- if i % 6 == 0 %}
                    {% set r = v %}
                    {% set g = t %}
                    {% set b = p %}
                  {%- elif i % 6 == 1 %}
                    {% set r = q %}
                    {% set g = v %}
                    {% set b = p %}
                  {%- elif i % 6 == 2 %}
                    {% set r = p %}
                    {% set g = v %}
                    {% set b = t %}
                  {%- elif i % 6 == 3 %}
                    {% set r = p %}
                    {% set g = q %}
                    {% set b = v %}
                  {%- elif i % 6 == 4 %}
                    {% set r = t %}
                    {% set g = p %}
                    {% set b = v %}
                  {%- elif i % 6 == 5 %}
                    {% set r = v %}
                    {% set g = p %}
                    {% set b = q %}
                  {%- endif %}
                  
                  {{ (255*g)|round(0) }}
                blue: >
                  {%- set h1 = h / 360 | float %}
                  {%- set s1 = s / 100 | float %}
                  {%- set v = 1 | float %}
                  
                  {%- set i = (h1 * 6)|int %}
                  {%- set f = h1 * 6 - i %}
                  {%- set p = v * (1 - s1) %}
                  {%- set q = v * (1 - f * s1) %}
                  {%- set t = v * (1 - (1 - f) * s1) %}
                  
                  {%- if i % 6 == 0 %}
                    {% set r = v %}
                    {% set g = t %}
                    {% set b = p %}
                  {%- elif i % 6 == 1 %}
                    {% set r = q %}
                    {% set g = v %}
                    {% set b = p %}
                  {%- elif i % 6 == 2 %}
                    {% set r = p %}
                    {% set g = v %}
                    {% set b = t %}
                  {%- elif i % 6 == 3 %}
                    {% set r = p %}
                    {% set g = q %}
                    {% set b = v %}
                  {%- elif i % 6 == 4 %}
                    {% set r = t %}
                    {% set g = p %}
                    {% set b = v %}
                  {%- elif i % 6 == 5 %}
                    {% set r = v %}
                    {% set g = p %}
                    {% set b = q %}
                  {%- endif %}
                  
                  {{ (255*b)|round(0) }}
              options:
                transitionDuration: >
                  {%- set tran_time = (transition | default(1)) %}
                  {{ [tran_time | int,'s'] | join }}
            target:
              entity_id: light.boys_room_matthew_light
          - service: zwave_js.refresh_value
            data:
              entity_id: light.boys_room_matthew_light
        supports_transition_template: "{{ true }}"
        min_mireds_template: "{{ state_attr('light.boys_room_matthew_light', 'min_mireds') | int}}"
        max_mireds_template: "{{ state_attr('light.boys_room_matthew_light', 'max_mireds') | int}}"
        availability_template: "{{ states('light.boys_room_matthew_light') != 'unavailable' }}"
7 Likes

This was exactly what I needed. Thank you!

None of the other solutions worked for me, but yours worked perfectly. Thank you!