Home

Awesome

DPHue

DPHue is an Objective-C library for controlling the Philips Hue lighting system. It allows you to read and write the entire state of a Philips Hue controller and all of the lights it manages, including changing individual lamp color, power state and other settings.

DPHue works equally well on OS X and iOS.

Features

Caveats

Examples

Turn on all lights:

DPHue *someHue = [[DPHue alloc] initWithHueHost:@"192.168.0.53" username:@"088CA87723B99CBC38C44DDD0E7875A2";
[someHue readWithCompletion:^(DPHue *hue, NSError *err) {
     [hue allLightsOn];
}];

Set light 2 to half brightness:

DPHue *someHue = [[DPHue alloc] initWithHueHost:@"192.168.0.53" username:@"088CA87723B99CBC38C44DDD0E7875A2";
[someHue readWithCompletion:^(DPHue *hue, NSError *err) {
     DPHueLight *light = hue.lights[1];
     light.brightness = @128;
     [light write];
}];