arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
466 stars 104 forks source link

Shelly RGBW2 - config request.. #189

Open kurremkarmeruk opened 4 years ago

kurremkarmeruk commented 4 years ago

Hi! does anybody managed to successfully connect Shelly RGBW2 and control leds color and brightness? I just manage to turn it on and off, cant get color change to work.

I do not use dedicated plugin to control shelly cuz i have two AP (one network), and when shelly connect to "another than homebridge" then they dont respond.

arachnetech commented 4 years ago

Can you share the format of the MQTT messages that you want mqttthing to send?

SebDominguez commented 4 years ago

You can find the API documentation right here

The Shelly RGBW2 is listening commands on the following topic: shellies/shellyrgbw2-<deviceid>/color/0/set

You can send those different attributes to your Shelly:

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

The only annoyance that I had with home bridge-mqttthing is that when setRGBtopic is populated, setBrightness and getBrightness is ignored. So basically I have to force a gain of 100 because for a Shelly RGBW2, 255,0,0 with a gain of 1 is a very dim red, when on Homebridge-mqtthing its something like 1,0,0

I wonder if there is a clean way to handle this