diff --git a/README.md b/README.md index 0e8287b..ab83721 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# yamaha-sound-program-by-source +# musiccat-repairkit Instead of having to manually change the sound program when you're switching from e.g. TV to Spotify and vice verse, let the computer do it for you. @@ -25,6 +25,48 @@ Currently the following mappings from source to sound program are hard coded spotify => music with clear_voice disabled airplay => music with clear_voice disabled +## Use case : sync volume from a device to another one + +1. Subscribe to events at the source device. It's UDP : the code for this part comes from [axelo/yamaha-sound-program-by-source](https://github.com/axelo/yamaha-sound-program-by-source)). + +2. In the events received, identify those who define a volume update. + # 2. Récupérer le volume sur la chaîne (controlé par télécommand IR / bouton en facade) + GET http://192.168.1.31/YamahaExtendedControl/v1/main/getStatus + -> contient /volume = 32 + + # 3. Positionner le volume des enceintes à la même valeur + GET http://192.168.1.33/YamahaExtendedControl/v1/main/setVolume?volume=20 + + +## Docker build & run + +Build : + + docker-compose build + +Run locally, then stop : + + docker-compose up --detach + docker-compose down + +Deploy on a swarm : + + docker stack deploy -c docker-compose.yml musiccast-repairkit + + +## MQTT + +https://github.com/ppt000/musiccast2mqtt +https://musiccast2mqtt.readthedocs.io/en/latest/ + + pip install --user musicast2mqtt + musiccast2mqtt + +Marche bien, mais c'est du Python 2. +On voit bien les events de mise à jour du volume. +Le projet contient de la doc sur le protocole MusicCast également ! + + # References http://habitech.s3.amazonaws.com/PDFs/YAM/MusicCast/Yamaha%20MusicCast%20HTTP%20simplified%20API%20for%20ControlSystems.pdf @@ -32,3 +74,8 @@ http://habitech.s3.amazonaws.com/PDFs/YAM/MusicCast/Yamaha%20MusicCast%20HTTP%20 https://www.pdf-archive.com/2017/04/21/yxc-api-spec-advanced/yxc-api-spec-advanced.pdf https://github.com/samvdb/php-musiccast-api + + +# TODO + +Rename index.js to server.js and remove the start script from package.json (server.js is the default for npm start) diff --git a/doc/YXC_API_Spec_Advanced.pdf b/doc/YXC_API_Spec_Advanced.pdf new file mode 100644 index 0000000..51341ad Binary files /dev/null and b/doc/YXC_API_Spec_Advanced.pdf differ diff --git a/doc/YXC_API_Spec_Basic.pdf b/doc/YXC_API_Spec_Basic.pdf new file mode 100644 index 0000000..3a14ac7 Binary files /dev/null and b/doc/YXC_API_Spec_Basic.pdf differ