duncan3dc/sonos

Control Sonos speakers using a simple API

Maintainers

Package info

github.com/duncan3dc/sonos

pkg:composer/duncan3dc/sonos

Statistics

Installs: 15 130

Dependents: 1

Suggesters: 0

Stars: 110

Open Issues: 8

3.0.0 2026-06-11 11:19 UTC

README

A PHP library for interacting with Sonos speakers.

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

release build coverage

Getting Started

$sonos = new \duncan3dc\Sonos\Network();
$controllers = $sonos->getControllers();
foreach ($controllers as $controller) {
    echo $controller->getRoom() . " (" . $controller->getStateName() . ")\n";
}

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

Changelog

A Changelog has been available since version 0.8.8
This library was based on the great work done by both DjMomo/sonos and phil-lavin/sonos

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 connect with me on LinkedIn