3.0.0
Changes
- Support for the Remote API V2
- Multiple ColorConverters in a seperate package
Breaking changes
Because the ColorConverters have been moved to the Q42.HueApi.ColorConverters package, you'll have to add a reference to that NuGet package and add a using for the specific ColorConverter you want to use. There are 3 ColorConverters available.
https://www.nuget.org/packages/Q42.HueApi.ColorConverters/
Remote API
The RemoteHueClient and IRemoteHueClient interface communicate with the Philips Remote Hue API V2.
Color Converters
The Philips Hue lights work with Brightness, Saturation, Hue and X, Y properties. More info can be found in the Philips Hue Developer documentation: http://www.developers.meethue.com/documentation/core-concepts#color_gets_more_complicated
It's not trivial to convert the light colors to a color system developers like to work with, like RGB or HEX. Q42.HueApi has 3 different color converters out of the box. They are in a seperate package and it's easy to create your own color converter.
-
Original: The original converter based on a large XY array.
-
OriginalWithModel: Does not use the large XY array, but should produce the same result and uses the lamp model.
-
HSB: Converts based on Hue, Brightness and Saturation.
How to use a color converter?
Add one of the following usings:
using Q42.HueApi.ColorConverters.Original
using Q42.HueApi.ColorConverters.OriginalWithModel
using Q42.HueApi.ColorConverters.HSB
This will add extension methods to
Light
,State
andLightCommand
. So you can set the color usingnew RGBColor()
and convert theState
back toRGBColor
Download from NuGet:
https://www.nuget.org/packages/Q42.HueApi/