Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duncan3dc/sonos
A PHP library for interacting with Sonos speakers
https://github.com/duncan3dc/sonos
php sonos
Last synced: 4 days ago
JSON representation
A PHP library for interacting with Sonos speakers
- Host: GitHub
- URL: https://github.com/duncan3dc/sonos
- Owner: duncan3dc
- License: apache-2.0
- Created: 2014-05-29T15:59:50.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-04-30T13:44:49.000Z (over 1 year ago)
- Last Synced: 2024-04-29T01:05:45.946Z (7 months ago)
- Topics: php, sonos
- Language: PHP
- Homepage:
- Size: 2.36 MB
- Stars: 108
- Watchers: 19
- Forks: 31
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
sonos
=====A PHP library for interacting with [Sonos](http://www.sonos.com/) speakers.
Full documentation is available at http://duncan3dc.github.io/sonos/
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://poser.pugx.org/duncan3dc/sonos/version.svg)](https://packagist.org/packages/duncan3dc/sonos)
[![build](https://github.com/duncan3dc/sonos/workflows/.github/workflows/buildcheck.yml/badge.svg?branch=main)](https://github.com/duncan3dc/sonos/actions?query=branch%3Amain+workflow%3A.github%2Fworkflows%2Fbuildcheck.yml)
[![coverage](https://codecov.io/gh/duncan3dc/sonos/graph/badge.svg)](https://codecov.io/gh/duncan3dc/sonos)Quick Examples
--------------Start all groups playing music
```php
$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
```php
$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](CHANGELOG.md) has been available since version 0.8.8Where 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
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)