As many Sonos owners are aware, the current integration between Sonos and Alexa does not yet provide a means of adjusting the volume of an entire group of speakers via voice command, instead restricting such adjustments to individual speakers or stereo pairs. (Sonos’ integration with Google is pending sometime this year, and it is as yet unknown if it will also omit that functionality).
This piston fills that gap, allowing the user to choose his or her preferred method (or methods) of initiating a volume adjustment. The simplest option is to use empty ST Routines, which can in turn be called by Alexa or Google Assistant. (Momentary switches could easily be used in lieu of routines). The second option uses Alexa/IFTTT integration to trigger the piston. The choice between these first two is simply a matter of preference in terms of language, either “run {routinename}” or “trigger {IFTTT applet}. Both will adjust the group volume up or down by a preset amount as defined by preference variables in the piston.
The third option, using Google/IFTTT, allows more granular control as Google’s IFTTT integration allows the user to specify the desired volume level in the voice command. So instead of just saying “volume up” or “volume down” you can say “change speaker volume to 40.” Another advantage of using this option is that Google is generally more flexible and natural in terms of its command language.
It is important to remember that when speakers are grouped, volume adjustments to speakers in the group are relative. What this means is that if the volume of the speaker that is controlling the group is 20, and you increase that by 10 to 30, you have increased the volume of that speaker by 50%. All other speakers in the group will also increase, not by an increment of 10, but by 50%. Thus, if one of the speakers in the group is at 60, it will increase to 90. The piston includes an option to limit such increases to avoid any unexpected surprises. (Decreases work similarly but for obvious reasons are generally less problematic).
As a general note, where Sonos speakers have been paired for stereo, only the left speaker of the pair needs to be defined in the device variable.
One final note, in its current iteration the piston assumes there is only one group among all the available speakers. Whether I’ll address that or not depends on how many more speakers I end up adding to my household before my wife seizes my credit card.
I’ve included a snapshot of both the piston and the IFTTT applets below.
See also:
Sonos Speakers - Dashboard Tiles
Sonos Speakers - Auto Volume Adjustment