Thanks to visit codestin.com
Credit goes to lib.rs

#equipment #exercise #communicate

kondis

a simple library to communicate with exercise equipment

5 unstable releases

Uses new Rust 2024

0.3.2 Aug 29, 2025
0.3.1 Aug 29, 2025
0.2.1 Aug 29, 2025
0.1.0 Aug 29, 2025

#451 in Hardware support

Codestin Search App Codestin Search App Codestin Search App Codestin Search App

171 downloads per month

Custom license

27KB
520 lines

kondis

kondis [n, slang] physical condition

a simple library to communicate with exercise equipment

supports

  • iConsole+0028
    • set target cadence (RPM)
    • set target power (W)
    • read FTMS data (kind of, incomplete)

usage

cargo add kondis

also, needs tokio and wants anyhow.

use kondis::equipment_type_to_equipment;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let (shutdown_tx, mut shutdown_rx) = channel();
    tokio::spawn(async move {
        tokio::signal::ctrl_c().await.unwrap();
        shutdown_tx.send(()).unwrap();
    });

    let mut equipment = equipment_type_to_equipment(
        EquipmentType::NonBluetoothDevice,
        32,
        &mut shutdown_rx,
    )
    .await
    .unwrap();
    if !equipment.connect().await? {
        return Ok(());
    }
    loop {
        if let Some(data) = equipment.read().await? {
            let state = format!(
                "{:03} rpm :: {:03} W :: {:.2} km/h",
                data.cadence, data.power, data.speed
            );
            println!("{state}");
        }
    }
    equipment.disconnect().await?;
}

Dependencies

~5–37MB
~493K SLoC