[](https://hub.docker.com/r/nicolabs/musiccast-repairkit) [](https://npmjs.com/package/musiccast-repairkit) [](https://github.com/nicolabs/musiccast-repairkit) [](https://plant.treeware.earth/nicolabs/musiccast-repairkit)
You will have to run this program on an always-on machine, connected to the same WiFi / Ethernet nertwork as your MusicCast devices so that it can communicate with them.
There is no guide on how to develop your own scenario, but you may look at the existing scripts, which are easy to understand for any JavaScript programmer.
*This is the script that comes from the original project, [axelo/yamaha-sound-program-by-source](https://github.com/axelo/yamaha-sound-program-by-source).*
On the command line, use `-s scripts/audio-profile.js` to enable this script and `--audio-profile.source=<source_IP>` to set the hostname or IP address of the receiver.
If you have a Yamaha MusicCast receiver (like *CRX N470D*) connected to ***wireless*** Yamaha MusicCast speakers (like a MusicCast 20 stereo pair), you may have noticed that **using the device's physical volume button or the IR remote will not update the volume of the wireless speakers**. Those hardware buttons only work with speakers physically wired to the CRX receiver.
Your only option to set the same volume to all connected devices is to use the Yahama MusicCast mobile app, which is far less user-friendly than the physical remote.
This script will solve this by listening to volume changes on a source device and applying them on one or more target devices.
-`--sync-volume.source=<source_IP>` sets the hostname or IP address of the *master* receiver
-`--sync-volume.target=<target_IP [target_IP [...]]>` lists the *slave* devices that will reflect the master's volume changes. You can separate them with a space or pass the option several times.
-`--standby-together.source=<source_IP>` sets the hostname or IP address of the *master* receiver
-`--standby-together.target=<target_IP [target_IP [...]]>` lists the *slave* devices that will follow the master's power status. You can separate them with a space or pass the option several times.
> There are many ways to run this program ; the exact shape of the command line depends on how you run it : with [npm, node](#running-with-nodejs-npm), [docker](#running-with-docker) or another way.
> For instance if you run using *npx*, replace `musiccast-repairkit ...` in the commands below with `npx musiccast-repairkit ...`.
You can define **generic options** at the top level and **scenario-specific options** under a prefix named after the script's name (its filename without extension).
For instance with `--source 1.2.3.4 --sync-volume.source 5.6.7.8`, `1.2.3.4` will be used as the *source* parameter by default but `5.6.7.8` will be used for the *sync-volume* scenario only.
You can edit it locally to reflect the IP addresses of your setup (or use a `.env` file or set environment variables).
It should not be necessary to define a `LOCAL_IP` environment variable as IP addresses inside the container will likely don't match the one of the host.
There is a special `scripts/debug.js` script that does nothing but print debug informations. It is simply loaded as a scenario (you need to set log level to *debug* at least) :
- [musiccast2mqtt, another implementation with MQTT, but old](https://github.com/ppt000/musiccast2mqtt) ([doc](https://musiccast2mqtt.readthedocs.io/en/latest/))
This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/nicolabs/musiccast-repairkit) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.