Skip to content

duncan3dc/sonos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cd4e961 · Dec 18, 2024
Dec 18, 2024
Dec 18, 2024
Dec 18, 2024
Jul 6, 2017
Mar 13, 2022
Apr 13, 2015
Dec 18, 2024
Jun 19, 2016
Dec 30, 2014
Apr 14, 2022
May 29, 2014
Mar 13, 2022
Dec 18, 2024
Mar 13, 2022
Apr 14, 2022
Mar 13, 2022

Repository files navigation

sonos

A PHP library for interacting with Sonos speakers.

Full documentation is available at http://duncan3dc.github.io/sonos/
PHPDoc API documentation is also available at http://duncan3dc.github.io/sonos/api/

release build coverage

Quick Examples

Start all groups playing music

$sonos = new \duncan3dc\Sonos\Network;
$controllers = $sonos->getControllers();
foreach ($controllers as $controller) {
    echo $controller->name . " (" . $controller->room . ")\n";
    echo "\tState: " . $controller->getState() . "\n";
    $controller->play();
}

Add all the tracks from one playlist to another

$sonos = new \duncan3dc\Sonos\Network;
$protest = $sonos->getPlaylistByName("protest the hero");
$progmetal = $sonos->getPlaylistByName("progmetal");

foreach ($protest->getTracks() as $track) {
    $progmetal->addTracks($track["uri"]);
}

Read more at http://duncan3dc.github.io/sonos/

Changelog

A Changelog has been available since version 0.8.8

Where to get help

Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter

duncan3dc/sonos for enterprise

Available as part of the Tidelift Subscription

The maintainers of duncan3dc/sonos and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

About

A PHP library for interacting with Sonos speakers

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published