Sonos - want to control volume on individual speakers in a group


#1

1) Give a description of the problem
I don’t use groups. I have ‘everywhere’ permanently turned on for my Sonos speakers and use mute/volume to control where the music plays. I have Sonos speakers in all 8 rooms in the flat and never want them playing different (clashing) music.

I recently installed a speaker in the toilet. When I walk into the toilet I want the speaker to play music. When I leave I want the music to stop.

As the toilet speaker in part of the ‘everywhere’ group I need logic to decide whether to ‘unmute’ or ‘Play’ (if music is playing elsewhere I just need to unmute). Likewise, if music is playing elsewhere then I need to ‘unmute’ on leaving rather than ‘stop’.

I need to set the volume of the toilet speaker, but when I use the code

With BATHROOM
Do
set level 30%

It changes the levels of the whole group.

2) What is the expected behavior?

Change level of individual speaker

3) What is happening/not happening?

All speaker vol are changing

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)


#2

I have seen others using a ‘set volume’ commend but I do t have this for Sonos, just set Level x%

I think that although I put

With BATHROOM
Do
Set Level 30%

It adjust the columns of everything in the group that the bathroom is in. Ie all 10 speakers


#3

As you have noted, using webCoRE alone to change the volume of an individual speaker (or stereo pair) affects the volume of the entire group. This is not the fault of webCoRE, but rather a limitation of the current DTH, which is increasingly in need of an update.

There some options, however.

  • You can use webCoRE to triigger an IFTTT applet to control the volume or mute an individual speaker or group, IFTTT Sonos actions work on individual speakers, individual speakers within a group, or the group as a whole.

  • A more complex but very effective solution is to use the following for all your Sonos integrations https://github.com/jishi/node-sonos-http-api

  • Finally, there is always the manual way: Press and hold the play/pause button on your bathroom speaker to add or remove it from an active group. In your instance you can think of the longer press as a kind of mute button.


#4

Hi bthrock,

Thank you SOOOO much for the quick reply and the detail … much appreciated.

I hoped that I was doing something wrong and there was a simple command that I was missing … but it appears that this is a limitation … when selecting “DO” with ‘Bathroom’ what it actually means is “DO” with ‘the whole group that BATHROOM is in’.

So … as I want to keep everything in the same group that removes the last option (and I want something that removes the need to actually do anything physical).

The other two option …

I looked at the github option and am I right that htis requires a running Raspberry Pi or similar ‘server’ being on. I don’t have the skill to do this and I don’t have the kit (wanting to use one of the many hubs rather than add another kit to the pack - however I am not completely against a local running server (would be quicker than the cloud) but for now, I will try to use other options.

So … I will try the IFTTT solution and see how that goes … basically I want to fix to the 30% volumne … right now it keeps climbing !!! until the person visiting the loo gets a sonic blast on arrival ! - haha.

Any other solutions using WebCore ?


#5

Hi - I have tried the solution using IFTTT and it works a treat. It is a bit clumsy as I am using Webcore for all the logic regarding Muting and Playing and what to mute/play when … but I am able to control the actual volume of the individual speaker with IFTTT. So, I have made the trigger the Bathroom light … when this turns ON the bathroom SONOS is set to 30%, when the Bathroom light turns OFF the bathroom SONOS is set to 0%.

Mute/Unmute Play/Pause are controlled with the same ‘Bathroom light’ trigger but by WebCore as the logic is too complex for IFTTT.

Shame that it cannot be done with WebCore due to limitations in the Sonos DTH … but hey … its working !

Thanks