Crate hueclient[−][src]
This library aims to enable communicating with Philips Hue lights via the correspnding Bridge.
Examples
A short overview of the most common use cases of this library.
Initial Setup
let bridge = hueclient::Bridge::discover_required() .register_user("mycomputer") // Press the bridge before running this .unwrap(); println!("the username was {}", bridge.username); // handy for later
Second run
const USERNAME: &str = "the username that was generated in the previous example"; let bridge = hueclient::Bridge::discover_required() .with_user(USERNAME);
Good night
let cmd = hueclient::CommandLight::default().off(); for light in &bridge.get_all_lights().unwrap() { bridge.set_light_state(light.id, &cmd).unwrap(); }
Structs
Bridge | The bridge is the central access point of the lamps is a Hue setup, and also the central access point of this library. |
CommandLight | |
Group | |
GroupState | |
IdentifiedGroup | |
IdentifiedLight | |
IdentifiedScene | |
Light | |
LightState | |
Scene | |
UnauthBridge | An unauthenticated bridge is a bridge that has not |
Enums
HueError | Represents any of the ways that usage of this library may fail. |
Functions
parse_command |
Type Definitions
Result | A type alias used for convenience and consiceness throughout the library. |