Adding a UI to Balena Sound

Hi there!
I just got Balena Sound up and working on my Raspberry Pi 3, and it was super easy. Excellent tutorial. Great work!

I’m trying to wrap my head around what Balena Cloud actually is. It seems to be some kind of deployment manager?

I see no kind of filesystem on the pi…
I’m trying to get it to boot into a desktop environment so I can do some music visualization while I stream bluetooth audio to it, but I don’t really understand how to do this. The only customization I see is through adding environment variables from the desktop.

Could someone point me in the right direction?

Thanks so much

Hey runningman@rebera.net!

Balena is a deployment system for containerized applications on embedded devices. You might be familiar with the traditional model of simply running an OS, such as raspbian, off of the SD card. Instead, with balena, you run an OS (the “host OS”) which contains some processes responsible for running the containers which contain what you would traditionally have put just on the host.

Check out our examples, which include hello world projects and more worked examples: https://www.balena.io/docs/learn/more/examples/

Let me know if there’s anything else I can help with!

So, can I stack containers?

As mentioned before, I went through the BalenaSound tutorial and have it set up and it works. I would like to add functionality to output video through the HDMI. Can I get the thing to run the bluetooth service while also booting into a Desktop environment? Are these conjoined or disparate processes? What should I modify / add?

Hi @krebera,
Yes, you can have multiple containers running on a device and communicating with each other and in fact balenaSound already has three difference containers, each one being responsible for one of the supported audio sources. Each container is defined in the docker-compose.yml that you can see in the balenaSound repo, which then points to the respective folder with the container’s Dockerfile and code.

BalenaOS doesn’t offer a Desktop environment to use. It only has the bare minimum needed to run and keep your application up to date, so everything that runs on the device should be in the form of a conteinerized application. Currently balenaSound doesn’t have support for visualizations of the sound, and specifically the bluetooth audio container is just piping the audio stream from bluetooth to ALSA. I’ve opened a issue to track your request about the sound visualization on the GitHub repository, where you can track progress (feel free to add comments):

Another balena project that does provide a UI, is balenaDash, which under the hood uses balena-wpe for the UI rendering.
Let me point you to the balenaDash blogpost & the balena-wpe repository:


Kind regards,
Thodoris

Hi there. Thanks so much for your help!

That’s such a cool system! Regardless of achieving music viz, I think I’m just curious at this point to spend more time with this framework because it’s so cool. I would love to try and just get wpe running on the pi as well. Maybe just display a single graphic. Thanks for the help! I’ll look into it.

Enjoy!