openrgb2 0.3.0

OpenRGB SDK client, successor to openrgb
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use openrgb2::{Color, DeviceType, OpenRgbClient, OpenRgbResult};

#[tokio::main]
async fn main() -> OpenRgbResult<()> {
    // connect to local server
    let client = OpenRgbClient::connect().await?;
    let group = client
        .get_controllers_of_type(DeviceType::Motherboard)
        .await?;
    let controller = group.into_first().expect("No motherboard controller found");
    println!("Controller: {}", controller.name());

    let zone = controller.get_zone(0)?;
    println!("Zone: {}", zone.name());

    zone.set_all_leds(Color::new(255, 0, 0)).await?;
    Ok(())
}