bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 199 forks source link

HA Bridge Hue API: Pass RGB values to update ha bridge internal light state #1304

Open theonlymiron opened 3 years ago

theonlymiron commented 3 years ago

Hi,

I would like to synchronize the state of HA Bridge with my color lights of my Fibaro Homecenter 2 (resulting that Alexa "knows" the correct state of my lights including the correct color). As I understand, it is possible to set the state via the special ha-bridge api call described in "Update bridge internal light state". In this call only on/off/dim state can be specified according to the documentation. Would it be possible to update also the color, preferable via RGB values (avoiding I have to do the color conversion to hue)? This would be super sick to have ;-)

Best Regards Miron

bwssytems commented 3 years ago

You can set the color in that call as well. The documentation just shows an example. Whatever can be called in the normal path can be changed by that call.

theonlymiron commented 3 years ago

Hey, thank you for the hint! I was aware of that, but with the available values I would need to calculate brightness, hue and saturation by my own, based on the RGB values I have, correct? It would be just super nice, if ha bridge could do this for me. Or am I just overseeing the correct parameter for passing RGB values?

Best Regards Miron

bwssytems commented 3 years ago

Look farther down in the page from this link and there is a table with the items you can use and hsb is already there.

https://github.com/bwssytems/ha-bridge#value-passing-controls

theonlymiron commented 3 years ago

oh sorry, big misunderstanding. I am reffering to the ha bridge rest api --> hue api-->Set light state. I would like to pass rgb values to ha bridge to set the light state (as nice "extra" function, because a lot of home automation systems just provide rgb).

--> I updated the thread title, sorry again :-)

bwssytems commented 3 years ago

The Hue API itself does not have the function, but it could be added as another function. I'll put this as a future enhancement.

theonlymiron commented 3 years ago

Nice! :-)