| Crates.io | heos-lib |
| lib.rs | heos-lib |
| version | 0.1.0 |
| created_at | 2026-01-24 15:15:19.623912+00 |
| updated_at | 2026-01-24 15:15:19.623912+00 |
| description | Tokio-based bindings for the HEOS system |
| homepage | https://unexist.dev |
| repository | https://github.com/unexist/heos-dial/tree/master/heos-lib |
| max_upload_size | |
| id | 2066824 |
| size | 92,786 |
These bindings are my own take on providing a small library to communicate and control with HEOS devices.
use heos::{Heos, HeosReply};
use heos::heos_command::HeosCommand;
use futures::pin_mut;;
use futures_util::StreamExt;
#[tokio::main]
async fn main() {
let devices = Heos::discover().await
expect("To discover devices");
pin_mut!(devices);
let mut cmd = HeosCommand::new()
.group("player")
.cmd("get_players");
while let Some(dev) = devices.next().await {
dev.send_command(&cmd).await
.expect("To send command");
if let HeosReply::Players(success, mut players) = reply {
if success {
for player in players {
println!("player={}", player);
}
}
}
}
}
There will soon be docs available, for now please have a look at the test suite or the demo TUI app: