Saiyato / volumio-snapcast-plugin

Volumio 2 SnapCast plugin, to easily manage SnapCast functionality
115 stars 25 forks source link

Unable to play remotelly (Spotify Connect / AirPlay) #66

Closed patrul closed 2 years ago

patrul commented 5 years ago

Hi all,

I have been experiencing dificulties to configure SnapCast over Volumio.

I followed this guide https://github.com/Saiyato/volumio-snapcast-plugin but I am unable to set up properlly. It works when I play locally on Volumio (radio, Spotify ...), and the audio is sync but when I try to play from Spotify app it plays locally on the device running Volumio.

My config:

I have tried different implementations but nothing works. The templates are patched, the spopd services starts with patched config ... but somewhere it stops working and top says vollibrespot is running and not spopd, I guess this is responsible of playing locally on the server. But, with AirPlay it is the same, it does not route audio to pipe as I play Spotify on the Volumio web (it is playing on SPOTIFY pipe).

Saiyato commented 5 years ago

My account doesn't work with spop, but I've just pushed a change so snapcast will work with volspotconnect2 again. It might take some time for this PR to reach production though. You can find it here: https://github.com/volumio/volumio-plugins/pull/365

Everything should be routed through the pipe on the server, the server will use the client to connect to itself for playback on the server.

karba78 commented 4 years ago

need some help here too :) if anyone has got spotify streaming from snapcast server to snapcast client config 1 Pi3 with latest volumio release 2.698, latest snapcast plugin 2.4.5 3 pi Volumio/SnapCast Clients (2 Pi0, 1Pi3). What works: -Listening on snapcast server and snapcast client, Radio Streams, and local Flac Files -Listening on snapcast server only VolSpotConnect2 streams (does not stream to clients) seems normal as output is hw What does not work -Listening to SPOP Native Client. nor on server less on client What I would like to get working -Listen to Spotify Stream on server and client either volspotconnect2 or spop both would be great

seems my snapcast server is serving both streams. see below, not sure how to listen to spotify stream

● snapserver.service - Snapcast server Loaded: loaded (/lib/systemd/system/snapserver.service; disabled) Active: active (running) since Sun 2020-01-19 11:56:22 UTC; 1min 37s ago Process: 1084 ExecStart=/usr/bin/snapserver -d $USER_OPTS $SNAPSERVER_OPTS (code=exited, status=0/SUCCESS) Main PID: 1087 (snapserver) CGroup: /system.slice/snapserver.service └─1087 /usr/bin/snapserver -d --user snapserver:snapserver -d -s pipe:///tmp/snapfifo?name=VOLUMIO-MPD&mode=read&sample...

Jan 19 11:56:22 snapserver snapserver[1084]: pipe:///tmp/snapfifo?name=VOLUMIO-MPD&mode=read&sampleformat=44100:16:2 Jan 19 11:56:22 snapserver snapserver[1084]: pipe:///tmp/spotififo?name=VOLUMIO-SPOTIFY&mode=read&sampleformat=44100:16:2 Jan 19 11:56:22 snapserver snapserver[1084]: 2020-01-19 11-56-22 [Notice] Settings file: "/var/lib/snapserver/server.json" Jan 19 11:56:22 snapserver snapserver[1087]: daemon started Jan 19 11:56:22 snapserver systemd[1]: Started Snapcast server. Jan 19 11:56:22 snapserver snapserver[1087]: StreamServer::NewConnection: ::ffff:192.168.0.243 Jan 19 11:56:23 snapserver snapserver[1087]: StreamServer::NewConnection: ::ffff:192.168.0.225 Jan 19 11:56:23 snapserver snapserver[1087]: StreamServer::NewConnection: ::ffff:192.168.0.226 Jan 19 11:56:27 snapserver snapserver[1087]: ControlServer::NewConnection: ::ffff:127.0.0.1 Jan 19 11:56:28 snapserver snapserver[1087]: StreamServer::NewConnection: ::ffff:127.0.0.1

snapserver file in etc/default SNAPSERVER_OPTS="-d -s pipe:///tmp/snapfifo?name=VOLUMIO-MPD&mode=read&sampleformat=44100:16:2 -s pipe:///tmp/spotififo?name=VOLUMIO- SPOTIFY&mode=read&sampleformat=44100:16:2 "

snapclient file in etc/default USER_OPTS="--user snapclient:audio"

SNAPCLIENT_OPTS="-d -h 127.0.0.1 -s IQaudIODAC "

snapclient service status on server device ● snapclient.service - Snapcast client Loaded: loaded (/lib/systemd/system/snapclient.service; disabled) Active: active (running) since Sun 2020-01-19 11:56:28 UTC; 13min ago Process: 1181 ExecStart=/usr/bin/snapclient -d $USER_OPTS $SNAPCLIENT_OPTS (code=exited, status=0/SUCCESS) Main PID: 1195 (snapclient) CGroup: /system.slice/snapclient.service └─1195 /usr/bin/snapclient -d --user snapclient:audio -d -h 127.0.0.1 -s IQaudIODAC

Jan 19 11:56:28 snapserver snapclient[1195]: daemon started Jan 19 11:56:28 snapserver systemd[1]: Started Snapcast client. Jan 19 11:56:28 snapserver snapclient[1195]: Connected to 127.0.0.1

asound.conf file

SNAPCAST

pcm.!snapcast { type plug slave.pcm snapConverter }

pcm.writeFile { type file slave.pcm null file "/tmp/spotififo" format "raw" }

ENDOFSNAPCAST

startconnect.sh in volspotconnect plugin directory

this file is generated by the plugin. You should not edit it unless you know what you do. It will be overwritten by the plugin each

time a change in config is detected cd /data/plugins/music_service/volspotconnect2 ./vollibrespot -b 320 -c /tmp \ --disable-audio-cache \ --name 'snapserver' --initial-volume 27\ --device plughw:1 \ --mixer alsa \ --mixer-name 'Digital' --mixer-card 'hw:1' \

Saiyato commented 2 years ago

The asound file is history for now, it will resurface when Advanced Audio Modular Processing Pipeline (AAMPP from now on) is fully used.

You can find the new plugins (Volumio 3 ready) here: https://github.com/Saiyato/volumio-snapserver-plugin https://github.com/Saiyato/volumio-snapclient-plugin