C# helper library to talk to the Philips Hue bridge
First stable release of the new HueApi v1.0.0 NuGet package. The HueApi package uses the Clip v2 API to communicate with the Hue bridge. All future functionality is added to this API. HueApi replaces the old Q42.HueApi package.
Some of the features that are available in the HueApi that were not available in the Q42.HueApi
To make migration to the new API a bit easier, some extension methods are added in the namespace HueApi.Extensions
. So make sure to add this namespace to your files.
Only use the old Q42.HueApi packages for legacy functionality (for example: HTTP access and the ColorLoop
effect).
Q42.HueApi will keep working as long as the Clip V1 APIs are made available on the Hue bridges by Philips.
The OriginalWithModel ColorConverter has been removed, Hue is no longer updating the list of models. Lights now return a Capabilities.Control.ColorGamut property, this can be used as the input for the ColorConverter.
New:
Download from NuGet: https://www.nuget.org/packages/Q42.HueApi/ https://www.nuget.org/packages/Q42.HueApi.ColorConverters/ https://www.nuget.org/packages/Q42.HueApi.Entertainment/
Changes:
Deprecated packages:
Download from NuGet: https://www.nuget.org/packages/Q42.HueApi/ https://www.nuget.org/packages/Q42.HueApi.Entertainment/
Changes
More info about the new Hue Entertainment support: https://github.com/Q42/Q42.HueApi/blob/master/EntertainmentApi.md
Download from NuGet: https://www.nuget.org/packages/Q42.HueApi/ https://www.nuget.org/packages/Q42.HueApi.Entertainment/
Changes
Download from NuGet: https://www.nuget.org/packages/Q42.HueApi/
Changes
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
and LightCommand
. So you can set the color using new RGBColor()
and convert the State
back to RGBColor
Download from NuGet: https://www.nuget.org/packages/Q42.HueApi/