I’ve installed mopidy on my raspberry pi 3 today with some extensions like Spotify and TuneIn. It works great when I just run it. But once I make Mopidy run as a service, I always get an error from mopidy (status):
Spotify login error: < ErrorType.UNABLE_TO_CONTACT_SERVER: 8>
I tried both ways (SystemD and dkgp). I know the config file gets loaded and the web extention also shows when surfing to the ip adress, but doesn’t show any playlists because spotify doesn’t work. If found some information online, but nothing usefull showed up. I don’t use a proxy.
Thanks for helping!
Just to be sure : you know the config is loaded.
so you know that you need an other config file to run it as a service? service configuration
Does the service run as a root user?
Did you check the service is running? --> service-management-with-systemd
Did you completly reboot the pi?
Yes, I made a configfile in the folder for the service and i get that file with ‘sudo mopidyctl config’
I was running as root to install it and then I did the ‘sudo systemctl enable mopidy’ command. So maybe it’s not running as root?
I did reboot and I used ‘sudo systemctl status mopidy’ to find the error from spotify.
I changed the Deamon user from mopidy to root and now it works! Thanks!
I just have a problem with using the TTSGPIO now. It gives an error but I don’t get why because the user is root?
TTSGPIO: Not enough permission to use GPIO. GPIO input will not work
Sorry for the late reply.
I’m glad the service is working now .
I have never used gpio pins, so I have no idea what the error could be.
Probably rights again. Maybe the service for the gpio pins runs not as root and gives conflicts this way…
Or some python conflict.
Just a while guess.
It does work when you run mopidy manually?
I picked my project up again after some time.
The buttons (with Mopidy TTS-GPIO) do work when i run mopidy manually (only with root), but nog when I’m using SystemD.
So I don’t know how to make the service run as root.
I did already change the daemon user from /init.d/mopidy but still the error that I don’t have enough permission.
Is it the same file used by SystemD or do they use a different file?
Even by editing visudo(giving mopidy the same rights as root) I still can’t make it work.
I found the solution, the user mopidy wasn’t in the group gpio. So to fix this error i just needed to run
sudo adduser mopidy gpio