Skip Navigation

Snapcast integration in Home Assistant + Snapdroid - clarification needed

I ran across this post on the Home Assistant forum, which shows something very similar to what I want to achieve. However, there is something that is unclear to me: with Snapdroid, will I able to stream all audio from my Android device to the Snapcast server so that it doesn't matter which app I use, or is this just some control device? I couldn't make that clearly out from the GitHub repo of Snapdroid.

My desired use case is to use this in the same way I would with AirPlay on an iPhone, and be able to use my music player connected to my Jellyfin server, my podcast application or my YouTube frontend application to play audio that is cast to the Snapcast server.

14
14 comments
  • I am of no help, but you've opened yet another rabbit hole for me to plunge into.

    • Hehe, and for that I apologize! In case you are interested, here are the options I am so far considering. Still very much in the research phase, trying to figure out my specs before I buy any gear I don't already have. I am not very experienced with this, so feel free to point out any baloney in the below text. Anything that could spare me time researching dead ends is gratefully received.

      Option 1: Snapcast

      Since I will be running a Raspberry Pi 4 with Home Assistant anyway (not yet set up properly), I would like to make use of the Snapcast integration in HA to run the Snapcast server and then set up a Raspberry Pi Zero W (with some 3.5mm extension) with all speakers I want to connect. Ideally these Zeros could be powered by the speaker themselves (through USB for example) to avoid two plugs, but I don't know how realistic it is to achieve this, and I have not done much research into this yet.

      The issue that I so far have is that I don't know how I can stream audio from my Android device to the Snapcast server. From my understanding, and what I hoped to clarify with this thread, is that it requires a specific audio source that the Snapcast can recieve audio from. Here is a list. This seems to my limited experience much more doable from my laptop running Linux than from my Android device. But I don't know...

      Currently I will be investigating whether I can use audio streaming in scrcpy to stream audio to the Pi, and then route that via PulseAudio to Snapcast. I don't know yet if this is a really cool idea or an incredibly stupid idea. I want to setup scrcpy for another purpose anyway, so why not try? :) It might introduce additional latency from my device to the speakers, but as this happens before the "distribution" from the server to the clients, I don't think this would affect the synchronization. Also, I will never use this to speak on the phone with anyone, so that there is some latency doesn't really matter to me. The biggest issue would be toggling this off and on - maybe via a remote command with KDE Connect or something like that. If I could set that up as a custom tile in the quick access menu in Android, that might work.

      All in all it seems a bit too convoluted though, so I don't have too much faith in this.

      Option 2: balenaSound

      So this is the solution I first learned about as an alternative to Sonos, but I was turned off by the need to connect my devices via the internet to the balenaCloud hosted by the developers. However, either I missed this in the first round of research, or they have released it since, but OpenBalena exists which has much of the functionality of balenaCloud (but not all) and can be self-hosted. If I could get the server to run on my Raspberry Pi 4, and then flash balenaOS onto each Pi Zero W, this could provide what I want as I understand that it allows to stream audio directly to the Zero Ws via Bluetooth (with subsequent sync to the OpenBalena server via WiFi). It would be a much simpler solution than the one above, especially in terms of toggling it on and off on my Android device.

      A downside to this solution though, is that I believe I would not be able to install it on a Pi running Home Assistant OS (correct me if I am wrong), and that running HA through Docker makes installing new integrations a bit more cumbersome? Maybe that will pose no problem, as I don't plan on using too many integrations anyway (Zigbee, Netatmo and a MQTT broker). I could perhaps also run a VM that runs Home Assistant OS?

      • Wow, thanks for the detailed information! Hopefully you can get some direction that helps with your solution. For me, it's starting to sound like OpenBalena might work. I've got an old PC running Proxmox for my services with HAOS in a VM and working great. If you go with that, you'll just have to configure USB pass through for a ZigBee receiver and any other hardware.

      • Just came across this device while rooting around for HA compatible solutions. Looks to be have lots of connectivity options. Might be a potential less wired option for your setup

        Have also seen Volumio mentioned a couple times.

  • Android App is just for controlling

You've viewed 14 comments.