Volumio Snapcast Plugin Configuration Help

I currently have Volumio 2.296 installed on both a Raspberry pi 2 Raspberry pi 3. Both systems have the Spotify and the Volumio Spotify Connect plugins installed and both are working well outputing to TVs via HDMI. So far so good. I have installed Saiyato’s Volumio-Snapcast-Plugin on both systems however I cant get multiroom to work mainly due I suspect to not understanding the neccessary configuration rather than software/hardware issue, I have several questions which hopefully someone will be able to answer and guide me down the right path.

  1. In the Snapcast Plugin’s settings under Snapclient > Soundcard to use for playback the only option is “Headphone Jack”. How do I enable HDMI?

  2. I have enabled Snapserver on one Pi and enabled Snapclient on both, with the host settings set to “Localhost” and “Volumio1” (the name of the instance with the Snapserver enabled) on the local and remote boxes respectively. I have not changed any other settings, what else is neccessary?

  3. I do not fully understand if I need to select the snapserver stream in the remote box via the web UI or whether it should automatically play the stream from the snapserver whenever snapclient is enabled?

Although Ideally I would like to use Spotify as the multiroomsource, if I can get the basics (i.e. a local USB source) working then I will hopefully be able to tinker until I can get Spotify working.

Hopefully I have explained myself adequately, I have tried googling the problems and searching this forum but unfortunately have not been able to get anywhere. Many thanks in advance.

So… I think I may be further along. I have looked into /etc/mpd.conf and everything looks good. The following is from the server:

audio_output { type "fifo" enabled "yes" name "multiroom" path "/tmp/snapfifo" format "48000:16:2" }
I then tried:

snapclient -l

on both server and client boxes and got:

snapclient: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
However am I right in thinking that if the snapclient list command worked I could use this to get the correct number for HDMI and then add it as an option in:

nano /etc/default/snapclient.dpkg-new

So my next question is how can I install the libatomic.so.1 library?

Apologies for the repeated posts however I have Snapserver working now (via webradio, I will work on Spotify) outputting to the android app. the problem is definitely with Snapclient.

systemctl status snapclient.service

gives[code]volumio@volumio_bedroom:~$ systemctl status snapclient.service
● snapclient.service - Snapcast client
Loaded: loaded (/lib/systemd/system/snapclient.service; disabled)
Active: failed (Result: start-limit) since Wed 2017-10-25 12:18:24 UTC; 8s ago
Process: 14612 ExecStart=/usr/bin/snapclient -d $USER_OPTS $SNAPCLIENT_OPTS (code=exited, status=127)

Oct 25 12:18:24 volumio_bedroom systemd[1]: Failed to start Snapcast client.
Oct 25 12:18:24 volumio_bedroom systemd[1]: Unit snapclient.service entered failed state.
Oct 25 12:18:24 volumio_bedroom systemd[1]: snapclient.service holdoff time over, scheduling restart.
Oct 25 12:18:24 volumio_bedroom systemd[1]: Stopping Snapcast client…
Oct 25 12:18:24 volumio_bedroom systemd[1]: Starting Snapcast client…
Oct 25 12:18:24 volumio_bedroom systemd[1]: snapclient.service start request repeated too quickly, refusing to start.
Oct 25 12:18:24 volumio_bedroom systemd[1]: Failed to start Snapcast client.
Oct 25 12:18:24 volumio_bedroom systemd[1]: Unit snapclient.service entered failed state.
[/code]
Manually starting and stopping the service gives the same result. Does anyone have any ideas?

Sorry me again! Solved and working, as suspected the missing libatomic.so.1 library was the problem, the fix was easy after a bit of reading:

sudo apt-get -f install

found and installed the missing dependencies.

I appear to have a bit of lag between server and client and Spotify isn’t working yet but i’m sure that a bit of tinkering will quickly sort these problems out. I just thought I would post again in case this helps anyone else with similar problems.

Hi there,

If there’s a lag between the server and client, then probably the server is not using the client onboard.
Can you check if ALSA output is still enabled in your mpd.conf? If so, please disable it and connect the onboard client to the stream as well.

As for Spotify, please the readme on github for that, it’s quite complex software, so I’ve changed the defaults in the latest version.

I managed to get Spotify working with no trouble which was unexpected! As you predicted sound wasn’t being output via Snapclient thus causing the lag effect. All solved now. Thanks very much the plugin is brilliant and was easy to configure once I got my head round how it worked.

Is it possible and/or are there any plans to provide functionality to manage the snapclient/multiroom aspect via a button etc within the Volumio Web UI? I know its not possible at the minute (must be done via the Android app) but will this be implemented in future?

One other thing, the Snapclient plugin settings still do not show the option to output via HDMI though it is doing so, /etc/default/snapclient is using ALSA

USER_OPTS="--user snapclient:audio"

SNAPCLIENT_OPTS="-d -h 192.168.1.82 -s ALSA"

Its not a problem to me as the system is working as I wanted but i’m not sure if this is a bug?

Thanks again for your reply and for your work on the plugin.

Awesome! Glad it worked out for you.

This is possible, however not in a super way; under “Configure SnapServer streams” you can find a switch for “Switch stream for a client (group)”. There you can select a connected device and a stream on the server that device is connected to, that way you can switch streams. Not sure how to visualize that more easily though.

No I didn’t manage to map the correct hw-settings for HDMI, but if you select ALSA it will use the ALSA default playback device (either headphone or HDMI if no DAC is used). So yes and no you can/can’t select HDMI :wink:

Hello

have a volumio + snapcast plugin working pretty well with one server and 4 clients. on a fifth client; i would like the snapcast client to output to HDMI. the volumio client does produce output to HDMI, but the volumio/snapcast plugin would only let me choose the “Audio Jack” Output. the HDMI Option is not available although Volumio plays on it
any ideas ? thanks much

Hi,

I’m new to Volumio and coding etc, so this may be a simple fix.

I seem to be having a similar problem. I have a RPi3b+ as a server and client, and the same as a client. Both work perfectly well independently, with both being able to access my NAS and Spotify.

However, I haven’t been able to sync music from the server to the client at all. I’ve searched the forums etc and found people with similar problems, but not the same. I’ve reinstalled on both several times with the same results.

my results from systemctl status snapclient.service are as follows:-

[code]● snapclient.service - Snapcast client
Loaded: loaded (/lib/systemd/system/snapclient.service; disabled)
Active: active (running) since Thu 2018-11-15 12:22:58 UTC; 2h 0min ago
Process: 1191 ExecStart=/usr/bin/snapclient -d $USER_OPTS $SNAPCLIENT_OPTS (code=exited, status=0/SUCCESS)
Main PID: 1192 (snapclient)
CGroup: /system.slice/snapclient.service
└─1192 /usr/bin/snapclient -d --user snapclient:audio -d -h 127.0…

Nov 15 14:23:17 kitchen snapclient[1192]: Exception in Controller::worker():…d
Nov 15 14:23:17 kitchen snapclient[1192]: Error in socket shutdown: Transpor…d
Nov 15 14:23:18 kitchen snapclient[1192]: Exception in Controller::worker():…d
Nov 15 14:23:18 kitchen snapclient[1192]: Error in socket shutdown: Transpor…d
Nov 15 14:23:19 kitchen snapclient[1192]: Exception in Controller::worker():…d
Nov 15 14:23:19 kitchen snapclient[1192]: Error in socket shutdown: Transpor…d
Nov 15 14:23:20 kitchen snapclient[1192]: Exception in Controller::worker():…d
Nov 15 14:23:20 kitchen snapclient[1192]: Error in socket shutdown: Transpor…d
Nov 15 14:23:21 kitchen snapclient[1192]: Exception in Controller::worker():…d
Nov 15 14:23:21 kitchen snapclient[1192]: Error in socket shutdown: Transpor…d
Hint: Some lines were ellipsized, use -l to show in full.[/code]

Does the loaded line where it says the client is disabled the issue?
Or is it the exception in controller etc the issue, or none or all of the above?

Even if it is these, I don’t know how to correct this.

Any help or guidance would be greatly appreciated.

Thanks.
Wingnuts

Update:- I’m not sure what I’ve done, but now the status of the snapclient is as follows:-

[code]● snapclient.service - Snapcast client
Loaded: loaded (/lib/systemd/system/snapclient.service; disabled)
Active: active (running) since Thu 2018-11-15 20:29:03 UTC; 19min ago
Process: 3089 ExecStart=/usr/bin/snapclient -d $USER_OPTS $SNAPCLIENT_OPTS (code=exited, status=0/SUCCESS)
Main PID: 3090 (snapclient)
CGroup: /system.slice/snapclient.service
└─3090 /usr/bin/snapclient -d --user snapclient:audio -d -h 192.16…

Nov 15 20:29:03 kitchen snapclient[3090]: daemon started
Nov 15 20:29:03 kitchen systemd[1]: Started Snapcast client.
Nov 15 20:29:03 kitchen snapclient[3090]: Connected to 192.168.1.***[/code]

So, if I’m looking at this correctly, which I’m sure I’m not, it’s the

Loaded: loaded (/lib/systemd/system/snapclient.service; disabled)

which is causing the problem… or maybe the MPD itself… help.

I’m not sure whether or not snapcast will work on the 3B+, it seems the 3B+ uses different drivers; correct me if I’m wrong.
And since I don’t (yet) have one, I’m unable to test this. The unit file(s) created by the plugin should not be the problem, these are fairly simple (and driver independent, since they’re OS files).

You can test snapcast by running it manually:

snapserver -d -s pipe:///tmp/snapfifo?name=test

If that seems to be working, try connecting you Android phone to it (install the APK from the snapcast github). As soon as you can connect, play something over MPD and hear it on your phone - only then - try to connect a pi to the stream. That way you can at least verify snapserver to be working properly.

For snapclient the same approach applies - as long as the server is running - try to manually start the client:

snapclient -d -h {server IP address} -s {soundcard}

Fetch the soundcard name by calling (e.g. BossDAC):

snapclient -l

That way you can deductively determine where the problem lies.

Hi,

Thanks for your reply.

I did as you said and it all worked superb, no problems at all, even on a Pi Zero W with HiFiBerry DAC + streaming from my NAS drive. Which somehow I have managed before, but not sure how.

This time I followed your procedure in order to eliminate the faults, of which there were none. However, when I tried this after installing Spotify I ran into problems. I can get Spotify to work on the server (RPi 3B+) with and without the client side of things running. So, I stopped the client so that it was just the server, and it works locally as expected. However, my mobile (Android) connects to the stream but plays nothing. The server says that it is connected to my mobile, but still no sound. This was also the case when the other clients were connected. Not sure if this is a Volumio issue or a Spotify one, or moi…

[code]volumio@lounge:~$ systemctl status snapserver -l
● snapserver.service - Snapcast server
Loaded: loaded (/lib/systemd/system/snapserver.service; enabled)
Active: active (running) since Wed 2018-11-28 19:45:49 UTC; 3min 16s ago
Process: 1913 ExecStart=/usr/bin/snapserver -d $USER_OPTS $SNAPSERVER_OPTS (code=exited, status=0/SUCCESS)
Main PID: 1915 (snapserver)
CGroup: /system.slice/snapserver.service
└─1915 /usr/bin/snapserver -d --user snapserver:snapserver -d -s pipe:///tmp/snapfifo?name=multiroom&mode=read

Nov 28 19:45:49 lounge snapserver[1913]: Settings file: “/var/lib/snapserver/server.json”
Nov 28 19:45:49 lounge snapserver[1913]: pipe:///tmp/snapfifo?name=multiroom&mode=read
Nov 28 19:45:49 lounge snapserver[1913]: 2018-11-28 19-45-49 [Notice] Settings file: “/var/lib/snapserver/server.json”
Nov 28 19:45:49 lounge snapserver[1915]: daemon started
Nov 28 19:45:49 lounge systemd[1]: Started Snapcast server.
Nov 28 19:47:37 lounge snapserver[1915]: ControlServer::NewConnection: ::ffff:192.168.1.***
Nov 28 19:47:52 lounge snapserver[1915]: StreamServer::NewConnection: ::ffff:192.168.1.***
volumio@lounge:~$
[/code]

Any help here would be very appreciated.

ADIM: If this should be moved to a Spoitfy thread them please do or point me in the right direction.

Thanks.

What Spotify plugin did you install? Because this might not work straight out-of-the-box