Help with Snapcast and Mopidy

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version

G_LIVE_PATCH_STATUS[0]=‘not applicable’

  • Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN’ bullseye 1

  • Kernel version | uname -a Linux DietPi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3) RPI 3 MODEL A

  • Power supply used | (EG: 5V 1A RAVpower) 5V

  • SD card used | (EG: SanDisk ultra) SanDisk

Additional Information (if applicable)

  • Software title | (EG: Nextcloud) - Snapcast mopidy
  • Was the software title installed freshly or updated/migrated? yes
  • Can this issue be replicated on a fresh installation of DietPi? it happened to me quite a few time but it could be user error and not understanding the process
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

When trying to get snapcast going the ‘play’ feature of media players (mopidy and YMPD) often didn’t play anything. Often it would flick through the tracks in the playlist withouth playing. I followed the process very closely and eventually got things working with YMPD but am reluctant to try much in fear of a catastrophy.

I did a lot research and expermientation and 99% of the time I had working audio but the pipes did not work and I can’t get a 2nd going – I am able to play files and snapcast works beautifully with YMPD. I am not sure if its related but some of the interfaces aren’t always available - like if I change something installed it can stop something else from working.

Initially i definitely made a lot of mistakes as I hadn’t used the software previously and don’t really understand streaming like I thought :slight_smile: Anyway its a great OS you have and thanks so much for everything!!! :slight_smile: :slight_smile: :slight_smile:

My best guess is there are permission problems with the pipe and the software / prog trying to use it.

Expected behaviour

Audio should play through Mopidy and the different stream

Actual behaviour

Audio is only working with YMPD

Extra details

I tried about 15-20 installs and got snapcast working twice. i was able to play local media
with OMPD, YMPD. I followed the provided instructions very closely. They are pretty bare bones and it ‘should just work’ :slight_smile:

As often is the way. After posting this I made some progress.

Some things I will highlight to try and help others.

Running snapclient as a demon (-d) will stop the sound.
I had assumed my issue was with the server but in this case it was actually the client.

FIX FIFO PERMISSIONS - kernel problem

sudo sysctl -n fs.protected_fifos

and disable/enable it with

sudo sysctl fs.protected_fifos=0/1 (most often your changing from 1 to 0)

check the users on the pipes (by default they live in /tmp)

dietpi after mucking about with mpd

prw-r–r-- 1 mpd audio 0 Apr 7 14:55 snapfifo