Audio stops when wifi goes away or is unavailable

I’m new to all of this but I’m having an issue - I’m trying to make it so that I can use the Pi OFFLINE with a downloaded playlist on my mobile. My mobile device plays the music, sends over bluetooth to the pi (running balena) and the Pi is plugged into a speaker via 3.5mm jack. However if I don’t have wifi available it suddenly stops playing? Why is this?

Here is the guide I followed, and it works great! (As long as wifi is available)

Hi! Thanks for reaching out, if you haven’t already as a first instance it may be useful to use the variables SOUND_DISABLE_SPOTIFY and SOUND_DISABLE_AIRPLAY to be certain it isn’t playing over wifi. I have to admit running balenaSound offline isn’t something I’ve done personally so I’m going to give it a try too.

Let me know what you find when you do get a chance to try it.
As for disabling Spotify and Airplay: Where would I do that? When I’m configuring the build? Or can I do it on an instance that’s already up and running?

Hello, you would add/edit the SOUND_DISABLE_SPOTIFY and SOUND_DISABLE_AIRPLAY variables from the fleet variables page (if you want the variables to apply to all devices in the fleet) or from the device variables page (if you want the variables to apply only to a specific device).

I’m not sure if you’re addressing me, but:
I’m new to this. I’m very inexperienced with Raspberry Pi in general (though I’ve used them for a few years now for various things and I’m loosely familiar with a lot of linux command line stuff).
I’m extremely new to balena in general. I didn’t even know it was a thing until about a month ago and I’m not sure I still fully understand the complete usefulness of it - though I think it’s absolutely awesome already.

I guess you might be asking me to add these lines to my build while configuring the setup for a new device? When I have a few moments I’ll try to dig in and figure out what you may mean.
And thank you for your help/reply.


So to clarify within the balena dashboard, if you navigate to your balenaSound device, you will have a menu item on the left titled ‘Device Variables’ from there you will be able to add variables to the device, these allow you to change settings on the device and software without touching the code.

That said I’ve just been playing round myself and as yet have not been able to get balenaSound to work over only bluetooth, as you described as soon as I turn off wifi the music goes. I’m using a Pi3 and playing music from an iphone SE using spotify premium. I’m going to ask around the team and see if I can get any answers.

That’s fantastic that you are able to recreate what I’m experiencing. Would absolutely love to be able to use offline with bluetooth. I’m eagerly awaiting what you might find - because once this issue is not a problem any longer for me, this platform is amazing. I’m really excited at all the potential Balena has!

Ok, I think I’ve got it, by default balenaSound is set with the SOUND_MODE as MULTI-ROOM which appears to force it to play over Airplay, which makes sense I guess as you need to have the device online to utelise it.

If you go to the variable dialogue I mentioned above and set SOUND_MODE as STANDALONE it should now truely play over Bluetooth and work offline.

Let me know if it works!

Wanted to get someclarity for this setup. I am considering using balenasound for a multi-speaker synced audio playback system. Its not strictly multi-room, becasue I am plannig nto use it offline, outdoors(e.g., when camping in remote locations) The idea will be to connect my phone to one of the raspberry pi 4 via bluetooth (the server pi). Then the pi 4 will stream audio to a set of connecte dpis over wifi. this wifi can be set up using ther “server” pis access point feature to create a private wireless network without internet. Off course he smartphone will have internet through data. In the smartphone, I will basically play youtube. Is something like this possible via balena?