Cast music to an android phone

Is there any way to use an android phone and play music into it from HA? I do not care if the music is in the same device, or in my network (via UPNP or similar).

I want the phone to act as google home or alexa speaker.

I tried installing BubbleUPnP in the phone, and I can send music from mi computer to the phone, but I do not know how to do it from HA.

Any other options? Thanks

Snapcast might be an option. Although your Android device won’t be comparable to a Chromecast / Alexa, more like a wireless speaker.

Thanks. Is there any tutorial?

I ended with a snapserver installed in docker. in a rpi
Then, the snapcast app installed in the android phone.
Then, I installed mpd server in windows (did not found any raspberry docker image).
Then, a mpd client in android to manage that server

I achieved to control (only volume) the snapcast app from home assistant, but unabe to play music in the phone.

After that, I did not know what more to do so I came here to ask for help again hahaha

You’ll have to ask Google or wait for someone else to reply. Although I’m sure you’ll actually find answers here as well. There are users around here that use Snapcast.

It seems no one does :frowning:

Are you sure about that?

snapcast

@goliath you need MPD and Snapserver set up on the same system (I do not know if they can be in separate docker containers - you need to ask a docker expert how to move audio between containers). The audio output from MPD is piped into snapserver, which then sends it to all it’s clients. If you want the audio to play out on the box running MPD & Snapserver you will also need a Snapclient on there. There are plenty of tutorials available on making native MPD and Snapserver work, even without rune, volumio, mopidy or other third party extensions to MPD. Failing that please see my own notes on snapcast.

Once your audio is being piped from MPD into snapserver, you can run clients across your network. One such client is the Snapcast Android app currently published by Jaggard. Hit the play button at the top right corner of the app interface, and snapclient on the phone will pipe any audio out through the phone speaker.

Thanks @ artmg

As you say, thats exactly what I did and works like a charm!