#controller #music #sonos

sonos

Sonos controller library for.. controlling Sonos

5 releases

0.1.4 Feb 20, 2020
0.1.3 Jun 11, 2019
0.1.2 Jan 20, 2018
0.1.1 Dec 10, 2017
0.1.0 Dec 10, 2017

#82 in Audio

Download history 6/week @ 2020-03-14 25/week @ 2020-03-21 1/week @ 2020-03-28 11/week @ 2020-04-04 31/week @ 2020-04-11 1/week @ 2020-04-18 1/week @ 2020-04-25 2/week @ 2020-05-02 1/week @ 2020-05-09 16/week @ 2020-05-16 6/week @ 2020-05-23 11/week @ 2020-05-30 6/week @ 2020-06-06 5/week @ 2020-06-13 1/week @ 2020-06-20 7/week @ 2020-06-27

55 downloads per month

MIT license

30KB
629 lines

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

Dependencies

~5.5–9MB
~210K SLoC