[PLUGIN] Squeezelite MC

-- Logs begin at Sat 2024-01-20 14:50:17 EST. --
Jan 22 00:42:14 galaxy systemd[20968]: squeezelite.service: Failed at step EXEC spawning /opt/squeezelite/squeezelite: No such file or directory
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Main process exited, code=exited, status=203/EXEC
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Failed with result 'exit-code'.
Jan 22 00:42:14 galaxy systemd[1]: Failed to start Squeezelite lightweight headless Squeezebox emulator.
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Service RestartSec=100ms expired, scheduling restart.
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Scheduled restart job, restart counter is at 5.
Jan 22 00:42:14 galaxy systemd[1]: Stopped Squeezelite lightweight headless Squeezebox emulator.
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Start request repeated too quickly.
Jan 22 00:42:14 galaxy systemd[1]: squeezelite.service: Failed with result 'exit-code'.
Jan 22 00:42:14 galaxy systemd[1]: Failed to start Squeezelite lightweight headless Squeezebox emulator.
cat: /tmp/squeezelite.log: No such file or directory

This is very odd. The install log shows no errors, which means the Squeezelite binary has been installed (/opt/squeezelite/squeezelite). But then systemd complains that there is no such file when it tries to execute it.

Can you do the following:

$ cd /data/plugins/music_service/squeezelite_mc/
$ sudo bash install.sh

Last command should ask you for root password, which is volumio

Then try starting the plugin again.

1 Like

Thanks very much, I ran this:

volumio@galaxy:/data/plugins/music_service/squeezelite_mc$ sudo bash install.sh
[sudo] password for volumio: 
Installing Squeezelite binary...
Squeezelite MC installed
plugininstallend

But the plugin still won’t start:

I also then restarted this unit just to see if that changed anything, but it did not.

First, let’s check if the binary is in fact not installed:

$ ls /opt/squeezelite/squeezelite

Do you get ‘No such file or directory’ error?

Then, force install the binary (essentially what the install script does):

$ export PLUGIN_PATH="/data/plugins/music_service/squeezelite_mc"
$ export SQUEEZELITE_BIN_PATH="/opt/squeezelite"
$ export ARCHIVE="squeezelite-1.9.9.1428-aarch64.tar.gz"

$ sudo mkdir -p $SQUEEZELITE_BIN_PATH

$ sudo tar xzf "${PLUGIN_PATH}/bin/${ARCHIVE}" -C $SQUEEZELITE_BIN_PATH
$ sudo chown volumio:volumio ${SQUEEZELITE_BIN_PATH}/squeezelite
$ sudo chmod 755 ${SQUEEZELITE_BIN_PATH}/squeezelite

Finally, start Squeezelite through command line:

$ /opt/squeezelite/squeezelite

Do you spot any errors here? If you don’t, see if the player appears in LMS.

If you are able to connect to the player in LMS, you can reboot your Volumio device and see if the plugin starts normally.

No such error:

volumio@galaxy:~$ ls /opt/squeezelite/squeezelite
/opt/squeezelite/squeezelite

The error occurs here:

volumio@galaxy:~$ sudo tar xzf "${PLUGIN_PATH}/bin/${ARCHIVE}" -C $SQUEEZELITE_BIN_PATH
tar (child):  /data/plugins/music_service/squeezelite_mc/bin/: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Just for kicks I then tried to start it from the command line and that did of course fail:

volumio@galaxy:~$ /opt/squeezelite/squeezelite
-bash: /opt/squeezelite/squeezelite: No such file or directory

Installation on RPi 5 fixed in v1.0.4, now available in beta channel of plugin store.

Thanks to @MikeyFresh for helping to test this.

2 Likes

My pleasure, thanks very much for working on this fix for RPi 5 users.

Hi Patrick,
first of all thank you for this great work in providing this plugin for us.
I have a little problem with the persistance of a specific setting in the plugin.
I am using it on a x86 box (partyVolumio) in our partyroom where volumio is not allways on. Squeezelite MC is controlled via squeezelit x on a windows laptop pulling the music from an LMS on NAS. This works so far pretty good with a little problem.
In the audio settings of the player it jumps allways back to “volume is set to 100%” so you don’t see volume controlls in the controller. I have to change and save it back after every restart.
I tried to save the settings on LMS and on the squeezelite x but it goes back to volume 100% after the restart of the the partyVolumio.
Maybe you can give me a hint on how I can make this setting permanent.
Sorry for my bad english, i hope I was able to expalaint the problem correct.
Regards
Peer

In plugin settings, disable “Configure LMS to disable audio fade on pause / resume” However, you should not disable this if you play DSDs.

Hi Patrik,
somtimes things are very easy.
Worked for me…
Thank’s a lot
Greetings Peer

Hi Patrick,
I just realized Squeezelite MC plugin fails to activate when USB output device (DAC) cannot be found after a restart (Rivo). Any ideas why this is so and if it can be fixed? It caused me some panic since by coincidence I upgraded to Volumio latest release with the DAC switched off and I thought there was a problem with the plugin on 3.626. Thanks.

Try Manual startup mode and apply the -r option. Per Squeezelite manpage:

-r <rates>[:<delay>]
    Specify sample rates supported by the output device; this is required
    if the output device is switched off when squeezelite is started.
    The format either a single maximum sample rate, a range of sample
    rates in the format <min>-<max>, or a comma-separated list of
    available rates. Delay is an optional time to wait when switching sample
    rates between tracks, in milliseconds. 

Steps:

  1. Ensure your USB DAC is switched on and Squeezelite MC plugin activated.
  2. In plugin settings, click the “Switch to Manual Mode” button.
  3. Copy and paste the line under “Suggested” to “Startup Options”, and add -r <rates> after it, where the value of <rates> depends on your DAC. For example, I have the following for Startup Options:
-o squeezelite -C 1 -n "volumio-pi4" -D 3:u32be -f /tmp/squeezelite.log -r 384000
  1. Save settings. Try rebooting with your DAC switched off.

Thanks, Patrick

Hi Patrick

Thanks for your plugin.
When I listen radio via lms, there is no song title, covertart, etc update on Volumio.
It’s ok just for the first song…

Dodusman

It’s working fine here, so maybe some details like LMS version, plugin version and logs would be useful.

LMS version is 8.5.1
Plugin version is 1.04

log :

info: [squeezelite_mc] #pushState(): {"status":"play","service":"squeezelite_mc","title":"Todolollevo","artist":"Tuzeint","album":"Raixes (Roots)","albumart":"http://192.168.1.248:44739/?server_name=Musique+LMS&url=http%3A%2F%2F192.168.1.251%3A9000%2Fimageproxy%2Fhttps%253A%252F%252Fwww.radiofrance.fr%252Fs3%252Fcruiser-production%252F2023%252F03%252F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%252F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg%2Fimage.jpg&fallback=http%3A%2F%2F192.168.1.248%2Falbumart","uri":"","trackType":"aac","seek":80077,"duration":207,"samplerate":"270Kbps CBR","isStreaming":false,"volume":100,"repeat":true,"repeatSingle":false,"random":false}
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: [squeezelite_mc] Proxy request for Musique LMS, URL: http://192.168.1.251:9000/imageproxy/https%3A%2F%2Fwww.radiofrance.fr%2Fs3%2Fcruiser-production%2F2023%2F03%2F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%2F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg/image.jpg
error: [squeezelite_mc] Proxy: invalid URL (http%3A%2F%2F192.168.1.251%3A9000%2Fimageproxy%2Fhttps%253A%252F%252Fwww.radiofrance.fr%252Fs3%252Fcruiser-production%252F2023%252F03%252F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%252F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg%2Fimage.jpg)
info: [squeezelite_mc] Proxy request for Musique LMS, URL: http://192.168.1.251:9000/imageproxy/https%3A%2F%2Fwww.radiofrance.fr%2Fs3%2Fcruiser-production%2F2023%2F03%2F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%2F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg/image.jpg
[2024/04/29 09:17:56.336976,  0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.248 for name WORKGROUP<1d>.
  This response was from IP 192.168.1.251, reporting an IP address of 192.168.1.251.
info: CoreCommandRouter::volumioRandom
info: CoreCommandRouter::writePlayerControls
info: CoreStateMachine::setRepeat true single true
info: CoreCommandRouter::volumioGetState
info: [squeezelite_mc] #pushState(): {"status":"play","service":"squeezelite_mc","title":"Todolollevo","artist":"Tuzeint","album":"Raixes (Roots)","albumart":"http://192.168.1.248:44739/?server_name=Musique+LMS&url=http%3A%2F%2F192.168.1.251%3A9000%2Fimageproxy%2Fhttps%253A%252F%252Fwww.radiofrance.fr%252Fs3%252Fcruiser-production%252F2023%252F03%252F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%252F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg%2Fimage.jpg&fallback=http%3A%2F%2F192.168.1.248%2Falbumart","uri":"","trackType":"aac","seek":82489,"duration":207,"samplerate":"270Kbps CBR","isStreaming":false,"volume":100,"repeat":true,"repeatSingle":true,"random":false}
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::volumioGetState
info: CoreCommandRouter::volumioGetState
info: [squeezelite_mc] #pushState(): {"status":"play","service":"squeezelite_mc","title":"Todolollevo","artist":"Tuzeint","album":"Raixes (Roots)","albumart":"http://192.168.1.248:44739/?server_name=Musique+LMS&url=http%3A%2F%2F192.168.1.251%3A9000%2Fimageproxy%2Fhttps%253A%252F%252Fwww.radiofrance.fr%252Fs3%252Fcruiser-production%252F2023%252F03%252F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%252F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg%2Fimage.jpg&fallback=http%3A%2F%2F192.168.1.248%2Falbumart","uri":"","trackType":"aac","seek":83091,"duration":207,"samplerate":"270Kbps CBR","isStreaming":false,"volume":100,"repeat":true,"repeatSingle":true,"random":false}
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState
info: CoreCommandRouter::volumioRandom
info: CoreCommandRouter::writePlayerControls
info: CoreStateMachine::setRepeat false single false
info: CoreCommandRouter::volumioGetState
info: [squeezelite_mc] #pushState(): {"status":"play","service":"squeezelite_mc","title":"Todolollevo","artist":"Tuzeint","album":"Raixes (Roots)","albumart":"http://192.168.1.248:44739/?server_name=Musique+LMS&url=http%3A%2F%2F192.168.1.251%3A9000%2Fimageproxy%2Fhttps%253A%252F%252Fwww.radiofrance.fr%252Fs3%252Fcruiser-production%252F2023%252F03%252F32cdf109-a85d-40eb-ac7c-4d0c88c8bb27%252F200x200_sc_rf_omm_0003204658_dnc.0134730351.jpg%2Fimage.jpg&fallback=http%3A%2F%2F192.168.1.248%2Falbumart","uri":"","trackType":"aac","seek":83707,"duration":207,"samplerate":"270Kbps CBR","isStreaming":false,"volume":100,"repeat":false,"repeatSingle":false,"random":false}
info: CoreCommandRouter::servicePushState
info: CoreStateMachine::pushState
info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , saveDeviceInfo
info: CoreCommandRouter::volumioPushState

thanks

I do not see anything unusual from the logs. So when you go to http://<your volumio address>/dev, does the player state match the one reported in the logs after #pushState():...? Also, do you see the image when you go to the albumart URL directly?

To have push state I need to clic on repeat or random, then song update.
Capture d’écran 2024-04-30 à 04.48.40

I have this message in log :

info: CoreCommandRouter::volumioPushState
[2024/04/30 05:41:22.827317, 0] …/source3/nmbd/nmbd_namequery.c:109(query_name_response)
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.248 for name WORKGROUP<1d>.
This response was from IP 192.168.1.251, reporting an IP address of 192.168.1.251.

Thanks