-
Notifications
You must be signed in to change notification settings - Fork 0
Install music player
In order for the Pi to play some music via the audio jack, we need a music player. I used mopidy, installation instructions can be found on: https://docs.mopidy.com/en/latest/installation/raspberrypi/
The newest mopidy uses Python3
in short:
- install mopidy
- alter config, force audio to jack (alsa)
sudo systemctl enable mopidy
- install mopidy-mpd
- install python3
- install python3-pip
Mopidy requires extensions, backend and frontend (https://mopidy.com/ext/). I installed the spotify backend and the Mopidy-Musicbox-Webclient frontend. After installing the spotify backend it must also be configured. This can be found on the extension page.
To make the spotify extension work, some extra stuff has to be done: https://pyspotify.readthedocs.io/en/latest/installation/
and:
sudo apt-get install libspotify12
Mopidy will, by default, only be accessible on localhost(:6680). Since it won't be accessible from outside, I tunneled to my Pi and forwarded port 6680
ssh pi@host -L 6680:localhost:6680
You can use the web client to test sound and to control the volume.
Only one client_id and secret can be active through the mopidy proxy. If you have multiple jukeboxes, make sure to copy the client_id and secret.