[Guide] Install Squeezelite on Volumio (RaspPi)

A reboot fixed it all…

Having problems with MPD so decided to give this a go. Seem to have installed and set everything as per the first post with no trouble.

I’ve installed the official app for Android but it says “Your player was not found”. I’m guessing I’m missing some other steps here?

Have you got the squeezecenter (sp?) server running successfully somewhere to talk to the squeezelite?

Ah…no. :blush:

hehe, easy mistake to make!

I thought it would similar to the Volumio GUI once installed. i.e. I’d point it to my NAS etc and get it going from there.

That’ll teach me to read about things first!

Dakku - this is amazing - thank you for this tutorial. I have been struggling with the 1.2 beta of volumio but have now got it working reasonably well. I have Logitech media server running on my Ubuntu server made out of an old PC and the controller apps on my ipad and android phone. I installed squeezeboxlite following your guidelines and I find the sound is so much better than MPD. I can still hear some clicks/pops but squeezebox seems to limit these some how so they live far back in the sound field.
Thanks again JCHNanty

What sound hardware have you got? I have no trouble with clicks and pops at all using hifiberry.
Graham

I have an Audioengine D1 which connects via USB it works brilliantly when connected to my PC. I’m guessing from what I’ve read that i2c is the connection to use but as I already have this I’m not planning on changing. when I first started trying this with the Pi (using Raspyfi) I found that depending on how I connected it all (using a powered USB hub) made a difference but I haven’t played around with that yet. At the moment I’ve connected my WiPi dongle and my DAC to the Pi’s USB’s so I think I need to spend some time trying different configurations. I’ve always had pops and clicks (even using a cat5 connection) so perhaps I have an early version of the Pi (B) (or a dodgy one!). I’m not that bothered by the pops and clicks as I’m of an age where I grew up with Vinyl (and 78’s :smiley:) so I’m used to it!

Cheers, JCHNanty

Great tutorial-just merged my two audio worlds !
Thanks !

Hi,
I’m on beta 1.3, rpi + hifiberry dac and shairplay is not happy about the new install (squeezelite).
After boot they all run but as soon as I try to send something through airplay, shairport complains and dies (alsa busy message).
If I kill squeezelite, restart shairport and retry, it works. Am I missing something??
Moreover, I’m planing to add bluetooth support also - so that would be 4 contenders for 1 alsa.

I guess pulseaudio is the only clean solution…but if possible, I’d probably prefer a dirty but working solution without pulse…

Hi rickx,

I am now having same issue after using a I2S 9023 DAC, previously I used one USB DAC and I can make squeezelite work friendly with Shairport and UPnP gmediarender. so this may have something to do with I2S DAC.

I am thinking of using a few button switches to easily switch between Squeezelite, Airplay, and uPnP, will need a little scripting…

btw, thanks for mentioning pulseaudio, will look at it…

I am still using 1.1 if that matters anyway…

just did a little more troubleshooting, now i believe the root cause is my USB DAC (Dacmagic 100) support hardware mixing, but I2S DAC doesn’t. the Hifiberry obviously doesn’t support hw mixing neither.

adding a software mixing layer may solve the problem, pulse audio can do this i guess. i also found a article about Alsa Sharing may be possible fix :
alsa.opensrc.org/AlsaSharing

but I am not familiar with ALSA configuration, may take some days to experiment with it.

Hi Daccu,

I have done your setup for Squeezelite. Maybe a stupid question, but how can I switch to Squeezelite. I tried the Volumio IP adres:9000, as I do with the LMS server on my Synology NAS?

Can you help me.

Thanks,

Harold

Hi Dacco,

I succeed. I had some problems with starting the service. I’m not so familar with line commands. Now I see Volumio in LMS player and apps.

Thanks,

Harold

Hi Dacco,

Great tutorial for my Rpi. It works fine. You did a wonderful job. Thank you.
I followed the same tutorial for my Cubietruck but no luck. That did not work.
Any idea?

Hi,

Nice tutorial. I have already followed it in the past and it worked well with the jack output. Now, I would like to use my DAC but since I have installed Squeezelite, Shairport do not want to respond and crash every time.

However if I stop squeezelite when I boot, shairport respond but do not work well…

I think there are some collisions between shairport and squeezelite but I do not know how to solve the problem. I had the same problem with MPD/Shairport before de version 1.4 but the problem was solved after this version.

I also know there are other solution like Squeezeplug or PiCorePlayer but, first I do not know how to install Shairport on PiCorePlayer and secondly, Squeezelug is not always detected by my LMS and is not really user friendly.

Can someone help me ? If someone has other idea, I am very interested. In fact, I am not really interested in MPD because I would like to have a multiroom solution with Squeezelite and also with Shairport.

Thank you.

PS : I use Volume 1.5 and my DAC is Atoll DAC100 connected by USB. I have an other Pi and I use Volumio with Hifiberry.

I have tried something. For the moment, it works but I know that the way I have made it is not clean.

So, I have made some tests. When I stopped shairport and squeezelite and relaunch them, it worked.

I have deleted the automatic execution of squeezelite at the boot and at this place, I have putted the shairport script and made a modification in the script to launch squeezelite.

First, log in by using root/volumio

So, to remove squeezelite from the boot

update-rc.d -f squeezelite remove

Because I want to use Shairport, I launch it on the boot

update-rc.d shairport defaults

I have also added one line in the shairport script. So open the shairport script,

nano /etc/init.d/shairport

And write it like this. You can see that I just call Squeezelite at the boot and close it when shutting down.

#! /bin/sh
# /etc/init.d/shairport
#
### BEGIN INIT INFO
# Provides:          shairport
# Required-Start:    alsa-utils hostname avahi
# Required-Stop:     alsa-utils hostname avahi
# Short-Description: shairport - Airtunes emulator!
# Description:       Airtunes emulator!
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
NAME=""
case "$1" in
  start)
    /usr/local/bin/shairport -d -a "$NAME" -w -B "mpc stop"
    sudo /etc/init.d/squeezelite start
    ;;
  stop)
    sudo /etc/init.d/squeezelite stop
    killall shairport
    ;;
  *)
    echo "Usage: /etc/init.d/shairport {start|stop}"
    exit 1
    ;;
esac

exit 0

By this way, when MDP wants to work, it stops squeezelite and also shairport. I think it work like this so that there are no collisions between MDP and shairport ?

You can also try to stop squeezelite and shairport. You don’t have to stop squeezelite separately because it is included in shairport now.

nano /etc/init.d/shairport stop

And finally try to relaunch shairport. It will also launch squeezelite

nano /etc/init.d/shairport start

A final reboot and in my case it works. I hope it could help some people.

If someone has some advices they are welcome because I am very bad in coding and I am not very sure about what I have done.

Just a quick remark:
Shairport is launched by player_wrk.php . If you’re adding to the init.d scripts you’re probably launching it with a fixed alsa device… You should edit the lines you want there…

If alsa device is fixed, I have to reboot to apply modifications (USB -> HifiBerry for example) ? Is that right ?

I have found this.

// Start Shairport with Volumio name, stopping Mpd on start, with Selected output device
playerSession('open',$db);
$hostname = $_SESSION['hostname'];
$cmd = '/usr/local/bin/shairport -a "'.$hostname.'" -w -B "mpc stop" -o alsa -- -d plughw:'.$device.' > /dev/null 2>&1 &';
sysCmd($cmd);
} 

I am not very familiar with coding and, if a reset the init.d scripts, what do I have to modify so that Squeezelite launch on boot ? I think I have to create a new $cmd1 with something like $cmd1=’/etc/init.d/squeezelite -a’ but I don’t really know if I have to add other things or if it is absolutely not correct.