rainlake / homebridge-platform-lightify

MIT License
13 stars 5 forks source link

Fixed temperature bulbs to only show temperature capability in Home app (Original Package) #15

Closed mylesagray closed 6 years ago

mylesagray commented 6 years ago

As per #14.

Before they were showing up with full-colour palate available.

Colour temperature is actually governed by "mired" in Homekit, not hue or Kelvin, as such I have removed saturation and hue capabilities and added the ColorTemperature characteristic to the temperature bulbs as well as the necessary mired conversions to and from Kelvin:

http://cbkmrks.blogspot.co.uk/2013/03/color-temperature-mired-scale-dailey.html

I have also lowered the log level of discovery actions as the log gets extremely verbose and chatty otherwise.

Also resolves part of #11 by removing hard-coded return of a hue "1" for temperature bulbs and instead returning mired value.

I have been running this for a few weeks now and had zero disconnects or reasons to restart the Lightify gateway by using my updated node-lightify lib, which also resolves #13. A PR has been issued there that will need to be accepted and pushed to npm for those changes to work (updated package number).

rainlake commented 6 years ago

thank you @mylesgray. great work! I've merged your changes and published to npm