Snapcast: Small OS for Raspberry Zero Clients

Created on 25 Nov 2016  Â·  24Comments  Â·  Source: badaix/snapcast

This is a feature request ;) @badaix
Issn´t it possible to build a small Distri for the Raspberry Zero so more people without the knowledge about Linux and so on can use Snapcast at home ? I think snapcast is enough for the most ppl not everyone needs sonos and snapcast works perfectly.

All 24 comments

Hi, I also think that it would be cool to have a small distri.
But this is out of scope now (at least for me. Contributions are always welcome).
Even with a preconfigured distribution you can only serve the nerds and geeks who are knowing that a Raspberry Pi is not food and know how to flash an SD card, setup a WiFi on a Linux console, ...
Regarding the WiFi: it would be an interesting project to build some WiFi-setup-over-BT-framework.
A distribution for Raspi 3 (with build-in BT module) could be paired with a smartphone to get the WiFi-SSID and password pushed from an app.
Next problem is the MPD setup/fine-tuning. Maybe for a prebuild distribution it would be ok to have Spotify, AirPlay and UPnP.
Easiest one: A Snapcast Android server that could be installed on FireTV, but it's hard run something like mpd on Android or to redirect Android audio (only possible on some rooted devices).

Snapclients are easy - they only have the problem of the WiFi configuration.

BTW: It seems that there are wireless speakers that are using Snapcast:
https://www.axiomaudio.com/boards/ubbthreads.php/topics/419543/Does_the_AA_use_Snapcast_for_s

Volumio2 will provide a decently small & music oriented distribution when snapcast is fully integrated in it I guess...
It seems in the plan: can't wait for that!

Has anyone tried DietPi? it seems to target this sort of use case.

Just try it on a Raspberry Zero.
Boot fast and you can use the .deb package so no need for recompile or packing like piCore.
You can flash the SD Card and on the first boot the system can do a unattended install incl. Snapclient.

Maybe a small Webinterface to switch sound output and set WLAN and Hostname and this can be a nice Client OS

root@DietPi:~# df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root 1,8G 581M 1,1G 35% /
devtmpfs 237M 0 237M 0% /dev
tmpfs 242M 0 242M 0% /dev/shm
tmpfs 242M 4,4M 237M 2% /run
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 242M 0 242M 0% /sys/fs/cgroup
tmpfs 10M 1,2M 8,9M 12% /DietPi
tmpfs 20M 36K 20M 1% /var/log
tmpfs 242M 0 242M 0% /tmp
/dev/mmcblk0p1 63M 23M 41M 36% /boot

sounds promising :smiley:

DietPi

What about your efforts of using piCore @bjwelker ?
Did you experience any downsides?
I have a couple of piCore based Snapcast clients running on some pis in my house and it is all working rather good!

I like the idea of the system not using the SD at all card after boot and the extremely fast boot time

@1337sup3rh4x0r no not any downsides only one maybe that you have to build a new tcz everytime for the clients. Not that fast like the .deb you can get here and install it.
I have 2 piCore Snapclients running, build a webinterface and a easy install script for it but maybe i want something less time consuming ...

For what i have read the DietPi issnt using the SD Card all the time too.

Just a high level comment on this: a rock solid system should mount the sdcard read-only

I have no Clou how i Can make the Image feom picore with snapcast build in :-(
I Can make the tcz and the Webinterface but not the Image....

Maybe a good starting point would be Buildroot. Main difficulties would be adding snapcast in the application tree and offering easy network configuration. Bonus would be that the solution could be compiled on all platforms supported by buildroot.

Maybe @nickaknudson Can Show how to make a Small Client Image with his pull request for buildroot.

Buildroot supports raspberry pi zero out of the box:

https://git.busybox.net/buildroot/tree/board/raspberrypi/readme.txt#n27

Just shallow clone buildroot from the latest release tag:

BUILDROOT_VERSION=2016.11.2
git clone --branch $BUILDROOT_VERSION --depth=1 git://git.buildroot.net/buildroot

And then run make:

cd buildroot
make raspberrypi0_defconfig

If that is successful then follow my instructions to integrate Snapcast:

https://github.com/badaix/snapcast/blob/master/doc/build.md#buildroot-cross-compile

@nickaknudson did you use it as Client or Server ?
For Client i think you neues to add alsa and some Soundard drivers

I've not actually tried it - just trying to give buildroot noobs a place to start. But yes, you would also need to add some other libraries to your buildroot .config such as ALSA.

The soundcard drivers should get built into the linux kernel automatically as buildroot sources from the raspberry pi linux distro:

https://github.com/raspberrypi/linux/blob/rpi-4.4.y/arch/arm/configs/bcmrpi_defconfig

I may have time to try it later this week and if so can add it to the guide.

That would be very nice. Then WE Can build very fast clients

It builds for raspberry pi.

Tested on raspberry pi zero.

https://github.com/nickaknudson/snapcast-pi

Sorry I had no Time to test but I will do

last weekend I managed to merge some PRs, especially #212 that added CMake support.
Great thanks to @joerg-krause !
Based on that, it was easy to make a first buildroot integration "SnapOS"
Feel tree to try it out. I'm happy about your feedback!

Great! This will make life a bit easier for many single nodes!

On Mon, Feb 5, 2018 at 10:54 PM, Johannes Pohl notifications@github.com
wrote:

last weekend I managed to merge some PRs, especially #212
https://github.com/badaix/snapcast/pull/212 that added CMake support.
Great thanks to @joerg-krause https://github.com/joerg-krause !
Based on that, it was easy to make a first buildroot integration "SnapOS
https://github.com/badaix/snapos"
Feel tree to try it out. I'm happy about your feedback!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/badaix/snapcast/issues/143#issuecomment-363107853,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGU9ICqYGXP7UbII2DZeHfP4IHc4ETnoks5tRxYggaJpZM4K8LHP
.

Thanks to @badaix for his great work for snapcast as well as for snapos. I tried it it works fine. Boot time to audible audio is about 20sec. I'm also trying around with buildroot for a while to build a simple client system for snapclients. If you are interested please have a look to snapcastbox.

Is it also planned to extend the support for SnapOS to OpenWRT/LEDE capable devices?

You should consolidate changes between these two folders:

Right now you have duplicated code.

When I initially made the buildroot contribution, I had intended for https://github.com/badaix/snapcast/tree/master/buildroot/package/snapcast to be a buildroot overlay as well. Note that with buildroot you can have multiple overlays.

I also would suggest to seperate snapcast package from the buildroot distro. You will have full flexibility and you are still able to configure the package in the way you want. Even patching for distro needs is possible. E.g. in my trials I replaced the startup script, resolving an issue which is relevant in this environment only.

@1337sup3rh4x0r I've created an openwrt directory with a Makefile for the snapcast package in the SnapOS project. It will need some cleanup and some more dependencies and it should switch from using make to cmake.

@nickaknudson fully agree, it's work in progress. Thanks a lot for your contributions to the buildroot support!

Was this page helpful?
0 / 5 - 0 ratings