stfnhmplr / homebridge-homee

use your homee with homebridge
MIT License
15 stars 6 forks source link

Support for RGB color and color temperature controls #25

Open FlyingLemming opened 1 year ago

FlyingLemming commented 1 year ago

This modification to the plugin enables the respective controls in HomeKit to set RGB colors and/or color temperatures for homee devices supporting those features.

The modifications are testing out fine with my Hue Go and Play fixtures connected to the homee Zigbee cube. A flaw in the Home app color picker produces some occasional strange effects (e.g brightness slider displayed in color despite the lightbulb being in CT mode) but this also happens to "real" HomeKit-enabled devices providing both RGB and color temperature. Third-party apps like Eve or Controller do not show this behavior, therefor I'd rather blame Apple for the glitch in their app. Note: In past versions of the HomeKit documentation, simultaneous use of Hue/Saturation and ColorTemprature characteristics in the same lightbulb were prohibited. In the current documentation this limitation does not exist anymore. Hence, I am confident that the implementation in this plugin does not break any rules set by Apple.

If some user do not require RGB color or color temperature controls for specific or even all of their devices, some new configuration options make it is possible to inhibit those controls as desired.

FlyingLemming commented 1 year ago

Found a little glitch and working on it – please stand by... ☺️

FlyingLemming commented 1 year ago

Fixed a glitch where in some cases a feedback from homee prevented the change of saturation in HomeKit. In addition, I implemented some workarounds for the color temperature control in RGB+CT lightbulbs. For such fixtures, the Home app is unable to process incoming color temperature values by itself and needs external emulation to display the slider and color temperature picker in the correct color. With this modification, the color temperature control works almost as smooth as for color-temperature-only devices. Tested successfully with