PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Support for the new WW / RGB / RGBW / RGBWW dimmer #147

Closed adrianmihalko closed 4 years ago

adrianmihalko commented 6 years ago

Hi,

There is a new dimmer plugin in development for Domoticz.

It's compatible with current version of edomoticz, but there are small glitches which needs to be fixed.

There is a little glitch in the white mode (color temperature). This seems to be limitation in Homebridge/eDomoticz (it sends RGB hex through API setcolbrightnessvalue instead of color temperature through API setkelvinlevel) together with the issue below (unsaturated colors are translated to white, and Yeelight driver does not handle that).

If I set #fefefe, color is not changing (example from red): This is due to special behavior of Domoticz when setting RGB hex string: Almost white is translated to exactly white, and the yeelight driver is not handling the request to be exactly white correctly. I don't dare to change this behavor for the sake of backwards compatibility. I'll modify the yeelight driver to try to handle it better though, if you don't mind testing again.


If you have a little time, can you please cooperate with @emontnemery to fix this issue?

rswilem commented 6 years ago

Hi @adrianmihalko,

Domoticz RGB dimmers/lamps has always been kind of an issue. I just looked through our code, we're already sending HEX values to the Domoticz API.

                "hex": Helper.HSVtoRGB([this.hueValue, this.saturationValue, 100])
            },

I have also opened an issue on this a while ago (but was closed 🙈): https://github.com/domoticz/domoticz/issues/909

emontnemery commented 6 years ago

@xTheRamon, @PatchworkBoy What is being worked on domoticz/domoticz#2078 is to:

If you can have a look at how color is reported over MQTT and web API to make sure it is useful, that would be great. Branch is here: domoticz/domoticz#2229

rswilem commented 6 years ago

Oh wow, great work. I'll definitely have a look. Thank you for your effort.

Yardco commented 6 years ago

Any progress on this?

morilm commented 6 years ago

Hi. The color RGB/W/WW support if finished on domotic Color values are provided now on Json query.

like "Color" : "{\"b\":255,\"cw\":0,\"g\":3,\"m\":3,\"r\":176,\"t\":0,\"ww\":0}"

information is here:

https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Set_a_light_to_a_certain_color_or_color_temperature

So the only missing part is to implement the new subtypes into homebridgde. I have already open a request to include it.

Regards, Miguel

NewFolk commented 5 years ago

Hi, I have just bought IKEA WW zigbee bulb and i could not change temperature through edomoticz. While everything OK through domoticz itself.

This issue is Open? No decision or workaround?

PatchworkBoy commented 4 years ago

Merged in @hendrikmoree’s pull request to handle WW bulbs (https://github.com/PatchworkBoy/homebridge-edomoticz/pull/187) however, causes homebridge to hard crash & restart when setting colour temp. Still needs further investigation. Have fudged around it in meantime to prevent app crashing. Dimming / on / off still works fine for WW bulbs.

PatchworkBoy commented 4 years ago

Above fixed in https://github.com/PatchworkBoy/homebridge-edomoticz/commit/59cf9ee5ebea0067be78bb101bf0b5d330042f94