Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGBW dimmer is not reacting on color changes #3924

Open
2 of 3 tasks
Thaui57 opened this issue Oct 5, 2024 · 29 comments
Open
2 of 3 tasks

RGBW dimmer is not reacting on color changes #3924

Thaui57 opened this issue Oct 5, 2024 · 29 comments
Labels
bug Something isn't working

Comments

@Thaui57
Copy link

Thaui57 commented Oct 5, 2024

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

Docker

Z-Wave JS UI version

9.21.0

ZwaveJS version

13.4.0

Describe the bug

since updating to 9.21.0 the RGBW dimmer is not reacting on color changes in Domoticz. Attached are the debug infos. On release 9.18.1 the dimmer worked well.

Quibino Flush RGBW Dimmer FW v2.98.txt

To Reproduce

color can be set in Zwave JS UI but not in Domoticz. The Zwave values does not change
image

Expected behavior

changing the color in Domoticz the color changes do not happen

Additional context

No response

@Thaui57 Thaui57 added the bug Something isn't working label Oct 5, 2024
@robertsLando
Copy link
Member

So the discovery payload is:

"light_rgb_dimmer": {
      "type": "light",
      "object_id": "rgb_dimmer",
      "discovery_payload": {
        "state_topic": "zwave/Garderobe/38/0/currentValue",
        "command_topic": "zwave/Garderobe/38/0/targetValue/set",
        "on_command_type": "brightness",
        "state_value_template": "{{ \"OFF\" if value_json.value == 0 else \"ON\" }}",
        "brightness_value_template": "{{ value_json.value }}",
        "brightness_scale": 99,
        "rgb_command_template": "{{ {'red': red, 'green': green, 'blue': blue}|to_json }}",
        "rgb_value_template": "{{ value_json.value.red }},{{ value_json.value.green }},{{ value_json.value.blue }}",
        "supported_color_modes": [
          "rgb",
          "brightness"
        ],
        "rgb_state_topic": "zwave/Garderobe/51/0/currentColor",
        "rgb_command_topic": "zwave/Garderobe/51/0/targetColor/set",
        "brightness_state_topic": "zwave/Garderobe/38/0/currentValue",
        "brightness_command_topic": "zwave/Garderobe/38/0/targetValue/set",
        "availability": [
          {
            "payload_available": "true",
            "payload_not_available": "false",
            "topic": "zwave/Garderobe/status",
            "value_template": "{{'true' if value_json.value else 'false'}}"
          },
          {
            "topic": "zwave/_CLIENTS/ZWAVE_GATEWAY-Zwavejs2Mqtt/status",
            "value_template": "{{'online' if value_json.value else 'offline'}}"
          },
          {
            "payload_available": "true",
            "payload_not_available": "false",
            "topic": "zwave/driver/status"
          }
        ],
        "availability_mode": "all",
        "device": {
          "identifiers": [
            "zwavejs2mqtt_0xdbf01f81_node8"
          ],
          "manufacturer": "Qubino",
          "model": "Qubino Flush RGBW Dimmer (ZMNHWD)",
          "name": "Garderobe",
          "sw_version": "2.98"
        },
        "name": "Garderobe_rgb_dimmer",
        "unique_id": "zwavejs2mqtt_0xdbf01f81_8-51-0-currentColor"
      },
      "values": [
        "38-0-currentValue",
        "38-0-targetValue",
        "51-0-currentColor",
        "51-0-targetColor"
      ],
      "discoveryTopic": "light/Garderobe/rgb_dimmer/config",
      "persistent": false,
      "ignoreDiscovery": false
    }

We should compare this with the discovery payload you had in 9.18 to see if something changed that could have broke this. Also do you see any error on ZUI logs when you try to change the color?

@Thaui57
Copy link
Author

Thaui57 commented Oct 8, 2024

how can I downgrade to 9.18.1

@robertsLando
Copy link
Member

@Thaui57 Just specify 9.18 as tag. Anyway i would like to also see logs from 9.21.0 first to see what's received by zui when you try to send a color change from Domoticz

@Thaui57
Copy link
Author

Thaui57 commented Oct 8, 2024

attached the log file. I seems that changes made in ZUI will send to Domoticz but the other way round there is no change in ZUI
z-ui_2024-10-08.log

@robertsLando
Copy link
Member

Seems the error is:

2024-10-08 15:46:50.189 INFO MQTT: Message received on zwave/Garderobe/38/0/targetValue/set: '22'
2024-10-08 15:46:50.200 INFO MQTT: Message received on zwave/Garderobe/51/0/targetColor/set: '{"state":"ON","value":22}'
2024-10-08 15:46:50.191 INFO Z-WAVE: Writing 22 to 8-38-0-targetValue
2024-10-08 15:46:50.202 INFO Z-WAVE: Writing 22 to 8-51-0-targetColor
2024-10-08 15:46:50.209 ERROR Z-WAVE: Unable to write 22 on 51-0-targetColor: Color Switch: "targetColor" must be set to an object which specifies each color channel (ZW0322)

I don't understand why domoticz is sending 22 to targetColor while in the discovery payload it's very clear that:

        "rgb_command_template": "{{ {'red': red, 'green': green, 'blue': blue}|to_json }}",
		        "rgb_command_topic": "zwave/Garderobe/51/0/targetColor/set",

I would forward this request to domoticz team

@Thaui57
Copy link
Author

Thaui57 commented Oct 9, 2024

Thanks for your survey. I believe that I have updated Domoticz to the last stable version 2024.7 before I updated Zwave js ui to 9.18.1. In 9.18.1 the dzvents script worked well and has changed the color as expected. Since 9.21.1 the malfunction appears. The dzvents script send the following command e.g: dz.devices(14).setColor(255,0,200,100,0,w,4,0). So I am not using the Domoticz GUI. I am sending via a test script color data but r,g,b 50,50,50 will be 2,0,2 in Zwave js ui

@robertsLando
Copy link
Member

robertsLando commented Oct 9, 2024

The dzvents script send the following command e.g: dz.devices(14).setColor(255,0,200,100,0,w,4,0). So I am not using the Domoticz GUI. I am sending via a test script color data but r,g,b 50,50,50 will be 2,0,2 in Zwave js ui

I dunno what you mean with dzevents script as I'm not a Domoticz user but as said the issue here is that the discovery rgb command template is not respected. It should send a JSON payload like:

{"red": 50, "green": 50, "blue": 50}

While it sends

{"state":"ON","value":22}

instead

@Thaui57
Copy link
Author

Thaui57 commented Oct 10, 2024

the issue can be closed. after my door sensors also stoped working I flashed back a full SD card backup from Oktobera 1st. I am now back on zui 9.18.1 and zwavejs 13.2.0. System is back and operating well. Thanks for your support

@robertsLando
Copy link
Member

yeah but you will need to upgrade one day or another and so I still don't understand what made it break in latest version

@EwoutSnel
Copy link

Experiencing the same issue with same Qubino RGBW dimmer. Made a forum post at Domoticz website.
https://www.domoticz.com/forum/viewtopic.php?t=42783
If possible please re-open.

@robertsLando robertsLando reopened this Oct 28, 2024
@EwoutSnel
Copy link

@robertsLando if you have time, would you be so kind to read the post in the Domoticz forum? For me it is still unclear if this is a Domoticz bug or a Zwave-JS-UI bug.

@robertsLando
Copy link
Member

@EwoutSnel Seems like domoticz is sending a wrong payload to targetColor, that payload makes no sense. If you revert to a previous working version what do you receive there? Did you checked if there are changes between the 2 discovery payloads sent by zui in the working and not working version? Comparing the 2 discovery payloads is the first thing to check

@Thaui57
Copy link
Author

Thaui57 commented Nov 21, 2024

@robertsLando If there are no changes on the Domoticz platform and the rgbw dimmer works with zwave js UI version 9.18.1 but not with a newer version the problem is caused by zwavejs. Or am I wrong?

@robertsLando
Copy link
Member

@Thaui57 I agree this is why I also asked to place here both discovery payload sent to domoticz (the working and not working one) as that is the only thing that could have break this. The command domoticz sent makes just no sense:

2024-10-08 15:46:50.200 INFO MQTT: Message received on zwave/Garderobe/51/0/targetColor/set: '{"state":"ON","value":22}'

@Thaui57
Copy link
Author

Thaui57 commented Nov 22, 2024

@robertsLando not so easy in a productive system. I do my best do deliver a comparison log file soon. Otherwise we have no chance to sort it out. Thanks for your help

@Thaui57
Copy link
Author

Thaui57 commented Nov 22, 2024

@robertsLando attached you will find two log files. One generated with 9.18.1 and the other 9.27.5. In the newer release the color change doesn't work. I hope that are the data you requested.
z-ui_2024-11-22_rel_9-18-1.log
z-ui_2024-11-22_rel_9-27-5.log

@robertsLando
Copy link
Member

robertsLando commented Nov 25, 2024

@Thaui57 thanks for the logs 🙏🏼

Discovery from 9.18.1:

 {
  type: 'light',
  object_id: 'rgb_dimmer_1',
  discovery_payload: {
    state_topic: 'zwave/Arbeitszimmer_LED/38/1/currentValue',
    command_topic: 'zwave/Arbeitszimmer_LED/38/1/targetValue/set',
    on_command_type: 'brightness',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_value_template: '{{ value_json.value }}',
    brightness_scale: 99,
    rgb_command_template: "{{ {'red': red, 'green': green, 'blue': blue}|to_json }}",
    rgb_value_template: '{{ value_json.value.red }},{{ value_json.value.green }},{{ value_json.value.blue }}',
    rgb_state_topic: 'zwave/Arbeitszimmer_LED/51/1/currentColor',
    rgb_command_topic: 'zwave/Arbeitszimmer_LED/51/1/targetColor/set',
    brightness_state_topic: 'zwave/Arbeitszimmer_LED/38/1/currentValue',
    brightness_command_topic: 'zwave/Arbeitszimmer_LED/38/1/targetValue/set',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/Arbeitszimmer_LED/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-Zwavejs2Mqtt/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xdbf01f81_node47', [length]: 1 ],
      manufacturer: 'Fibargroup',
      model: 'RGBW CONTROLLER 2 (FGRGBW-442)',
      name: 'Arbeitszimmer LED',
      sw_version: '5.0'
    },
    name: 'Arbeitszimmer LED_rgb_dimmer_1',
    unique_id: 'zwavejs2mqtt_0xdbf01f81_47-51-1-currentColor'
  },
  values: [
    '38-1-currentValue',
    '38-1-targetValue',
    '51-1-currentColor',
    '51-1-targetColor',
    [length]: 4
  ],
  discoveryTopic: 'light/Arbeitszimmer_LED/rgb_dimmer_1/config',
  persistent: false,
  ignoreDiscovery: false
}

Discovery from 9.27.5

{
  type: 'light',
  object_id: 'rgb_dimmer_1',
  discovery_payload: {
    state_topic: 'zwave/Arbeitszimmer_LED/38/1/currentValue',
    command_topic: 'zwave/Arbeitszimmer_LED/38/1/targetValue/set',
    on_command_type: 'brightness',
    state_value_template: '{{ "OFF" if value_json.value == 0 else "ON" }}',
    brightness_value_template: '{{ value_json.value }}',
    brightness_scale: 99,
    rgb_command_template: "{{ {'red': red, 'green': green, 'blue': blue}|to_json }}",
    rgb_value_template: '{{ value_json.value.red }},{{ value_json.value.green }},{{ value_json.value.blue }}',
    supported_color_modes: [ 'rgb', 'brightness', [length]: 2 ],
    rgb_state_topic: 'zwave/Arbeitszimmer_LED/51/1/currentColor',
    rgb_command_topic: 'zwave/Arbeitszimmer_LED/51/1/targetColor/set',
    brightness_state_topic: 'zwave/Arbeitszimmer_LED/38/1/currentValue',
    brightness_command_topic: 'zwave/Arbeitszimmer_LED/38/1/targetValue/set',
    availability: [
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/Arbeitszimmer_LED/status',
        value_template: "{{'true' if value_json.value else 'false'}}"
      },
      {
        topic: 'zwave/_CLIENTS/ZWAVE_GATEWAY-Zwavejs2Mqtt/status',
        value_template: "{{'online' if value_json.value else 'offline'}}"
      },
      {
        payload_available: 'true',
        payload_not_available: 'false',
        topic: 'zwave/driver/status'
      },
      [length]: 3
    ],
    availability_mode: 'all',
    device: {
      identifiers: [ 'zwavejs2mqtt_0xdbf01f81_node47', [length]: 1 ],
      manufacturer: 'Fibargroup',
      model: 'RGBW CONTROLLER 2 (FGRGBW-442)',
      name: 'Arbeitszimmer LED',
      sw_version: '5.0'
    },
    name: 'Arbeitszimmer LED_rgb_dimmer_1',
    unique_id: 'zwavejs2mqtt_0xdbf01f81_47-51-1-currentColor'
  },
  values: [
    '38-1-currentValue',
    '38-1-targetValue',
    '51-1-currentColor',
    '51-1-targetColor',
    [length]: 4
  ],
  discoveryTopic: 'light/Arbeitszimmer_LED/rgb_dimmer_1/config',
  persistent: false,
  ignoreDiscovery: false
}

The only thing changed between this two discovery payload is supported_color_modes: [ 'rgb', 'brightness', [length]: 2 ],

Question is if domoticz handles this correctly or not, I have a feel that if you remove that from discovery it will work as expected. This change has been added in order to fix #3894 and first release with that has been 9.19.0

@EwoutSnel
Copy link

@robertsLando and @Thaui57

So this are the steps I did:

  • upgrade Zwave-JS-UI container to latest version
  • find the specific node and the "light_rgb_dimmer" entity under "Home Assistant"
  • deleted the complete line "supported_color_modes" in the JSON field
  • clicked on update
  • rebooted my Domoticz container
  • succes!!!

RGB dimmer is now working as before and as expected!

However this change does NOT survive a restart of Zwave-JS-UI.......

Any ideas how to make this change persistent?

@kpine
Copy link
Contributor

kpine commented Nov 26, 2024

The only thing changed between this two discovery payload is supported_color_modes: [ 'rgb', 'brightness', [length]: 2 ],

I would have no clue how strictly Domoticz adheres to the HA MQTT discovery schema, but this payload value is invalid. See docs: https://www.home-assistant.io/integrations/light.mqtt/#supported_color_modes

A list of color modes supported by the list. Possible color modes are onoff, brightness, color_temp, hs, xy, rgb, rgbw, rgbww, white. Note that if onoff or brightness are used, that must be the only value in the list.

@robertsLando
Copy link
Member

robertsLando commented Nov 26, 2024

Note that if onoff or brightness are used, that must be the only value in the list.

Oh maybe the issue is that so, but if the device supports both brightness and RGB should I only report rgb so? Or maybe rgbw?

@Thaui57
Copy link
Author

Thaui57 commented Dec 9, 2024

@robertsLando is there any improvement on this issue?

@robertsLando
Copy link
Member

@Thaui57 Could you try to manually edit the json and changing the supported_color_modes to rgbw ?

@EwoutSnel
Copy link

EwoutSnel commented Dec 11, 2024

Changed this:
"supported_color_modes": [ "rgb", "brightness" ],

Into this:
"supported_color_modes": "rgbw",

Afterwards I did a reboot of Domoticz container.

Unfortunately the color changes do NOT work with this change, as far as I can tell.

@Thaui57 can you also test this?

@kpine
Copy link
Contributor

kpine commented Dec 11, 2024

Should it be this?

    brightness: true
    supported_color_modes: ["rgb"]

There was no indication of RGBW support in the original discovery schema (except the product name), and the brightness flag is there to indicate brightness + rgb/rgbw/rgbww.

@robertsLando
Copy link
Member

@Thaui57 @EwoutSnel could you try kpine suggestion? Also I would put the values between square brackets as that is a list:

    "brightness": true
    "supported_color_modes": ["rgb"]

@kpine
Copy link
Contributor

kpine commented Dec 12, 2024

Also I would put the values between square brackets as that is a list:

Thanks, that's right. (fixed my original)

@EwoutSnel
Copy link

Sorry guys, still no success with this suggestion.

The only working solution is to completely remove the "supported_color_modes" line from the json.

@kpine
Copy link
Contributor

kpine commented Dec 13, 2024

Sorry guys, still no success with this suggestion.

The only working solution is to completely remove the "supported_color_modes" line from the json.

Perhaps you should setup a test instance of HA with MQTT and see if it works there. If working in HA, then it's a Domoticz problem.

@robertsLando
Copy link
Member

@EwoutSnel could you try asking to Domotiz team if they support supported_color_modes correctly in MQTT autodiscovery?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants