Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Spotify connect keeps dropping
#15
(11-28-2018, 05:20 AM)@Tim Curtis Wrote: moOde is a great way to learn some Linux SSH :-)

Open System config and turn on the SSH term server. Then OPEN it and enter userid = pi and password = moodeaudio.

Then follow my instructions in post #11

Very funny Tim! Smile Angry Cry

Yes, moOde indeed forces one to learn Linux... 

My issue is that librespot dont reconnect. It's not a local network issue, as it happens on different locations. And its quite random, restarting librespot fixes the issue instantly - but quite annoying to do so.

Have you seen this thread on librespot repo? 
https://github.com/librespot-org/librespot/issues/134
The random stop working issue is a known issue, and they(devs) have a hard time getting it solved.

A user came up with a "fix"
.. Its not really a fix; just a bandaid.

https://github.com/librespot-org/libresp...-441499150
Quote:
Quote:Is there any way to mitigate this problem?
Is it possible to somehow detect that it disconnected and restart it manually (using some shell script)?
This doesn't address the cause but aids with the symptoms:
https://gist.github.com/JeremieRapin/bc3...503270df16

Script to be run as a cronjob every minute which checks the status and restarts the service if an error is spotted.

Code:
#!/bin/sh



# Add the following line in /etc/crontab

# * * * * * root /home/pi/watchdog.sh

#



status=$(sudo systemctl status raspotify | grep -E "(WARN|ERROR|101)")



if [ ! -z "$status" ]; then

    sudo systemctl restart raspotify

fi

systemctl dont show the status of librespot, as its run as part of rc-local.service in moOde. 
"systemctl status librespot" shows = "Unit librespot.service could not be found."

I dont have the faintest idea of how to get systemctl to show the status of librespot Sad 

systemctl status rc-local:
Code:
pi@radio:~ $ sudo systemctl status rc-local                                                                                                                                                                                
● rc-local.service - /etc/rc.local Compatibility
  Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)                                                                                                                                  
 Drop-In: /lib/systemd/system/rc-local.service.d                                                                                                                                                                          
          └─debian.conf                                                                                                                                                                                                  
       /etc/systemd/system/rc-local.service.d                                                                                                                                                                            
          └─ttyoutput.conf                                                                                                                                                                                                
  Active: active (running) since Wed 2018-11-28 09:14:49 CET; 21min ago
 Process: 466 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)                                                                                                                                              
  CGroup: /system.slice/rc-local.service                                                                                                                                                                                  
          ├─ 479 /usr/bin/udisks-glue                                                                                                                                                                                    
          ├─ 514 /usr/bin/php /var/www/command/worker.php                                                                                                                                                                
          ├─ 812 sudo /usr/local/bin/shairport-sync -a Moode Airplay -S soxr -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh -- -d hw:0                                                    
          ├─ 821 /usr/local/bin/shairport-sync -a Moode Airplay -S soxr -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh -- -d hw:0                                                          
          ├─ 831 sudo librespot --name Moode Spotify --bitrate 320 --initial-volume 92 --cache /var/local/www/spotify_cache --backend alsa --device default:CARD=sndallodigione --onevent /var/local/www/commandw/spoteven
          ├─ 839 librespot --name Moode Spotify --bitrate 320 --initial-volume 92 --cache /var/local/www/spotify_cache --backend alsa --device default:CARD=sndallodigione --onevent /var/local/www/commandw/spotevent.sh
          ├─1014 /bin/bash /var/www/command/watchdog.sh                                                                                                                                                                  
          └─5370 sleep 6                                          
and pgrep:

Code:
pi@radio:~ $ pgrep -l librespot
839 librespot
I cant recall what it shows with its not working
( I will update when it occurs again)

So this fix doesnt work out of the box when using moOde Sad

Any help?
Reply


Messages In This Thread
Spotify connect keeps dropping - by PhotonHerder - 11-24-2018, 10:12 PM
RE: Spotify connect keeps dropping - by jonners - 11-25-2018, 09:40 PM
RE: Spotify connect keeps dropping - by zaqqq - 11-25-2018, 01:13 PM
RE: Spotify connect keeps dropping - by zaqqq - 11-25-2018, 02:07 PM
RE: Spotify connect keeps dropping - by ksone - 11-28-2018, 08:42 AM
RE: Spotify connect keeps dropping - by ksone - 12-05-2018, 09:28 PM
RE: Spotify connect keeps dropping - by ksone - 12-06-2018, 07:55 AM
RE: Spotify connect keeps dropping - by ksone - 12-06-2018, 01:43 PM
RE: Spotify connect keeps dropping - by adixor - 03-22-2019, 08:11 PM
RE: Spotify connect keeps dropping - by Edward - 03-31-2019, 06:25 PM
RE: Spotify connect keeps dropping - by ksone - 04-01-2019, 12:10 PM
RE: Spotify connect keeps dropping - by deafnut - 04-13-2019, 08:55 PM
RE: Spotify connect keeps dropping - by deafnut - 04-17-2019, 08:49 PM
RE: Spotify connect keeps dropping - by deafnut - 04-19-2019, 12:01 AM
RE: Spotify connect keeps dropping - by ksone - 04-22-2019, 08:32 AM
RE: Spotify connect keeps dropping - by oboote - 12-03-2019, 11:47 PM
RE: Spotify connect keeps dropping - by oboote - 12-06-2019, 03:04 AM

Forum Jump: