Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

calebd/hue-sdk-objc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMDHue

CMDHue is an Objective-C SDK for working with Hue lights. It is powered by ReactiveCocoa. It currently covers a small subset of the Hue API but I plan to expand that over time.

Usage

Instantiate a client:

HueClient *client = [[HueClient alloc] initWithUsername:@"username"];

Play with some lights:

[[client lightsByName] subscribeNext:^(NSDictionary *lights) {
	HueLight *light;
	
	light = lights[@"Desk"];
    [light performBatchUpdates:^(HueLight *light) {
        light.color = [UIColor purpleColor];
		[light turnOn];
    }];
	
	light = lights[@"Floor"];
    [light performBatchUpdates:^(HueLight *light) {
        light.color = [UIColor blueColor];
		[light turnOn];
    }];
	
	light = lights[@"Bookshelf"];
	[light turnOff];
}]

License

CMDHue is released under the MIT license.

About

Objective-C SDK for working with Hue lights.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published