Expand description
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_application("mycomputer") // Press the bridge before running this
.await
.unwrap();
println!("the username was {}", bridge.application_key); // 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().await.unwrap() {
bridge.set_light_state(&light.id, &cmd).await.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.
- Color
- Color
Temperature - Command
Light - Command
Light Color - Command
Light Color Temperature - Command
Light Dimming - Command
Light Dynamics - Command
Scene - Device
- Dimming
- Event
- Event
Color Temperature - Gamut
- Light
- Light
Metadata - Metadata
- Mirek
Schema - On
- Resolved
Room - Resolved
Zone - Resource
Identifier - Room
- Scene
- Scene
Metadata - Scene
Recall - Unauth
Bridge - An unauthenticated bridge is a bridge that has not
- XY
- Zone
Enums§
Functions§
Type Aliases§
- Result
- A type alias used for convenience and consiceness throughout the library.