Sonos A PHP library for interacting with Sonos speakers

Getting Started

Usage

Controllers

Services

Fun Stuff

Radio

View the API Documentation for this class

Radio streaming (provided by TuneIn) is supported using the Radio class, which can be created like so:

$radio = $sonos->getRadio();

From the Radio class you can get Stream instances for a variety of entities.

You can get your favourite stations:

$stations = $radio->getFavouriteStations();
foreach ($stations as $station) {
    echo $station->getName() . "\n";
}

Or you favourite shows:

$shows = $radio->getFavouriteShows();
foreach ($shows as $show) {
    echo $show->getName() . "\n";
}

You can get specific shows/stations by using their names:

if ($show = $radio->getFavouriteShow("Rock Show with Daniel P Carter")) {
    $controller->useStream($show)->play();
}
$station = $radio->getFavouriteStation("Radio 1");