12-13-2018, 05:51 PM
Hello, thanks for all your work on this project.
I am running Moode 4.4 on a Pi 3 B+ with HiFiBerry DAC+. The network connection is wifi but the following problem has been observed on a wired connection.
I can use Moode as a Spotify Connect device for a while, but then it disappears from the devices list on the Spotify app. I know many other people have reported similar problems and I have read through the forum posts. However, many posts say that the problem is due to an audio cache filling up the disk, and that this will be fixed in 4.4. My problem is still occurring on 4.4, and df reports many GB of free space. I have Spotify Premium and have enabled Spotify in the Moode web UI settings.
I am using the MacOS Spotify app. Moode appears in the devices list (which shows a blue dot indicating the presence of Spotify Connect devices), I can select Moode and listen to music. But at some point the sound stops, and Moode has disappeared from that devices list. At this point running pgrep on the Pi shows no librespot process running. I can use the Moode web UI to restart the Spotify service, at which point Moode immediately reappears in the Spotify MacOS app. If I select Moode as the connect device in the Spotify app, Moode again disappears from that app, and again running pgrep on the Pi shows no librespot process running.
I eventually tried changing the name of the Spotify Connect service via the Moode web UI, and bizarrely as soon as I changed the name, when I restarted Spotify via the Moode web UI, Spotify Connect was then useable for quite a while. But eventually the same problem returned - trying to use the Moode Spotify Connect device would cause the process to crash silently.
I have grepped /var/log and can barely find any references to librespot in the logs. In auth.log I see the commands where sudo is used to killall librespot and restart librespot with all my chosen settings.
auth.logec 13 22:45:03 moode sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/killall librespot
auth.logec 13 22:45:03 moode sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/bin/librespot --name moode --bitrate 320 --initial-volume 0 --linear-volume --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device plughw:0 --onevent /var/local/www/commandw/spotevent.sh
Here's where it gets really interesting. If I SSH into the Pi and run those exact same librespot commands manually on the command line, I can see the console output from librespot interacting with the Spotify MacOS app and _it doesn't crash_. I can listen to music for hours with no problem. This works both with the command shown in auth.log as well as a simplified command where I specify only --name and --linear-volume and don't run under sudo (run as the pi user).
After successfully using librespot on the command line, I restarted the Spotify service via the web UI it continued to work well for quite a while, even after a reboot of the Pi.
I have no idea which of the above actions, if any, actually caused librespot to work or fail. But behavior was noticeably different at different times, varying from complete stability to instant crash. Of course this could have been due to other external factors but renaming the Connect device and running on the command line seemed to have an immediate effect.
Here is some output from sysinfo.sh:
A U D I O P A R A M E T E R S
Audio device = HiFiBerry DAC+
Interface = I2S
Hdwr volume = Controller detected
Mixer name = Digital
Output stream = S16_LE / 44100
ALSA version = 1.1.3-5+rpi3
SoX version = 0.1.2-2
S P O T I F Y S E T T I N G S
Friendly name = moode
ALSA device = default:CARD=sndrpihifiberry
Resume MPD = No
Bit rate = 320
Initial volume = 0
Volume curve = Linear
Volume normalization = No
Normalization pregain = 0
I hope this information might help understand the problem, let me know if you need any other information.
I am running Moode 4.4 on a Pi 3 B+ with HiFiBerry DAC+. The network connection is wifi but the following problem has been observed on a wired connection.
I can use Moode as a Spotify Connect device for a while, but then it disappears from the devices list on the Spotify app. I know many other people have reported similar problems and I have read through the forum posts. However, many posts say that the problem is due to an audio cache filling up the disk, and that this will be fixed in 4.4. My problem is still occurring on 4.4, and df reports many GB of free space. I have Spotify Premium and have enabled Spotify in the Moode web UI settings.
I am using the MacOS Spotify app. Moode appears in the devices list (which shows a blue dot indicating the presence of Spotify Connect devices), I can select Moode and listen to music. But at some point the sound stops, and Moode has disappeared from that devices list. At this point running pgrep on the Pi shows no librespot process running. I can use the Moode web UI to restart the Spotify service, at which point Moode immediately reappears in the Spotify MacOS app. If I select Moode as the connect device in the Spotify app, Moode again disappears from that app, and again running pgrep on the Pi shows no librespot process running.
I eventually tried changing the name of the Spotify Connect service via the Moode web UI, and bizarrely as soon as I changed the name, when I restarted Spotify via the Moode web UI, Spotify Connect was then useable for quite a while. But eventually the same problem returned - trying to use the Moode Spotify Connect device would cause the process to crash silently.
I have grepped /var/log and can barely find any references to librespot in the logs. In auth.log I see the commands where sudo is used to killall librespot and restart librespot with all my chosen settings.
auth.logec 13 22:45:03 moode sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/killall librespot
auth.logec 13 22:45:03 moode sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/bin/librespot --name moode --bitrate 320 --initial-volume 0 --linear-volume --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device plughw:0 --onevent /var/local/www/commandw/spotevent.sh
Here's where it gets really interesting. If I SSH into the Pi and run those exact same librespot commands manually on the command line, I can see the console output from librespot interacting with the Spotify MacOS app and _it doesn't crash_. I can listen to music for hours with no problem. This works both with the command shown in auth.log as well as a simplified command where I specify only --name and --linear-volume and don't run under sudo (run as the pi user).
After successfully using librespot on the command line, I restarted the Spotify service via the web UI it continued to work well for quite a while, even after a reboot of the Pi.
I have no idea which of the above actions, if any, actually caused librespot to work or fail. But behavior was noticeably different at different times, varying from complete stability to instant crash. Of course this could have been due to other external factors but renaming the Connect device and running on the command line seemed to have an immediate effect.
Here is some output from sysinfo.sh:
A U D I O P A R A M E T E R S
Audio device = HiFiBerry DAC+
Interface = I2S
Hdwr volume = Controller detected
Mixer name = Digital
Output stream = S16_LE / 44100
ALSA version = 1.1.3-5+rpi3
SoX version = 0.1.2-2
S P O T I F Y S E T T I N G S
Friendly name = moode
ALSA device = default:CARD=sndrpihifiberry
Resume MPD = No
Bit rate = 320
Initial volume = 0
Volume curve = Linear
Volume normalization = No
Normalization pregain = 0
I hope this information might help understand the problem, let me know if you need any other information.