I have had 2 Raspberry Pi (1 Pi0 & 1 A+) working with PiMusicbox for a year or so, over the past week I have set up another Raspberry Pi (B+) with Mopidy which I have also set up as a wifi repeater.
When I came to use the original Pi’s there were no Spotify playlists showing, however on the Mopidy Pi all my playlists showing.
It makes no difference if the Mopidy Pi is running or not, there still are no playlists on the PiMusicbox set up’s.
I have tried using a saved image on a different SD card in case that was the problem.
I have changed WIFI adapter and power supply.
All 3 units are connected to the same network.
I have checked all my start up files in /boot/config/settings.ini on the PiMusicbox they appear to be in order and the same as they were before I had problems.
I’ve run mopidy -v on the PiMusicboxes and the thing that stands out is
“ERROR 2016-10-24 11:53:03,686 [3772:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use”
and after that mopidy starts to stop.
I am baffled as to why I have been able to run 2 Pimusicbox’s simultaneously but adding a Pi with Mopidy installed seems to have changed the whole setup whether the Mopidy Pi is running or not. Any help would be appreciated.
I’ve run mopidy -v on the PiMusicboxes and the thing that stands out is
If you do that while there is already an instance of mopidy running then I think they use the exact same config file so you can fully expect the second instance to fail to bind to the address that’s in use by the first instance.
I’m currently baffled too. Is it the same version of Mopidy on all devices or are you using the old 0.19 version on the PiMusicbox devices? My only guess right now is that it’s actually the classic Spotify playlist issue that is present in v0.19 and the introduction of the 3rd device is pure coincidence.
I wondered if that was the case, thanks for confirming.
On the Mopidy Pi I have the latest Jessie and latest version of Mopidy, on the PiMusicboxes I guess it’s 0.19.
On one of the PiMusicbox I got all the playlists back for a couple of hours last night, but I don’t know how.
On the same PiMusicbox I can play any tracks on the SD and search and play on Spotify.
I don’t know anything about Spotify Playlist problem, do you any more info please, I will check that out next.
I wondered if that was the case, thanks for confirming.
But please note this is only the case on PiMusicbox 0.6 (and earlier). Normally, running mopidy as a system service will use config in /etc/mopidy/mopidy.conf and running mopidy as your user will use config in ~/.config/mopidy/mopidy.confas per the docs. On PiMusicbox I think both locations link to the same file, I think this is an attempt to avoid confusion and help debugging.
As a long time PiMusicbox user I’m quite surprised you’ve not run into the Spotify playlists problem before. If I remember correctly it is dependent on some unexpected behaviour from Spotify’s service so maybe it’s related to your geography or your internet connection or who knows!
The issue was fixed in pyspotify2 which is used in later versions of Mopidy.
I’ve just applied the # fix above and they work perfectly again, thanks so much for pointing me in the right direction.
I had so convinced myself that it must be something to do with the new mopidy pi box and network changes I made that I didn’t really search for anything outside those areas.
That’s one weekend I won’t get back anyway - least I have a working wifi repeater with Mopidy in the kitchen now.
I don’t think the playlists have gone in the past - maybe they did and soon came back again so I didn’t really notice.
It only occurs when mopidy-spotify initially loads the playlists at startup. So if your PiMusicboxes were infrequently rebooted (or were not experiencing any Mopidy crashes and having to automatically restart the process) then you’d be unlikely to run into this.