PHPackages                             granddam/php-musiccast-api - 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. granddam/php-musiccast-api

AbandonedArchivedLibrary[API Development](/categories/api)

granddam/php-musiccast-api
==========================

A PHP library for interacting with Yamaha MusicCast speakers

10292PHP

Since Nov 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/grandDam/php-musiccast-api)[ Packagist](https://packagist.org/packages/granddam/php-musiccast-api)[ RSS](/packages/granddam-php-musiccast-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Yamaha MusicCast API PHP Library
================================

[](#yamaha-musiccast-api-php-library)

A php library for interacting with Yamaha MusicCast speakers.

[![Build Status](https://camo.githubusercontent.com/242cf41dd37f65bf2c0f6106dcd8ff84c2d7f0e620c23196b6cbfffdfa0ff26a/68747470733a2f2f7472617669732d63692e6f72672f6772616e6444616d2f7068702d6d75736963636173742d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/grandDam/php-musiccast-api)

Based on the API specification found at [https://jayvee.com.au/downloads/commands/yamaha/YXC\_API\_Spec\_Basic.pdf](https://jayvee.com.au/downloads/commands/yamaha/YXC_API_Spec_Basic.pdf)

Updated API specs on 2017/04:

Requirements
------------

[](#requirements)

PHP &gt;= 5.6 Guzzle library, (optional) PHPUnit to run tests.

Install
-------

[](#install)

Download [Composer](https://getcomposer.org/)

```
$ curl -s http://getcomposer.org/installer | php
```

Via composer

```
$ composer require granddam/php-musiccast-api php-http/guzzle6-adapter
```

You can install any adapter you want but guzzle is probably fine for what you want to do.

Examples
--------

[](#examples)

Start all groups playing music

```
require 'vendor/autoload.php';

$musicCast = new MusicCast\Network();
$controllers = $musicCast->getControllers();
foreach ($controllers as $controller) {
    echo $controller->getGroup() + "\n";
    echo "\tState: " . $controller->getStateName() . "\n";
    $controller->play();
}
```

Enabling events
---------------

[](#enabling-events)

Yamaha can notify you directly in case of changes. The events are spread out as UDP unicast packets. In order to receive these packets you must subscribe every 10 minutes, else the subscription will expire.

Only the IP that requests the subscription will receive the events.

The default port is `41100`.

```
$yamaha->api('events')->subscribe();
```

### Using php sockets to read the events

[](#using-php-sockets-to-read-the-events)

Pretty easy using Clue's socket wrapper.

```
$ composer require clue/socket-raw
```

```
$factory = new \Socket\Raw\Factory();
$socket = $factory->createUdp4();
$socket->bind('0.0.0.0:41100');

while(true) {
    $data = $socket->read(5120);
    $result = json_decode($data, true);

    print_r($result);
}
```

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30978463?v=4)[granddam](/maintainers/granddam)[@grandDam](https://github.com/grandDam)

---

Top Contributors

[![grandDam](https://avatars.githubusercontent.com/u/30978463?v=4)](https://github.com/grandDam "grandDam (33 commits)")[![felixbublitz](https://avatars.githubusercontent.com/u/20013250?v=4)](https://github.com/felixbublitz "felixbublitz (1 commits)")[![lucguinchard](https://avatars.githubusercontent.com/u/17431299?v=4)](https://github.com/lucguinchard "lucguinchard (1 commits)")[![samvdb](https://avatars.githubusercontent.com/u/632452?v=4)](https://github.com/samvdb "samvdb (1 commits)")

### Embed Badge

![Health badge](/badges/granddam-php-musiccast-api/health.svg)

```
[![Health](https://phpackages.com/badges/granddam-php-musiccast-api/health.svg)](https://phpackages.com/packages/granddam-php-musiccast-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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