duncan3dc / sonos
Control Sonos speakers using a simple API
Installs: 14 955
Dependents: 1
Suggesters: 0
Security: 0
Stars: 107
Watchers: 19
Forks: 33
Open Issues: 11
Requires
- php: ^7.3 || ^8.0
- ext-soap: *
- ext-sockets: *
- duncan3dc/cache: ^1.0
- duncan3dc/domparser: ^1.4.1 || ^2.1
- duncan3dc/logger-aware-trait: ^0.2 || ^1.0
- duncan3dc/sonos-common: ^1.0
- duncan3dc/speaker: ^1.0
- guzzlehttp/guzzle: ^6.0 || ^7.0
- league/flysystem: ^1.1.4
- psr/log: ^1.1
- psr/simple-cache: ^1.0
Requires (Dev)
- duncan3dc/object-intruder: ^0.3 || ^1.0
- maglnet/composer-require-checker: ^2.0 || ^3.0 || ^4.0
- mockery/mockery: ^1.5
- nikic/php-parser: ^4.13
- phpstan/phpstan: ^0.12.99
- phpstan/phpstan-mockery: ^0.12.14
- phpstan/phpstan-phpunit: ^0.12.22
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
- dev-main
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.x-dev
- 2.1.1
- 2.1.0
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.9.x-dev
- 1.9.11
- 1.9.10
- 1.9.9
- 1.9.8
- 1.9.7
- 1.9.6
- 1.9.5
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.5
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.8.8
- 0.8.7
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- 0.0.2
- 0.0.1
- dev-version3
- dev-mock-system
- dev-subscriptions
- dev-spotify
- dev-google-instant-mixes
- dev-favourites
- dev-device-descriptions
- dev-issue-62
- dev-documentation
This package is auto-updated.
Last update: 2024-11-19 09:14:16 UTC
README
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/
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
duncan3dc/sonos 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.