MusicCast from the terminal
Control your MusicCast speakers with a terminal UI. Initially written by me (on/off + vol + mute), additional features then generated with LLM assistance.

Features:
- power, volume, and mute controls
- input, favorite, volume, sound-program, and sleep control
- play/pause and track skipping
- now-playing and concise device information
- speaker grouping with linked devices kept together

Usage
╔═════════ Help (?) ══════╗
║ ↑ / ↓ Nav ║
║ RET Pwr ║
║ ← / → Vol ║
║ SHIFT + ← / → Small steps ║
║ v Set vol ║
║ i Input ║
║ f Favourites ║
║ s Sound program ║
║ t Timer ║
║ g Group ║
║ G Ungroup ║
║ m Mute ║
║ SPC Play/pause ║
║ n / b Next/prev ║
║ r Rescan ║
║ q Quit ║
║ ESC ESC Quit ║
║ ? Help ║
║ hjkl also supported ║
╚═══════════════════════════╝Installation
Go
$ go install github.com/atamanroman/ymc/cmd/ymc@latest
Homebrew
For now atamanroman/taps/ymc is a head-only formula.
$ brew install --HEAD atamanroman/taps/ymc
Nix
Run ymc directly from the checkout.
nix run '.#'Install ymc into your Nix profile.
nix profile install '.#'Enter the development shell.
nix developHow it works
MusicCast speakers are UPnP devices. ymc sends an SSDP search, fetches the UPnP description of everything that answers, and keeps the ones from Yamaha that describe themselves as MusicCast.
That description carries the base URL of the Yamaha Extended Control API, the undocumented HTTP API the official app uses. From there ymc reads speaker status, inputs and stored favourites, then sends the commands you type.
Speakers push their own state changes back as UDP messages, so the volume you change on the speaker itself, in the app, or from another machine shows up in the list right away. Those subscriptions expire after ten minutes, so ymc renews them in the background.
Read the full documentation and source.
Disclaimer
This repository is not affiliated with Yamaha Corporation.
Most of the UDP multicast code is copied and then altered from koron/go-ssdp. See LICENSE-3RD-PARTY for licensing details.
Licensed under GPL-3.0, License licenses found. Use on your own risk.