heos-lib

Crates.ioheos-lib
lib.rsheos-lib
version0.1.0
created_at2026-01-24 15:15:19.623912+00
updated_at2026-01-24 15:15:19.623912+00
descriptionTokio-based bindings for the HEOS system
homepagehttps://unexist.dev
repositoryhttps://github.com/unexist/heos-dial/tree/master/heos-lib
max_upload_size
id2066824
size92,786
Christoph Kappel (unexist)

documentation

README

heos-lib

License Crates.io Protocol Spec

These bindings are my own take on providing a small library to communicate and control with HEOS devices.

Getting Started

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);
                }
            }
        }
    }
}

Documentation

There will soon be docs available, for now please have a look at the test suite or the demo TUI app:

Roadmap

  • Improve device discovery
  • Make the lib ready to be used by Embassy
  • Maybe no_std?
Commit count: 459

cargo fmt