| Crates.io | treadlers |
| lib.rs | treadlers |
| version | 0.1.0 |
| created_at | 2025-07-16 16:25:24.066224+00 |
| updated_at | 2025-07-16 16:25:24.066224+00 |
| description | A Rust library for controlling Treadly treadmills via Bluetooth Low Energy |
| homepage | |
| repository | https://github.com/binflip/treadlers |
| max_upload_size | |
| id | 1755782 |
| size | 213,547 |
A Rust library for controlling Treadly treadmills via Bluetooth Low Energy.
Treadlers provides a complete, safe, and easy-to-use interface for controlling Treadly treadmills through Bluetooth Low Energy.
Why this library exists: Treadly shut down as a company, leaving their treadmills as "dead bricks" when their backend services went offline. This library was created by reverse-engineering the official Treadly Android application (version 1.1.8) to restore functionality and enable custom control applications and integrations.
The entire communication protocol was analyzed and documented, including BLE service discovery, message formats, authentication flows, and safety systems.
use treadlers::{TreadlyDevice, SpeedUnit};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Discover and connect to a Treadly device
let mut treadmill = TreadlyDevice::connect_first().await?;
// Power on the treadmill
treadmill.power_on().await?;
// Set speed to 5 km/h
treadmill.set_speed(5.0, SpeedUnit::Kilometers).await?;
// Monitor status
let status = treadmill.get_status().await?;
println!("Current speed: {:.1} km/h", status.speed.current);
// Emergency stop if needed
treadmill.emergency_stop().await?;
Ok(())
}
Add this to your Cargo.toml:
[dependencies]
treadlers = "0.1"
tokio = { version = "1.0", features = ["full"] }
โ ๏ธ Important Safety Notice: This library controls physical exercise equipment. Always ensure:
See the examples directory for complete working examples:
basic_control.rs - Basic treadmill controlstatus_monitor.rs - Real-time status monitoringemergency_stop.rs - Emergency stop handling# Clone the repository
git clone https://github.com/yourusername/treadlers
cd treadlers
# Run tests
cargo test
# Run examples
cargo run --example basic_control
Contributions are welcome! Please feel free to submit a Pull Request.
Licensed under the Apache License, Version 2.0 (LICENSE).
This library is not affiliated with or endorsed by Treadly. Use at your own risk. The protocol was reverse-engineered for educational and personal use purposes after the company ceased operations, leaving devices non-functional without their backend services.