zwigglers / sonos

A PHP library for interacting with Sonos speakers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:Apache License 2.0


Languages

Language:PHP 99.9%Language:Shell 0.1%