Unlink Airplay Devices

I have two Airplay devices (Pi4s) on the same network. I want to be able to select them individually to play different music in each of two zones, but when I connect to one the music streams in both zones, like my devices are linked. What am I missing?

Hi @Hazelabs,

EDIT: Doh!

Do this instead: https://sound.balenalabs.io/docs/customization#multi-room
Set SOUND_MULTIROOM_MASTER=<ip_address> on each device.

Ignore all that below here…

I think the issue you have here is that the two RPis are both operating as servers for one group of clients, including themselves. The sound-supervisor will tell all the clients to listen to one server or the other. The only way to have multiple streams that I can think of (not tested) is to manually set the IP address of the server you want for each client.

You’d need to edit this: balena-sound/start.sh at 74068e5327f52c0354f762a02617f3016c1a4ecb · balenalabs/balena-sound · GitHub

and manually specify the IP address, rather than curling the sound-supervisor. This isn’t a very user-friendly change, but it could be made into a variable that can be passed through balenaCloud.

Cheers!
Mark

Thanks Mark!

This didn’t work for me. I get the following error…

26.02.21 12:13:07 (-0600) multiroom-client 2021-02-26 18-13-07.940 [Error] (Connection) Error in socket shutdown: Socket not connected

Refresh me on the setup you have. I know you have two devices that are both multi-room servers (are they configured explicitly to be servers?), from which you want separate streams on each. But what other devices do you have in the fleet? And are they all explicitly configured to be multi-room clients? Also, what device did that log snippet come from?

When you set the IP address with SOUND_MULTIROOM_MASTER, the IP address on each client should be that of the multi-room server you want the client listening to. So you should have some clients with the IP of one of the servers, and the rest of the clients with the IP of the other server. And those IPs should be the “Local IP address” as shown in the balenaCloud dashboard. There is no way in the current code to do any of this automatically. By design, balenaSound can only support a single stream of audio, even though the server could be any qualified device.

If this doesn’t work by setting the IP address with the environment variable, it may require my longer idea in my original reply.

I have two devices that should operate like independent streaming servers. They actually don’t need to be multi-room devices at all. There are no clients. Am I going about this wrong??

Ah! With only devices you want running as standalone units, you may be good just setting the environment variable SOUND_MODE=STANDALONE on each device.

That will shut off all of the multi-room services and each device will play only the stream it’s receiving.

Great! I’ll give that a try!