Link Search Menu Expand Document

GroupRenderingControlService

Volume related controls for groups. Group volume is the average volume of all players. Snapshot stores the volume ratio between players.

The GroupRenderingControlService is available on these models: v1-S1 / v1-S5 / v1-S9.

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.GroupRenderingControlService.OneOfTheMethodsBelow({...})

All actions that require input expect an object with the specified parameters, even if it only requires one parameter.

  1. GetGroupMute
  2. GetGroupVolume
  3. SetGroupMute
  4. SetGroupVolume
  5. SetRelativeGroupVolume
  6. SnapshotGroupVolume
  7. GroupRenderingControlService event

GetGroupMute

Whether or not the group is muted.

const result = await sonos.GroupRenderingControlService.GetGroupMute({ InstanceID:... });

Input object:

property type description
InstanceID number InstanceID should always be 0

Output object:

property type description
CurrentMute boolean  

Remarks Sould be send to coordinator only

GetGroupVolume

Get the group volume.

const result = await sonos.GroupRenderingControlService.GetGroupVolume({ InstanceID:... });

Input object:

property type description
InstanceID number InstanceID should always be 0

Output object:

property type description
CurrentVolume number  

Remarks Sould be send to coordinator only

SetGroupMute

(Un-/)Mute the entire group

const result = await sonos.GroupRenderingControlService.SetGroupMute({ InstanceID:..., DesiredMute:... });

Input object:

property type description
InstanceID number InstanceID should always be 0
DesiredMute boolean True for mute, false for un-mute

This actions returns a boolean whether or not the requests succeeded.

Remarks Sould be send to coordinator only

SetGroupVolume

Change group volume. Players volume will be changed proportionally based on last snapshot

const result = await sonos.GroupRenderingControlService.SetGroupVolume({ InstanceID:..., DesiredVolume:... });

Input object:

property type description
InstanceID number InstanceID should always be 0
DesiredVolume number New volume between 0 and 100

This actions returns a boolean whether or not the requests succeeded.

Remarks Sould be send to coordinator only

SetRelativeGroupVolume

Relatively change group volume - returns final group volume. Players volume will be changed proportionally based on last snapshot

const result = await sonos.GroupRenderingControlService.SetRelativeGroupVolume({ InstanceID:..., Adjustment:... });

Input object:

property type description
InstanceID number InstanceID should always be 0
Adjustment number Number between -100 and +100

Output object:

property type description
NewVolume number  

Remarks Sould be send to coordinator only

SnapshotGroupVolume

Creates a new group volume snapshot, the volume ratio between all players. It is used by SetGroupVolume and SetRelativeGroupVolume

const result = await sonos.GroupRenderingControlService.SnapshotGroupVolume({ InstanceID:... });

Input object:

property type description
InstanceID number InstanceID should always be 0

This actions returns a boolean whether or not the requests succeeded.

Remarks Sould be send to coordinator only

GroupRenderingControlService event

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.GroupRenderingControlService.Events('serviceEvent', (data) => {
  console.log(data);
});

The GroupRenderingControlService emits events with these properties. Not all properties are emitted every time.

parameter type possible values
GroupMute boolean  
GroupVolume number  
GroupVolumeChangeable boolean  

This file is automatically generated with @svrooij/sonos-docs, do not edit manually.