zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
962 stars 205 forks source link

RGBW dimmer is not reacting on color changes #3924

Open Thaui57 opened 1 week ago

Thaui57 commented 1 week ago

Checklist

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

robertsLando commented 5 days ago

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 commented 4 days ago

how can I downgrade to 9.18.1

robertsLando commented 4 days ago

@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 commented 4 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 3 days ago

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 commented 2 days ago

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 commented 2 days ago

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

Thaui57 commented 2 days ago

for sure but at the moment my entusiasm is a little restrained. By the way you are correct with the malfunktion of the RGBW dimmer from Domoticz to Zwave js ui. It doesn't work correctly. But no matter the colors from my script will be performing well.