
Integrating SnapCast into Volumio for the best multi-room system
In the previous document we already saw how to have Volumio 2 perfectly mounted on a Raspberry Pi and we discovered how simple it is and how ideal it is to think about using it as an interface for our home audio system (For example). In this post we will see how to install SnapCast in Volumio and be able to stream to other Raspberry Pi with a speaker and make an impressive cool background music!
The idea is to have on the Raspberry Pi the catalog of all our music that we like and leave a list that sounds continuously in Volumio. SnapCast is a client/server audio player, that allows multiple clients to connect to it and play your audio in the best quality! In addition, these will work with perfectly synchronized audio based on the time of the clients! So at Volumio we will install and enable the server part, and we will be able to use other Raspberry Pi with speakers distributed around the house on the client side. Or we can also try a client app on our mobiles!
Installation & Config,
We start with the installation, We download the plugin and install it with:
git clone https://github.com/Saiyato/volumio-snapcast-plugin.git cd volumio-snapcast-plugin/ volumio plugin install
We access Volumio and go to the Plugins or Complements and we can see it in “Installed add-ons”, We try to enable it and modify its “Settings”,
It will be here where we will indicate whether or not we want to enable SnapCast SnapServer, Audio quality, The channels…
As we can see, this Volumio could also be a SpanCast client with SnapClient,
And I give you some screenshots of my audio configuration in case anyone requires them!
Just as I leave you the part of how my file would be configured /etc/mpd.conf
...audio_output { type "Alsa" enabled "No" Name "Alsa" device "Hw:0,0" Dop "No" } audio_output { type "FIFO" enabled "Yes" Name "Multiroom" path "/TMP/Snapfifo" format "44100:16:2" } ...
This would be the SnapCast app on my Android phone, that we can also use it as a speaker 🙂 or to control the rest of the client devices.
Installing the SnapCast client on a Raspberry Pi,
Well, and the following steps would be the ones we should follow if we want to have SnapClient installed on a Raspberry Pi to be used as a remote speaker, First we install the dependencies, we download SnapCast, We compile and install only the client part:
Sudo apt-get update sudo apt-get install libboost-dev libboost-system-dev libboost-program-options-dev libasound2-dev libvorbis-dev libflac-dev alsa-utils libavahi-client-dev avahi-daemon git clone https://github.com/badaix/snapcast.git cd snapcast/externals git submodule update --init --recursive cd .. Make all sudo make installclient sudo service snapclient restart
And that's it! It will start playing the music we have playing in Volumio!! The normal thing will be to put motion sensors and activate the service when it detects a movement. It will be super easy, con 'sudo systemctl disable snapclient’ we will make sure that the service does not start automatically with the Pi, and when movement is detected, Simply lifting the service will be enough! I hope you enjoyed it!