sonor 2.0.0

a library for controlling sonos speakers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use futures::prelude::*;
use std::time::Duration;

#[tokio::main]
async fn main() -> Result<(), sonor::Error> {
    let mut devices = sonor::discover(Duration::from_secs(5)).await?;

    while let Some(device) = devices.try_next().await? {
        let name = device.name().await?;
        println!("- {}", name);
    }

    Ok(())
}