Sonos master controller

Hi! New to Homey, not Sonos nor Smart Home stuff. Also not afraid of coding, as that’s what I do.

So I need a suggestion how to achieve nicely working Sonos system using Homey and some physical switches on wall (now Aeotec WallMote Quads and Remotec ZRC-90).

I have Sonos in four rooms, Living Room, Kitchen, Bedroom and Office. Some of them having multiple speakers.
I already can click a button and music starts in Living Room. I can click another button and Kitchen joins to TV group. I can control volume individually, no problem.

Problem is that I do not necessarily always want TV to be playing music, I might want only Office. Maybe Office and Kitchen. So how can I achieve this? As I cannot define a flow that the speaker would join group TV, as TV is not playing anything.

Is there some ready feature I could use to achieve this? If not with Homey only, maybe with IFTTT?

I was thinking that I would have a device that works as a “master controller”. So I only control to that device when selecting playlists or whatever, that master controller does not have speaker, so its always silent. But other speakers can then always join that group when they want to play music.

I do not need to support case when rooms play different music. Any ideas? Thank you! :slight_smile:

So how can I achieve this? As I cannot define a flow that the speaker would join group TV, as TV is not playing anything

Make a flow with IF TV is on or off. You can use a smart plug to know if the tv is on or off( energy < for instance 5W is off.

So how that helps if I want to play music in Office and Kitchen? TV is not in this scenario at all.

You can add speakers with a flow to a group or to another group. That way can make any group with any speaker

Hmm, not sure if I follow.

I have a four buttons to control the rooms (kitchen, bedroom, living room, office).

If I click Kitchen button and there is no music playing anywhere, it would start playing (simply start/stop toggle).
If I click Kitchen button and there is music playing in Office, it would join that group.

I cannot predefine its Office group where Kitchen would join, as its not necessarily the case. It can be any of the other three rooms and maybe in future more.

If there would be one “master controller” or “virtual sonos speaker” where the speakers always can join, then I see this should be a simple task to achieve.

You could try this, WHEN button is pushed, AND office is playing, Then join group office, Else play

If there are more possible speakers playing, then same as above, but at ELSE part, start a flow

Next flow

WHEN this flow Is started, AND bedroom is playing, THEN join group bedroom, Else play

Etc etc

1 Like

Thank you! Sounds plausible.

Only problem I see there is that there will be LOTS of flows. As I need to do flows for all four speaker switches.
Then I also plan to have another remote that I can control the content which is played. Maybe 8 scene buttons where you control playlists/radio…

Just wondering could this be achieved somewhat more easier, with airplay/spotify connect.

Maybe with rasperry pi and some player there :thinking:

I guess this should work: I buy another Sonos ONE speaker and I have its volume very low/mute/cut wires, but that is the speaker that always is going to be controlled and other speakers will always join to group this speaker?

1 Like

U seriosly wanna buy a 179 euro speaker to prevent making some flows m8?
Have way over 500 flows installed on a Homey and that’s just because i deleted over 250 of them.
The Flow Marcel gave u is a good option to make it work the way u want it.

Definitely! To me it sounds its well spent $ to save time and hassle.

Unless there is some other way to make the flows than the Homey app. If I can for example ssh to the device and use some script to do those. Or if it would be possible to make the flows with some “programming language” e.g. javascript

Tho still I’d prefer some other software based solution, if there is any :wink:
Like having something running in Raspberry that will control Sonos system. Googling for that.

and to respond me, there is HomeyScript, will check this!

There is some of that yes. Also some posts on the forums for that.
Have it running on a Synology.

1 Like

That’s an option. I did this otherwise. I have 16 stations/playlists that play randomly. Every day another station playlist for 14 days. That way it works automatically

1 Like

To be honest, I don’t understand your problems or requirements.
There are posts describing, for example, how the music follows you in the different rooms. So with Homey and Flows you have much of possibilities.

But maybe this will help:

1 Like

Tested that node app, works well. Maybe extending that I would be able to achieve what I want.

Actually with very minor changes to Sonos app I could achieve this too. If I would be able to join a group which is defined in variable, this would be solved.

I could have honey variable master_speaker. When I set speaker playing, it check it that variable exists. If not it will set it to contain speaker name, eg Office
Then when I set next speaker on, I can check in flow that variable exists and I should not activate play but join a group Office.
Unfortunately it seems I cannot give group name from variable when joining a group :thinking:

It’s fun to read that making a few flows is too much a hassle, too much work but installing the Sonos node API is not. Ur making it too difficult for urself. With a few flows it’s very well doable. But i guess it’s just not what u want, whatever flow we bring on. Now why we wanna make variables when we can check for every speaker if it’s playing or not?

I want to make a system that is easier for me to also maintain. It’s not big deal it it is harder to make now.

If it is easy to add new rooms/playlist without need to modify many flows, then why not go with flows. So if I have now 12 buttons that should control the speakers, I guess it’s something like 50 flows just to do this rather simple task?

Might be I go with flows if I do not find any better solution.

Installing node api is 5min task, would not call it hassle at all. Works without any configuration.

Then problems solved aye?
5 minutes without any further configuration, making 16 Sonos speakers follow u around the house, playing the sound that u want in every room, whenever u want it?
Not even gonna try.

If you have to press a button, why not just the button on your Sonos player to join an already playing group?

Unless you are automating it with some presence detection or your speakers are too far away??