Skip to content
/ hue-bt-rs Public

Rust Library for interfacing with Philips Hue through bluetooth. No need for a bridge!

Notifications You must be signed in to change notification settings

vlyr/hue-bt-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hue-bt-rs - Interface with Philips Hue lights without a Bridge

Information and guides on how to connect to your light are coming soon.

Notes

Usually, a delay of ~300ms is enough to let the light change state (color, temperature, etc.) fully.

Example

use hue_bt::client::{Client, DeviceSearchFilter};
use std::time::Duration;
use tokio::time;

#[tokio::main]
async fn main() {
    let client = Client::new(DeviceSearchFilter::Name("Lights"))
        .await
        .unwrap();

    let colors = &["#FF0000", "#00FFFF", "#FF00FF", "#0000FF"];
    let mut idx = 0;

    for _ in 0..1000 {
        client.set_color(colors[idx]).await.unwrap();

        if idx == 3 {
            idx = 0;
        } else {
            idx += 1;
        }
        time::sleep(Duration::from_millis(100)).await;
    }
}

About

Rust Library for interfacing with Philips Hue through bluetooth. No need for a bridge!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages