dotsam / homebridge-milight

MiLight/LimitlessLED/Easybulb Plugin for Homebridge
MIT License
63 stars 12 forks source link

Support white colour temperature setting on fullColor bulbs #26

Open dotsam opened 7 years ago

dotsam commented 7 years ago

There is currently no standard HomeKit characteristic for colour temperature. The Apple Home app has a colour picker for "temperature", but this actually only sets an HSV value, with no way to separate is from a command setting another colour.

The Philips Hue bridge v2 implements the custom characteristic E887EF67-509A-552D-A138-3DA215050F46 for colour temperature, and a handful of apps support this now. I'll likely try to implement this with that characteristic, as https://github.com/ebaauw/homebridge-hue/issues/35 does. Hopefully this will be an official characteristic in the future.

mobster1940 commented 7 years ago

@dotsam Thanks for the fix man, there is only one small bug that is present now, if you turn the lights white it needs 2 consecutive commands to turn the lights to any other color. I am writing this here because you closed #19.

dotsam commented 7 years ago

Hi @mobster1940,

I've pushed a new beta to the dev branch that implements colour temperature via a new official characteristic, and I've also made a change which may fix the issue you have with bulbs not changing colours with the first command out of white mode.

If you have a moment, could you test this version by installing with npm install -g git://github.com/dotsam/homebridge-milight.git#dev

mobster1940 commented 7 years ago

Hi @dotsam, I'm not at home now but I'll surely try it over the weekend and let you know. Thanks!

mobster1940 commented 7 years ago

Hi @dotsam, I tried your dev release over the weekend but unfortunately colour changing after setting white doesn't work, you have to resend the command for the light to change colour. What's weird is that with the master release the colour change worked immediately when I gave the command through Siri, but didn't work when I did it from the Home app. I have realised that for some reason the saturation and hue are sent in opposite order from the Home app and Siri, so I think the solution to my problem has to come from Apple. Thanks for the support!

dotsam commented 7 years ago

I've just released version 1.1.0 which implements colour temperature changing for RGBW+CCT bulbs, and hopefully also makes colour changes more reliable when commands are sent in different order. Please upgrade and test when you're able to and let me know if things are working correctly.