Skip to content
forked from duncan3dc/sonos

A PHP library for interacting with Sonos speakers

License

Notifications You must be signed in to change notification settings

fabricecw/sonos

This branch is 1 commit ahead of, 93 commits behind duncan3dc/sonos:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eeb897c · Feb 25, 2017
Feb 22, 2017
Feb 22, 2017
Aug 29, 2015
Apr 13, 2015
Feb 2, 2017
Feb 22, 2017
Jun 19, 2016
Dec 30, 2014
May 29, 2014
Dec 30, 2014
Feb 25, 2017
Mar 12, 2016

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/

Build Status Latest Version

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

About

A PHP library for interacting with Sonos speakers

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.9%
  • Shell 0.1%