Connect Mopidy to bluetooth speaker on Raspberry Pi
In this tutorial i'm going to teach how to connect Mopidy to bluetooth speaker on Raspberry Pi. We are using PulseAudio to connect bluetooth speaker to Raspberry and then configure Mopidy to use that sink.
1. In order to this tutorial to work, you have to complete Connecting bluetooth audio device to Raspberry Pi -tutorial first. In that tutorial we installing PulseAudio and connecting your bluetooth speaker to Raspberry Pi, and in this tutorial we are making Mopidy to use that sink.
2. Open terminal locally or remotely (Learn how) and run this command to edit PulseAudio config:
sudo nano /etc/pulse/default.pa
3. Find the line that contains "native-protocol-tcp" text. If you are using Nano, you can search text by pressing [Ctrl] + W from your keyboard. Uncomment that line and make it look like in the below. When you have made the changes, press [Ctrl] + X then Y and then [Enter].
### Network access (may be configured with paprefs, so leave this commented ### here if you plan to use paprefs) #load-module module-esound-protocol-tcp load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 #load-module module-zeroconf-publish
4. Next we need to edit Mopidy config: sudo nano /etc/mopidy/mopidy.conf.
5. Change the audio output like in the example below and save your mopidy.conf.
[audio] output = pulsesink server=127.0.0.1
6. And for the last steps, we need to restart PulseAudio process and you can do it by running these two commands.
7. Play music from Mopidy and you should get music from your bluetooth speaker.