Link Search Menu Expand Document

GroupRenderingControl service

Volume related controls for groups

The GroupRenderingControl service is available on these models: v2-S1 / v2-S13 / v2-S14 / v2-S18 / v2-S21 / v2-S27 / v2-S3 / v2-S33 / v2-S38 / v2-S6 / v2-S9 / v2-Sub.

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

Get the group mute state.

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 Should 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 Should 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  

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

Remarks Should 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 Should 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 Should 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 Should 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.