PHPackages                             gustav/sonos - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gustav/sonos

ActiveLibrary[API Development](/categories/api)

gustav/sonos
============

Control Sonos speakers using a simple API

2.2.0(5y ago)04Apache-2.0PHPPHP ^7.4

Since May 29Pushed 5y agoCompare

[ Source](https://github.com/GustavSoftware/sonos)[ Packagist](https://packagist.org/packages/gustav/sonos)[ Docs](https://github.com/duncan3dc/sonos)[ RSS](/packages/gustav-sonos/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (15)Versions (89)Used By (0)

sonos
=====

[](#sonos)

A PHP library for interacting with [Sonos](http://www.sonos.com/) speakers.

Full documentation is available at
PHPDoc API documentation is also available at [http://duncan3dc.github.io/sonos/api/](http://duncan3dc.github.io/sonos/api/namespaces/duncan3dc.Sonos.html)

[![release](https://camo.githubusercontent.com/b81f05e1afa55fb5b0de3e2a98c85234150195d1b2bc0825693811636aa7d47e/68747470733a2f2f706f7365722e707567782e6f72672f64756e63616e3364632f736f6e6f732f76657273696f6e2e737667)](https://packagist.org/packages/duncan3dc/sonos)[![build](https://camo.githubusercontent.com/9d40522a7a17522bb747f726e269f057df7cb49da54d3fc1c89462b8670470cc/68747470733a2f2f7472617669732d63692e6f72672f64756e63616e3364632f736f6e6f732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/duncan3dc/sonos)[![coverage](https://camo.githubusercontent.com/1e9c288fc9e7157793c5cb1edd4ceae9b1720a4eb65a2d0842902d71e4962074/68747470733a2f2f636f6465636f762e696f2f67682f64756e63616e3364632f736f6e6f732f67726170682f62616467652e737667)](https://codecov.io/gh/duncan3dc/sonos)

Quick Examples
--------------

[](#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 *

Changelog
---------

[](#changelog)

A [Changelog](CHANGELOG.md) has been available since version 0.8.8

Where to get help
-----------------

[](#where-to-get-help)

Found a bug? Got a question? Just not sure how something works?
Please [create an issue](//github.com/duncan3dc/sonos/issues) and I'll do my best to help out.
Alternatively you can catch me on [Twitter](https://twitter.com/duncan3dc)

duncan3dc/sonos for enterprise
------------------------------

[](#duncan3dcsonos-for-enterprise)

Available as part of the Tidelift Subscription

The maintainers of duncan3dc/sonos and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-duncan3dc-sonos?utm_source=packagist-duncan3dc-sonos&utm_medium=referral&utm_campaign=readme)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~121 days

Total

79

Last Release

2135d ago

Major Versions

0.8.8 → 1.0.02014-12-30

1.9.x-dev → 2.0.02018-07-21

PHP version history (6 changes)0.0.1PHP &gt;=5.4.0

1.4.0PHP &gt;=5.5.0

1.7.0PHP &gt;=5.6.0

1.9.5PHP ^5.6|^7.0

2.0.0PHP ^7.1

2.2.0PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e94b9c2235f7f12553818a7f94540eedaa2026a287d07ef12e1315ca559941a?d=identicon)[ckoecher](/maintainers/ckoecher)

---

Top Contributors

[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (309 commits)")[![fdp2](https://avatars.githubusercontent.com/u/7798051?v=4)](https://github.com/fdp2 "fdp2 (2 commits)")[![Nibbler73](https://avatars.githubusercontent.com/u/18286191?v=4)](https://github.com/Nibbler73 "Nibbler73 (2 commits)")[![tobiaskluge](https://avatars.githubusercontent.com/u/2651934?v=4)](https://github.com/tobiaskluge "tobiaskluge (2 commits)")[![rlerdorf](https://avatars.githubusercontent.com/u/54641?v=4)](https://github.com/rlerdorf "rlerdorf (1 commits)")[![scottpashley](https://avatars.githubusercontent.com/u/16228214?v=4)](https://github.com/scottpashley "scottpashley (1 commits)")[![0bp](https://avatars.githubusercontent.com/u/586405?v=4)](https://github.com/0bp "0bp (1 commits)")

---

Tags

streamingsonosupnp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gustav-sonos/health.svg)

```
[![Health](https://phpackages.com/badges/gustav-sonos/health.svg)](https://phpackages.com/packages/gustav-sonos)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[duncan3dc/sonos

Control Sonos speakers using a simple API

11015.1k1](/packages/duncan3dc-sonos)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
