Skip to main content

Crate open_ecc

Crate open_ecc 

Source
Expand description

§open_ecc

Unofficial Rust API for Elgato Key Lights.

Communicates with devices over their local HTTP API on port 9123. All temperature values exposed through this crate are in Kelvin; conversion to and from the device’s internal unit is handled transparently by the serialisation layer.

§Quick start

use open_ecc::{ecc::Ecc, light::Light};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let ecc = Ecc::default();
    let light = Light::new(&ecc, "192.168.0.50");
    light.on().await?;
    light.brightness_set(80).await?;
    light.temperature_set(5000).await?;
    Ok(())
}

Modules§

contracts
Serialisable types that mirror the Elgato HTTP API JSON schema.
ecc
Low-level HTTP client for the Elgato device API.
light
High-level, ergonomic wrapper around a single light endpoint.