Is there an option of streaming audio via bluetooth to mopidy

I’m running mopidy on a Raspberry Pi 3. Since It comes with bluetooth I was wondering if there is an option of streaming audio from another device to the mopidy running device, which is my RPI.

After a quick search I found Mopidy Bluetooth Manager which seems to only enable the use of bluetooth remote controls. Futhermore it does not seem to be actively developed anymore.

Are there maybe any other tools for Raspberry which provide this feature or is there any other possible solution of how to solve this?

If you want to stream audio to your raspberry pi, does it make sense to involve mopidy? I don’t understand where mopidy would come in.

okay… I see, this might be more a question for the official raspberry-pi forum.

Was just hoping there might be another backend extension which could take care of this. I’m still kinda new to mopidy and still overwhelmed by all its features. Thanks for your reply

Afraid not, it doesn’t really fit in. And Yeh, I think you’ll have more luck on their forum.

if you have root on your phone you can route your audio to a upnp server. In that case you can use Mopid+UpmpdCli (upnp server implementation) to play your audio from your phone to your rp.

Otherwise, you need to use bluez or similar bluetooth daemons. I use it here in fact I have multiple bluetooth adapters on my pc and each is connected to separate devices.

I am successfully streaming BT to an RPi2 b+, https://support.hifiberry.com/hc/en-us/requests/7052. Be prepared for some experimentation.

Good luck, AJ

Hey thanks for your reply, sadly I cannot open your link! Could you double check and provide a correct one? Sounds promising :wink:

Yep, the link works differently on smartphones and computer web browsers. Using chrome on pc, then the link works as long as one is logged into Hifiberries support pages.

Anyway, check out bt-speaker github repo. I Managed to get it up and running in no time. Using RPi 2 b+ with Digitus dongle and Hifiberry DAC+. Observe that, for now, dtparam=audio=on in /boot/config.txt must be active in order to be able to connect over BT. This means that asound.conf must be adjusted accordingly (depends on the output from aplay -l).

Hope it helps,
AJ

Sorry for digging up an old thread but adding bluetooth support would make sense if you have a portable device. If your speaker is not connected to the internet or a phone’s hotspot, you can still play music via bluetooth. If you are at home and the pi can reach the wifi again, you can use the full set of features

1 Like

If you want to stream audio from your Bluetooth device (e.g. your phone) to a Raspberry Pi you are better off doing so entirely outside of Mopidy using bluez-alsa or Pulseaudio. Somehow streaming the actual audio through Mopidy still doesn’t seem useful to me (and certainly not easy to accomplish either).

I can see how you might want to integrate playback control of that external Bluetooth audio stream into your client. You could design your client to let you seamlessly switch between various audio sources (e.g. between Mopidy and Bluetooth). That’s similar to what the PiMusicbox project aims to provide (but with Airplay rather than Bluetooth since PiMusicbox still doesn’t support Bluetooth), and that’s done outside of Mopidy.

I really like the idea.

In essence it would be cool if you could select bluetooth as a playback source. That would allow other devices to use the server as a speaker, while still being able to play and stream normally. When no bluetooth device is connected.

I also do not understand what the point would be in this… As pointed out already, Raspbian (on which you would have to run mopidy) already supports bluetooth audio streaming in itsefl. So what you would be the point in having it a second time in mopidy some how?

I totally agree with @danielsteiner and @BrainStone point of view : we need bluetooth streaming support in mopidy !!!

I run mopidy on a rpi0 + pirate audio line-out + pionneer amp from the 70’s, and, as a new element of the hifi system, it make sense for me to make mopidy able to use an other source that would be bluetooth: one device and one software to rule all the use cases !

Let’s imagine, i’m partying at home with some friends and playing music from my subsonic server. You know that in EVERY single party, there’s always a guy asking “Can i put a song ?”. Yes, sure, let me select “Bluetooth source” on Mopidy and then, connect to Mopidy headset.

If i find some time, i will try to hack a plugin to do that, for example by switching to another audio sink…

I’m also missing this functionality, exactly as @GraldC described. I’d try to implement something via this as a plugin:

Maybe a little off topic, but related to bluetooth audio. From Mopidy point of view it would be useful t have a plugin that will allow controlling of the connected audio source (so Mopidy is the sink, audio renderer). It is possible with AVRCP and bluez exposes this feature trough dbus. This plugin could allow to browse music on the source device, choose what to play, control playback (play, pause, next/prev), display what is currently played and especially control volume (so called absolute volume) so there is single (global, absolute) volume knob - the volume could be also controlled from the source device and this will cause volume adjustment on the mopidy side.

I could imagine the use case for that:
Connecting the phone trough bluetooth to mopidy which acts as a smart amplifier that has its own gui. Then the phone can be put aside and the control would continue on the mopidy gui.

The only way I could see this work is having some sort of server exposing files currently on your device, allowing to control playback, and streaming audio back. I know of one piece of software that does this kind of things. Maybe you could install it on your device :smiley:

This also seems to be an interesting track to tackle this problem.

Maybe I expressed myself note clearly. All of the features I described are already supported by bluetooth and its avrcp protocol. For example https://youtu.be/YhjNE1ZrGNI. Those bluetooth features are handled by bluez already and exposed through dbus. So the only thing to do is to implement mopidy plugin that talks to dbus and handles all of those dbus api.

Oh ok I initially only found out about playback control. Thankfully Wikipedia can give some clear specifications.

So indeed I guess some sort of proxy extension could be doable.

So the only thing to do is to implement mopidy plugin that talks to dbus and handles all of those dbus api.

I guess you also need some way for mopidy to get the bluetooth audio stream.

Not necessairly but it could be also done like here GitHub - lukasjapan/bt-speaker: A simple Bluetooth Speaker Daemon for the Raspberry Pi 3. The simpler approach would be to let the audio be handled Independently by some other software like bluez-alsa or pulseaudio because the audio is transmitted with different protocol (a2dp). Avrcp is only for control and metadata.