
Show HN: Multi-room audio with Snapcast and Raspberry Pi - elgfare
https://oyvn.github.io/multi-room-audio-with-snapcast
======
acidburnNSA
I use Snapcast and mopidy on a home server with the iris front end. It
integrates with home assistant so you can have automations play sounds in all
or some rooms.

With covid I've been able to pipe my meetings to snapcast from the web browser
(listen only) which is great for restroom breaks and snacks in long unengaging
meetings.

I rigged up a AC sniffer circuit and wifi microcontroller to my dumb doorbell
which snapcasts a recording of a doorbell chime throughout the house when it's
pressed so I can hear it when music is playing.

Snapcast can also stream to a phone, so I can Bluetooth into the hot tub
speakers and have it on the whole house audio too.

Open source home automation with home assistant and this tech is really fun if
you want to get into it as a hobby. Certainly requires work, but that's fun
for me.

I also have it all integrated into a home-brew weather station and an indoor
air quality sensor system with co2 and pm levels so I can get alerts to open
windows or turn on fans if co2 gets too high. I also get raindrop noises when
it starts raining so I go close the windows. Fun times.

Of course there's a security system involved too which arms at night and when
the family's WiFi all disconnects. It disarms automatically based on WiFi auth
and an openwrt script, so it's totally autonomous. Works very well.

Working on a tensorflow based automation now to have the front door camera
detect packages and send email alerts. Does not work at all, yet.

All local, all self-hosted, with a bridged MQTT server on a VPS for
communicating with my location tracker and my mom's house (I get alerts if
she's on vacation and the furnace dies or basement floods or there's a break
in or whatever). I vpn in to my router to control things when out. But if
internet dies at home, everything local still works great.

Mopidy also connects to Spotify, of course.

[https://mopidy.com/ext/iris/](https://mopidy.com/ext/iris/)

[https://www.home-assistant.io/](https://www.home-assistant.io/)

~~~
sleavey
Can you tell us more about your home brew weather station? That sounds cool.

~~~
acidburnNSA
Sure. Here's a write-up on it: [https://partofthething.com/thoughts/weather-
and-air-quality-...](https://partofthething.com/thoughts/weather-and-air-
quality-monitoring-station-with-esp8266-and-home-assistant/)

------
aidos
After kicking around a bunch of these solutions and discovering that none of
them work quite right or you still have to spend quite a bit on the hardware,
I eventually bent the knee to Sonos recently. The interface is pretty garbage,
but it just works and the sound quality is good.

Part of it was that I just don’t think I could face the wrath of my family
when it didn’t work. I guess you get to a point in life when you have kids,
and hours for tinkering are reduced so you need to pick your battles.

I like the Snapcast model though, it follows the Linux philosophy. From memory
the audio stream is basically just wrapped along with a time stamp. Then you
transfer those blocks to another device that plays them at the right time
(where they’re unwrapped back into an audio stream).

~~~
gingerlime
I think I'm in the same boat. I have a rpi, installed home assistant before, I
do devOps/sysadmin stuff, setting up virtual machines, docker, creating and
contributing to open source etc etc...

... buuuuuuuut, having looked at the article, my eyes started to glaze over,
and a sinking despair sipped in quickly... I want to love this, but I just
can't bring myself to. I guess I'm at this point of giving in and getting a
Sonos :(

~~~
elgfare
I get that. It's not exactly easy. But FWIW it seems quite stable, I'm not
having to SSH in and restart services like i did when i tried a year ago. IMO
snapcast, librespot, and hifiberry should all get fully integrated into
raspbian so that it's easier to set up.

Regarding cost, yeah i think it's only significantly cheaper than Sonos for
the same quality if you can configure some of your existing setups to become
clients.

------
hanklazard
Volumio’s pi OS is a pretty easy way to do this. There’s a Snapcast plugin on
github along with instructions. Pair the pi with a hifiberry amp and some
speakers and you’ve got your own custom networked audio client.

We’ve got sync’d audio running in 4 different rooms at home and control via
home assistant. Not as easy as Sonos I’m sure but I like that I can use
whatever speakers I want.

------
Normal_gaussian
I've recently had some time to go through a spate of "home improvement"
(needless tinkering) tech projects.

Replacing alexa and ok google devices with open source ones was on the list.
This looks great for the music - though I was mainly stuck for good voice
control.

~~~
gibs0ns
Check out Rhasspy for voice control. IMO it's the best FOSS solution available
for this atm.

[https://rhasspy.readthedocs.io/en/latest/](https://rhasspy.readthedocs.io/en/latest/)

------
bsanr2
The holy grail for cheap-ass networked audio is a surround-sound set
constructed from random (or a set of) Bluetooth speakers and some sort of
wireless receiver. I can't tell you how many people came into my old workplace
expected that to be possible, and being disappointed that the only options
were somewhat expensive demi-audiophile WiFi-based (read: hooked into an app
that required an internet connection and sometimes iOS) solutions from
Sonos/Bose/B&W/Klipsch that locked you into their platform. IIUC latency and
bandwidth are an issue?

This is a cool step in the right direction though.

~~~
IshKebab
Why isn't that possible? It doesn't sound like it would be that hard.

~~~
bsanr2
I thought so too, but then, I could never manage it myself. I imagine a
solution would be to build a receiver with a Bluetooth antenna for each
channel, so that it would be device-agnostic, and a mic port for calibration.
Maybe a traditional RCA port for a powered subwoofer.

But if it were so simple, I'm sure someone would have done it by now. There
may also be weird licensing issues involved, like perhaps Dolby/DTS don't want
to certify such a system, and so access to whatever you need to decode their
signals isn't readily available.

~~~
IshKebab
I'm not sure you'd even need separate Bluetooth chips/antennas. In theory one
device can connect to up to 7 others. Although, to be fair Bluetooth audio
streaming is barely reliable with one device so maybe that is just asking too
much of it.

Apparently Samsung phones can connect to two devices:

[https://www.lifewire.com/how-to-connect-multiple-
bluetooth-s...](https://www.lifewire.com/how-to-connect-multiple-bluetooth-
speakers-4173788)

Here's another one:

[https://techcrunch.com/2017/04/30/tempow-turns-your-dumb-
blu...](https://techcrunch.com/2017/04/30/tempow-turns-your-dumb-bluetooth-
speakers-into-a-connected-sound-system/)

~~~
elgfare
I think Bluetooth is just getting there now, so we will probably see more of
this going forward.

[https://www.bluetooth.com/learn-about-bluetooth/bluetooth-
te...](https://www.bluetooth.com/learn-about-bluetooth/bluetooth-
technology/le-audio/)

~~~
IshKebab
That's Low Energy Bluetooth though, a totally different thing. You can't do
audio through BLE at all before this.

------
DenseComet
Snapcast seems to also have integrations with Airplay and Home Assistant. This
post is also quite nice, I've saved it to use as reference for whenever I get
around to setting up Snapcast.

------
acd
Nice article you can hook up studio monitors like genelec 8010 for a very good
sounding setup. Monitors will Likely last a lifetime so better for the
environment.

------
notadog
This looks like an interesting project. I found the naming creative:
(S)y(n)chronous (a)udio (p)layer.

~~~
IshKebab
Could have gone with Synaps. Synchronous Audio Playing System.

