i have a selfmade LED wordclock which is controlled by an ESP8266. I created a web interface to control the colors. But now i want to connect to domoticz using autodiscovery.
I have a few questions. Hopefully someone can answer me...
Most easy would be to create a pure RGB switch. however. Whatever i try, i allways get and at least RGBW (including the WarmWhite).
I tested several types of discovery messages. Like
Code: Select all
{
"name": "testeltje",
"unique_id": "testeltje",
"cmd_t": "domesphelper/light/testeltje/set",
"stat_t": "domesphelper/light/testeltje/state",
"schema": "json",
"brightness": true,
"rgb": true
}
or a bit more complex:
Code: Select all
{
"name": "testeltje",
"unique_id": "testeltje",
"cmd_t": "domesphelper/light/testeltje/set",
"stat_t": "domesphelper/light/teseltje/state",
"schema": "json",
"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": "domesphelper/light/testeltje/currentColor",
"rgb_command_topic": "domesphelper/light/testeltje/TargetColor"
}
Code: Select all
{
"state_topic": "zwave/EZ/12/38/0/currentValue",
"command_topic": "zwave/EZ/12/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 }}",
"rgb_state_topic": "zwave/EZ/12/51/0/currentColor",
"rgb_command_topic": "zwave/EZ/12/51/0/targetColor/set",
"brightness_state_topic": "zwave/EZ/12/38/0/currentValue",
"brightness_command_topic": "zwave/EZ/12/38/0/targetValue/set",
"device": {
"identifiers": [
"zwavejs2mqtt_0xf3981245_node12"
],
"manufacturer": "Fibargroup",
"model": "RGBW Controller (FGRGBW)",
"name": "EZ-RBGW1",
"sw_version": "25.25"
},
"name": "EZ-RBGW1_rgb_dimmer",
"unique_id": "zwavejs2mqtt_0xf3981245_12-51-0-currentColor"
}Code: Select all
{"color":{"b":255,"g":141,"r":106},"state":"ON"}Code: Select all
{"brightness":3,"state":"ON"}So after this long story my 2 questions are:
1. Is there some way to remove the "W" functionality from the RGBW using some kind of other autodiscovery message?
2. If not: what do i have to change so the wharmwhite color picker also results in output to MQTT?
UPDATE:
I just noticed in the 2 dialogs also the brightness slide bar does not do anything. I update the brightness on the main button (like it's a normal dimmer) i get proper output like {"brightness":96}. But if i use the brightness slider in the color picker dialog i just get an updates color message like {"state":"ON","value":{"blue":255,"green":255,"red":255,"warmWhite":0}}. so question 3 would be:
3: How do i get that brightness slider bar in the color picker to get output the value in an mqtt message