BalenaSound - Play on select devices and not all?


I would love to play music in the house in the evening, but not in the kids rooms when they are sleeping. Can I deselect or am I forced to power off the Pis in the kids rooms when they should be quiet?

Just woke up my oldest daughter with some ‘scary’ music as I did not know that her setup was still online :smirk:

Hoping for input from an all new Balena apprentice :sunglasses:


Hey there @tser04 welcome to the forums and thanks for trying the project! I’m kinda intrigued to know what ‘scary’ music is :joy:

Anyhow this is totally possible but not really supported just yet. The project does have the DISABLE_MULTI_ROOM environment variable (docs here) but of course this would mean that you manually set and unset this environment variable to turn the devices on and off every day when your daughter goes to bed. Not the most practical.

If you want to get a bit deeper into it you could look at setting up a cron job with a scheduled task to set and unset these environment variables at a set time every day which may work for your use case. If you take a look at the balenaDash backlight scheduler, you can see it adds another service to the application that just runs a script for backlight on and off; you could do the same thing for enabling/disabling the multi-room functionality on a device. Instead of running a script to turn the backlight on and off, you would change that for a curl request to set and unset the environment variable, take a look at the docs for manipulating environment variables with the API.

I hope these pointers set you off on the right track but feel free to come back to us with any questions on anything. It’s not much work to set up but quite a few new things to learn if you’re just starting out on the platform. :+1: