Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/w4/sonos.rs
🔈 Sonos controller library written in Rust
https://github.com/w4/sonos.rs
Last synced: 4 days ago
JSON representation
🔈 Sonos controller library written in Rust
- Host: GitHub
- URL: https://github.com/w4/sonos.rs
- Owner: w4
- License: mit
- Created: 2017-11-27T02:50:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-23T22:57:14.000Z (about 3 years ago)
- Last Synced: 2024-10-04T12:54:20.893Z (about 1 month ago)
- Language: Rust
- Size: 47.9 KB
- Stars: 26
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sonos.rs
[![License](https://img.shields.io/github/license/w4/reaper.svg)](https://github.com/w4/sonos.rs) [![Downloads](https://img.shields.io/crates/d/sonos.svg)](https://crates.io/crates/sonos) [![Version](https://img.shields.io/crates/v/sonos.svg)](https://crates.io/crates/sonos) [![Docs](https://docs.rs/sonos/badge.svg)](https://docs.rs/sonos)
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:
```rust
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);
```For a reference implementation of a CLI for Sonos please see [sonos-cli](https://github.com/w4/sonos-cli).