DeviceProperties service
Modify device properties, like LED status and stereo pairs
The DeviceProperties 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.DevicePropertiesService.OneOfTheMethodsBelow({...})
All actions that require input expect an object with the specified parameters, even if it only requires one parameter.
- AddBondedZones
- AddHTSatellite
- CreateStereoPair
- EnterConfigMode
- ExitConfigMode
- GetAutoplayLinkedZones
- GetAutoplayRoomUUID
- GetAutoplayVolume
- GetButtonLockState
- GetButtonState
- GetHouseholdID
- GetHTForwardState
- GetLEDState
- GetUseAutoplayVolume
- GetZoneAttributes
- GetZoneInfo
- RemoveBondedZones
- RemoveHTSatellite
- RoomDetectionStartChirping
- RoomDetectionStopChirping
- SeparateStereoPair
- SetAutoplayLinkedZones
- SetAutoplayRoomUUID
- SetAutoplayVolume
- SetButtonLockState
- SetLEDState
- SetUseAutoplayVolume
- SetZoneAttributes
- DevicePropertiesService event
AddBondedZones
const result = await sonos.DevicePropertiesService.AddBondedZones({ ChannelMapSet:... });
Input object:
property | type | description |
---|---|---|
ChannelMapSet | string |
This actions returns a boolean whether or not the requests succeeded.
AddHTSatellite
Adds satellites and/or a sub woofer to a (main) player. The satellites become hidden. The main player RINCON_* is mandatory. RR: right - rear, LF: left - front, SW: subwoofer
const result = await sonos.DevicePropertiesService.AddHTSatellite({ HTSatChanMapSet:... });
Input object:
property | type | description |
---|---|---|
HTSatChanMapSet | string | example: RINCON_000PPP1400:LF,RF;RINCON_000RRR1400:RR;RINCON_000SSS1400:LR;RINCON_000QQQ1400:SW
|
This actions returns a boolean whether or not the requests succeeded.
Remarks Not all speakers support satellites or sub woofer. Satellites should be of same type (e.g. Play:1)
CreateStereoPair
Create a stereo pair (left, right speakers), right one becomes hidden
const result = await sonos.DevicePropertiesService.CreateStereoPair({ ChannelMapSet:... });
Input object:
property | type | description |
---|---|---|
ChannelMapSet | string | example: RINCON_B8E9375831C001400:LF,LF;RINCON_000E58FE3AEA01400:RF,RF
|
This actions returns a boolean whether or not the requests succeeded.
Remarks Not all speakers support StereoPairs
EnterConfigMode
const result = await sonos.DevicePropertiesService.EnterConfigMode({ Mode:..., Options:... });
Input object:
property | type | description |
---|---|---|
Mode | string | |
Options | string |
Output object:
property | type | description |
---|---|---|
State | string |
ExitConfigMode
const result = await sonos.DevicePropertiesService.ExitConfigMode({ Options:... });
Input object:
property | type | description |
---|---|---|
Options | string |
This actions returns a boolean whether or not the requests succeeded.
GetAutoplayLinkedZones
const result = await sonos.DevicePropertiesService.GetAutoplayLinkedZones({ Source:... });
Input object:
property | type | description |
---|---|---|
Source | string |
Output object:
property | type | description |
---|---|---|
IncludeLinkedZones | boolean |
GetAutoplayRoomUUID
const result = await sonos.DevicePropertiesService.GetAutoplayRoomUUID({ Source:... });
Input object:
property | type | description |
---|---|---|
Source | string |
Output object:
property | type | description |
---|---|---|
RoomUUID | string |
GetAutoplayVolume
const result = await sonos.DevicePropertiesService.GetAutoplayVolume({ Source:... });
Input object:
property | type | description |
---|---|---|
Source | string |
Output object:
property | type | description |
---|---|---|
CurrentVolume | number |
GetButtonLockState
Get the current button lock state
const result = await sonos.DevicePropertiesService.GetButtonLockState();
Output object:
property | type | description |
---|---|---|
CurrentButtonLockState | string | Possible values: On / Off
|
GetButtonState
const result = await sonos.DevicePropertiesService.GetButtonState();
Output object:
property | type | description |
---|---|---|
State | string |
GetHouseholdID
const result = await sonos.DevicePropertiesService.GetHouseholdID();
Output object:
property | type | description |
---|---|---|
CurrentHouseholdID | string |
GetHTForwardState
const result = await sonos.DevicePropertiesService.GetHTForwardState();
Output object:
property | type | description |
---|---|---|
IsHTForwardEnabled | boolean |
GetLEDState
Get the current LED state
const result = await sonos.DevicePropertiesService.GetLEDState();
Output object:
property | type | description |
---|---|---|
CurrentLEDState | string | Possible values: On / Off
|
GetUseAutoplayVolume
const result = await sonos.DevicePropertiesService.GetUseAutoplayVolume({ Source:... });
Input object:
property | type | description |
---|---|---|
Source | string |
Output object:
property | type | description |
---|---|---|
UseVolume | boolean |
GetZoneAttributes
const result = await sonos.DevicePropertiesService.GetZoneAttributes();
Output object:
property | type | description |
---|---|---|
CurrentZoneName | string | |
CurrentIcon | string | |
CurrentConfiguration | string | |
CurrentTargetRoomName | string |
GetZoneInfo
Get information about this specific speaker
const result = await sonos.DevicePropertiesService.GetZoneInfo();
Output object:
property | type | description |
---|---|---|
SerialNumber | string | |
SoftwareVersion | string | |
DisplaySoftwareVersion | string | |
HardwareVersion | string | |
IPAddress | string | |
MACAddress | string | |
CopyrightInfo | string | |
ExtraInfo | string | |
HTAudioIn | number | SPDIF input, 0 not connected / 2 stereo / 7 Dolby 2.0 / 18 dolby 5.1 / 21 not listening / 22 silence |
Flags | number |
RemoveBondedZones
const result = await sonos.DevicePropertiesService.RemoveBondedZones({ ChannelMapSet:..., KeepGrouped:... });
Input object:
property | type | description |
---|---|---|
ChannelMapSet | string | |
KeepGrouped | boolean |
This actions returns a boolean whether or not the requests succeeded.
RemoveHTSatellite
Removes a satellite or a sub woofer from (main) player. The satellite becomes visible.
const result = await sonos.DevicePropertiesService.RemoveHTSatellite({ SatRoomUUID:... });
Input object:
property | type | description |
---|---|---|
SatRoomUUID | string | example: RINCON_000RRR1400
|
This actions returns a boolean whether or not the requests succeeded.
Remarks Not all speakers support satellites or sub woofer. Multiples RINCON_* are not allowed.
RoomDetectionStartChirping
const result = await sonos.DevicePropertiesService.RoomDetectionStartChirping({ Channel:..., DurationMilliseconds:..., ChirpIfPlayingSwappableAudio:... });
Input object:
property | type | description |
---|---|---|
Channel | number | |
DurationMilliseconds | number | |
ChirpIfPlayingSwappableAudio | boolean |
Output object:
property | type | description |
---|---|---|
PlayId | number |
RoomDetectionStopChirping
const result = await sonos.DevicePropertiesService.RoomDetectionStopChirping({ PlayId:... });
Input object:
property | type | description |
---|---|---|
PlayId | number |
This actions returns a boolean whether or not the requests succeeded.
SeparateStereoPair
Separate a stereo pair
const result = await sonos.DevicePropertiesService.SeparateStereoPair({ ChannelMapSet:... });
Input object:
property | type | description |
---|---|---|
ChannelMapSet | string | example: RINCON_B8E9375831C001400:LF,LF;RINCON_000E58FE3AEA01400:RF,RF
|
This actions returns a boolean whether or not the requests succeeded.
Remarks Not all speakers support StereoPairs
SetAutoplayLinkedZones
const result = await sonos.DevicePropertiesService.SetAutoplayLinkedZones({ IncludeLinkedZones:..., Source:... });
Input object:
property | type | description |
---|---|---|
IncludeLinkedZones | boolean | |
Source | string |
This actions returns a boolean whether or not the requests succeeded.
SetAutoplayRoomUUID
const result = await sonos.DevicePropertiesService.SetAutoplayRoomUUID({ RoomUUID:..., Source:... });
Input object:
property | type | description |
---|---|---|
RoomUUID | string | |
Source | string |
This actions returns a boolean whether or not the requests succeeded.
SetAutoplayVolume
const result = await sonos.DevicePropertiesService.SetAutoplayVolume({ Volume:..., Source:... });
Input object:
property | type | description |
---|---|---|
Volume | number | |
Source | string |
This actions returns a boolean whether or not the requests succeeded.
SetButtonLockState
Set the button lock state
const result = await sonos.DevicePropertiesService.SetButtonLockState({ DesiredButtonLockState:... });
Input object:
property | type | description |
---|---|---|
DesiredButtonLockState | string | Allowed values: On / Off
|
This actions returns a boolean whether or not the requests succeeded.
SetLEDState
Set the LED state
const result = await sonos.DevicePropertiesService.SetLEDState({ DesiredLEDState:... });
Input object:
property | type | description |
---|---|---|
DesiredLEDState | string | Allowed values: On / Off
|
This actions returns a boolean whether or not the requests succeeded.
SetUseAutoplayVolume
const result = await sonos.DevicePropertiesService.SetUseAutoplayVolume({ UseVolume:..., Source:... });
Input object:
property | type | description |
---|---|---|
UseVolume | boolean | |
Source | string |
This actions returns a boolean whether or not the requests succeeded.
SetZoneAttributes
const result = await sonos.DevicePropertiesService.SetZoneAttributes({ DesiredZoneName:..., DesiredIcon:..., DesiredConfiguration:..., DesiredTargetRoomName:... });
Input object:
property | type | description |
---|---|---|
DesiredZoneName | string | |
DesiredIcon | string | |
DesiredConfiguration | string | |
DesiredTargetRoomName | string |
This actions returns a boolean whether or not the requests succeeded.
DevicePropertiesService event
const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.DevicePropertiesService.Events('serviceEvent', (data) => {
console.log(data);
});
The DevicePropertiesService emits events with these properties. Not all properties are emitted every time.
parameter | type | possible values |
---|---|---|
AirPlayEnabled | boolean | |
AutoplayIncludeLinkedZones | boolean | |
AutoplayRoomUUID | string | |
AutoplaySource | string | |
AutoplayUseVolume | boolean | |
AutoplayVolume | number | |
AvailableRoomCalibration | string | |
BehindWifiExtender | number | |
ButtonLockState | string |
On / Off
|
ChannelFreq | number | |
ChannelMapSet | string | |
ConfigMode | string | |
Configuration | string | |
CopyrightInfo | string | |
DisplaySoftwareVersion | string | |
EthLink | boolean | |
ExtraInfo | string | |
Flags | number | |
HardwareVersion | string | |
HasConfiguredSSID | boolean | |
HdmiCecAvailable | boolean | |
HouseholdID | string | |
HTAudioIn | number | |
HTBondedZoneCommitState | number | |
HTForwardEnabled | boolean | |
HTFreq | number | |
HTSatChanMapSet | string | |
Icon | string | |
Invisible | boolean | |
IPAddress | string | |
IsIdle | boolean | |
IsZoneBridge | boolean | |
KeepGrouped | boolean | |
LastChangedPlayState | string | |
LEDState | string |
On / Off
|
MACAddress | string | |
MicEnabled | number | |
MoreInfo | string | |
Orientation | number | |
RoomCalibrationState | number | |
SatRoomUUID | string | |
SecureRegState | number | |
SerialNumber | string | |
SettingsReplicationState | string | |
SoftwareVersion | string | |
SupportsAudioClip | boolean | |
SupportsAudioIn | boolean | |
TargetRoomName | string | |
TVConfigurationError | boolean | |
VoiceConfigState | number | |
WifiEnabled | boolean | |
WirelessLeafOnly | boolean | |
WirelessMode | number | |
ZoneName | string |
This file is automatically generated with @svrooij/sonos-docs, do not edit manually.