Skip to content
πŸ”ˆ Sonos controller library written in Rust
Rust
Branch: master
Clone or download
Pull request Compare This branch is 2 commits behind w4:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.editorconfig
.gitignore
Cargo.toml
LICENSE
README.md

README.md

sonos.rs

License Downloads Version Docs

sonos.rs is a Sonos controller library written in Rust. Currently it only supports playback operations (play, pause, stop, skip, add track to queue, remove track from queue) with no support for search operations as of yet.

Example:

extern crate sonos;

let devices = sonos::discover().unwrap();
let bedroom = devices.iter()
    .find(|d| d.name == "Bedroom")
    .expect("Couldn't find bedroom");

let track = bedroom.track().unwrap();
let volume = bedroom.volume().unwrap();

bedroom.play();
println!("Now playing {} - {} at {}% volume.", track.title, track.artist, volume);
You can’t perform that action at this time.