enesbcs/shellyteacher4domo

RGBW device support

enesbcs opened this issue · 1 comments

The problem

Domoticz MQTT-AD defaultly sends this payload for RGB devices:
{"color":{"b":77,"g":132,"r":255},"state":"ON"}

It also contains a "hack" to send this payloads for Fibaro FGRGBW:
"value": {"red": 255, "green": 132, "blue": 77}}

But none of the above will work with Shelly as it needs such payload to operate:

{ "mode": "color", "turn": "on","red": 0,"green": 0,"blue": 255,"gain": 100,"white": 0}

See Shelly docs: https://shelly-api-docs.shelly.cloud/gen1/#shelly-bulb-rgbw-mqtt

For adding Shelly RGBW device support, Domoticz MQTT-AD has to implement these at least partially:

rgbw_command_topic, rgbw_command_template, rgbw_state_topic, rgbw_value_template

See HA docs: https://www.home-assistant.io/integrations/light.mqtt/