Yamaha MusicCast smart home integration, free and open source

Control your Yamaha MusicCast amplifiers, soundbars and speakers locally, zone by zone.
Control your Yamaha MusicCast devices from Gladys: AV receivers, soundbars, network speakers and streamers. Everything stays on your local network: the integration talks to each device through the official Yamaha Extended Control API, with no account and no cloud.
Developed without the hardware: feedback welcome. This integration was written from the public Yamaha Extended Control specification and from the answers recorded by the open-source projects that drive these devices, without a MusicCast device at hand. If something does not behave as described, open an issue on the GitHub repository with your model.
This integration is not affiliated with Yamaha Corporation. MusicCast is a trademark of Yamaha Corporation.
What you get
- One Gladys device per zone: the main zone, and zone 2, zone 3 or zone 4 of the receivers that have them, each powered, turned up and switched independently.
- Power, volume and mute of each zone. The volume is shown in percent of the zone's range, the scale of the Gladys music widget.
- Input: a list of the inputs of the zone (HDMI, tuner, Spotify, Net Radio, AirPlay...), with the names you gave them on the device.
- Sound mode (sound program, DSP) on the zones that have it.
- Playback of the network sources: play, pause, previous, next, playback state, and the title, artist and album being played.
- Presets (favorites): a list of the presets stored on the device, to recall one.
- A dashboard widget per zone, a scene trigger "a track starts" and two scene actions: recall a preset, choose an input.
Requirements
- Gladys 5.1.0 or later.
- A Yamaha device with MusicCast (it appears in the MusicCast app), on the same local network as Gladys.
- To control a device in standby, enable Network Standby on it (the "Network" settings of the device or of the MusicCast app). Without it, a device in standby stops answering.
- A fixed IP address for each device (a DHCP reservation in your router) is recommended. The integration finds a device again after an address change, but up to 10 minutes later.
Configuration
Settings
| Field | What it does |
|---|---|
| IP addresses (optional) | Addresses of the devices the network search does not find, separated by commas. |
| Refresh while on | How often a device is read while one of its zones is on: 5, 10, 15 or 30 seconds. In standby, or when it does not answer, 30 seconds. |
| Language of the feature names | Names given to the features of the zones added afterwards, and language of the scene action messages. |
Finding the devices
At startup, and each time you click Scan in the Discovery tab, Gladys searches the network for UPnP media renderers (SSDP) on behalf of the integration; the integration keeps the ones that declare the Yamaha Extended Control API. The Search for MusicCast devices button of the configuration page does the same and tells you what it found, which addresses did not answer, and which typed addresses are not valid.
If a device is not found (a network that blocks multicast, another subnet), type its IP address in the configuration.
Adding the zones
Each zone appears in the Discovery tab, named after the device ("Living room") and the zone ("Living room Zone2"). Click Add to Gladys on the ones you want. Only the zones added to Gladys are read regularly.
Devices
Features of a zone
| Feature | Type in Gladys | Notes |
|---|---|---|
| Power | On/off switch | On / standby. |
| Volume | Music volume (0-100 %) | Percent of the zone's range (0 to 161 steps on a receiver, 0 to 60 on a speaker...). |
| Mute | On/off switch | |
| Input | Selection | The inputs of the zone, with the names given on the device. |
| Sound mode | Selection | Only on the zones with sound programs (receivers, soundbars). |
| Preset | Selection | Recalls a stored preset; shows the last one recalled from Gladys until the input changes. |
| Play, Pause | Music buttons | Network sources only. Pause stops a live radio. |
| Previous, Next | Music buttons | Network sources only. |
| Playback state | Music playback state | Playing / not playing. |
| Title, Artist, Album | Text | What a network source plays; "—" otherwise. |
The playback features exist only on devices with a network module, which all the zones of a device share: on a zone listening to another input (HDMI, tuner...), the playback buttons are refused so that they do not pause the music of another zone.
The zones also work with the Music box of the Gladys dashboard (play, pause, previous, next and volume).
Refresh
The device could push its changes, but only to a port of the integration container, which Gladys does not expose to the network. The integration therefore reads each device itself, without relying on the polling of Gladys: every 5 seconds by default while a zone is on, every 30 seconds in standby. A read is one request per added zone, plus one for what is playing when a zone listens to a network source. Yamaha publishes no request quota for this local API; the official MusicCast app reads the devices at a similar pace. The presets are read again every 5 minutes.
Only the values that changed are sent to Gladys, plus a reminder every 6 hours so that a stable value never shows as outdated.
Dashboard widget
The MusicCast widget shows one zone (to choose in its settings):
- what is playing (title, artist, album) on a network source;
- the volume, live;
- power, input and sound mode, and "muted" when the sound is cut;
- up to four buttons: power on / standby, play or pause, next track, mute.
Scene trigger
MusicCast: a track starts fires when playback starts, or when the track changes, on a network source (Spotify, Net Radio, AirPlay, server...). You can limit it to one zone. The scene receives the title, the artist, the album and the input name as variables. It does not fire for what was already playing when the integration started.
Scene actions
- Recall a MusicCast preset: plays preset number N (1 to 40) on a zone, as the preset buttons of the remote do. The zone turns on. Output: the name of the preset.
- Choose a MusicCast input: switches a zone to an input, given by its id (
hdmi1,tuner,spotify,net_radio,airplay...) or by the name shown on the device ("Apple TV"). The zone turns on first. Output: the name of the input. An unknown input fails with the list of the zone's inputs.
To turn a zone off or set its volume in a scene, use the usual Set device value action on its Power and Volume features.
Scene examples
- Wake-up radio: at 7:00 on weekdays, recall preset 1 (your morning radio) on the bedroom speaker, then set its volume to 20 %.
- Movie night: when the TV turns on, choose the input
hdmi1on the living room receiver and set the "Sound mode" to a cinema program. - Leaving home: when the last person leaves, put every zone in standby.
- Now playing: when a track starts in the kitchen, send yourself "{{triggerEvent.data.title}} — {{triggerEvent.data.artist}}".
Troubleshooting
- No device in the Discovery tab: click Search for MusicCast devices in the configuration.
If nothing is found, type the IP address of the device (shown in the MusicCast app, Settings →
device → Network). Check that
http://<address>/YamahaExtendedControl/v1/system/getDeviceInfoopens in a browser of your network: it must show"response_code":0. - The zone shows "unreachable": the device is unplugged, off the network, or in standby without Network Standby. The integration tries again every 30 seconds and searches the network again every 10 minutes (a new DHCP address).
- A command is refused: some commands are guarded while the zone is in standby (the volume, for example), and some models refuse functions they do not have. Turn the zone on first.
- Play, pause or next do nothing on a zone: these buttons act on the network sources only. Choose a network input first.
- Logs: the integration only writes the start, the devices found, the devices lost and back,
and one line per command. Set the
LOG_LEVEL=debugenvironment variable to see every read.
Limits
- Multiroom (MusicCast Link) is out of scope: creating or leaving groups is done in the MusicCast app. A zone that follows a group shows the "MusicCast Link" input.
- The tuner (FM/DAB) is not controlled beyond selecting it as an input or recalling a preset; its station is not shown as a title.
- The device does not tell which preset is playing: the Preset list shows the last one recalled from Gladys.
- Changes are seen at the next read (5 seconds by default), not instantly.
- The feature names are fixed when a zone is added to Gladys; changing the language later only applies to the zones added afterwards.
- Developed without the hardware: the answers were taken from the Yamaha specification and from open-source projects. Your feedback helps.
Configuration settings
These are the settings Yamaha MusicCast asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your MusicCast devices | section | No | The devices are found on the network by Gladys (SSDP), with no account and no cloud. Each zone (main, zone 2...) appears in the Discovery tab. If a device is not found, type its IP address below: give it a fixed address in your router. |
| IP addresses (optional) | string | No | Only for the devices the network search misses, separated by commas. |
| Refresh while on | select | Yes | How often a device is read while one of its zones is on. In standby, every 30 seconds. |
| Language of the feature names | select | Yes | Used for the zones added after a change, and for the messages of the scene actions. |
How to install Yamaha MusicCast in Gladys
- In Gladys, open Integrations: Yamaha MusicCast appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-musiccast:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-musiccast.
Yamaha MusicCast requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Yamaha MusicCast is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all external integrations
- Discover the native integrations built into Gladys
- Build and publish your own external integration
- Source code on GitHub — source of this documentation