Sonos A PHP library for interacting with Sonos speakers

Getting Started

Usage

Controllers

Services

Fun Stuff

Line-In

View the API Documentation for this class

When using speakers that have Line-In support, you can set controllers to play them like so:

$office = $sonos->getSpeakerByRoom("Office");

$bedroom = $sonos->getControllerByRoom("Bedroom");
$bedroom->useLineIn($office)->play();

Line-In usage is technically a stream, so Controller::isStreaming() will return true.

The useLineIn() parameter is optional if you want the controller to play its own Line-In, however this might not have the desired effect if speakers are grouped, as the speaker with the Line-In option might not be the controller, so it’s recommended that you always pass a speaker instance.

$sonos->getControllerByRoom("Bedroom")->useLineIn()->play();