Using a (snapclient?) client to control volume / mute BalenaSound

Hi there!

I have recently set up balenaSound on my device and I am looking to potentially expand it for multi room audio. However one thing I definitely want to be able to do is interface with each client to be able to control volume of or mute each device.

I downloaded the iPhone Snapclient and was able to connect to the server, and it shows two items, one each having a fader. One is iPhone (client) and the other is the Raspberry Pi running balena-sound.

So what are my options?

  1. Snapcast Client iOS (Looks terrible, only has sliders and no mute button)
  2. Write my own client app. (Where are the docs for the API?)
  3. I noticed there is a web server serving an site on the server that has a “Device Volume” slider, however devtools networking is showing a 500 error (error: "PARequest timed out.") when adjusting the volume, or using any of the controls. I would assume that if this was working and I went this route, I’d have to know the IP’s of each client to change volume?

I’d love to create a little app/interface to do this but I’m feeling a bit lost in the architecture/options and wondering what others have done?

Hi @kinetic, sorry for the delayed response. I’m the balenaSound developer so maybe I can clear things up a bit.

There are two instances where it makes sense to control volume: snapcast and the audio service/block. For details see ARCHITECTURE - Home, but basically the audio block is a PulseAudio server that controls all audio in/out. While you can programmatically control it, in a multiroom scenario the audio block doesn’t know about the existence of other devices whereas snapcast does.

So basically what you want/need is a snapcast control app. The options you listed are pretty much all there is:

  1. Snapcast Client iOS (Looks terrible, only has sliders and no mute button)

I agree! Most of the snapcast client apps i’ve tried don’t look great and are very limited

  1. Write my own client app. (Where are the docs for the API?)
  2. I noticed there is a web server serving an site on the server that has a “Device Volume” slider, however devtools networking is showing a 500 error (error: “PARequest timed out.”) when adjusting the volume, or using any of the controls. I would assume that if this was working and I went this route, I’d have to know the IP’s of each client to change volume?

We’d love to have a proper app/control website for balenaSound but it’s still not clear if we can do it through the audio block instead of snapcast (i would like to avoid doing it through snapcast as snapcast is not used if you are not running in multiroom mode).
The website you found is an experimental proof of concept for this that only works for the device it’s running on. There is another website on port 1708, this is snapweb and was built by the snapcast guys. I haven’t checked it in a while but perhaps it’s good enough for you.

In terms of documentation, here are some links that can be useful:

I’d like to revisit this topic so keep an eye on the balenaSound repo. Cheers!