Link Search Menu Expand Document

SystemPropertiesService

Manage system-wide settings, mainly account stuff.

The SystemPropertiesService 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.SystemPropertiesService.OneOfTheMethodsBelow({...})

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

  1. AddAccountX
  2. AddOAuthAccountX
  3. DoPostUpdateTasks
  4. EditAccountMd
  5. EditAccountPasswordX
  6. EnableRDM
  7. GetRDM
  8. GetString
  9. GetWebCode
  10. ProvisionCredentialedTrialAccountX
  11. RefreshAccountCredentialsX
  12. Remove
  13. RemoveAccount
  14. ReplaceAccountX
  15. ResetThirdPartyCredentials
  16. SetAccountNicknameX
  17. SetString
  18. SystemPropertiesService event

AddAccountX

const result = await sonos.SystemPropertiesService.AddAccountX({ AccountType:..., AccountID:..., AccountPassword:... });

Input object:

property type description
AccountType number  
AccountID string  
AccountPassword string  

Output object:

property type description
AccountUDN string  

AddOAuthAccountX

const result = await sonos.SystemPropertiesService.AddOAuthAccountX({ AccountType:..., AccountToken:..., AccountKey:..., OAuthDeviceID:..., AuthorizationCode:..., RedirectURI:..., UserIdHashCode:..., AccountTier:... });

Input object:

property type description
AccountType number  
AccountToken string  
AccountKey string  
OAuthDeviceID string  
AuthorizationCode string  
RedirectURI string  
UserIdHashCode string  
AccountTier number  

Output object:

property type description
AccountUDN string  
AccountNickname string  

DoPostUpdateTasks

const result = await sonos.SystemPropertiesService.DoPostUpdateTasks();

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

EditAccountMd

const result = await sonos.SystemPropertiesService.EditAccountMd({ AccountType:..., AccountID:..., NewAccountMd:... });

Input object:

property type description
AccountType number  
AccountID string  
NewAccountMd string  

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

EditAccountPasswordX

const result = await sonos.SystemPropertiesService.EditAccountPasswordX({ AccountType:..., AccountID:..., NewAccountPassword:... });

Input object:

property type description
AccountType number  
AccountID string  
NewAccountPassword string  

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

EnableRDM

const result = await sonos.SystemPropertiesService.EnableRDM({ RDMValue:... });

Input object:

property type description
RDMValue boolean  

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

GetRDM

const result = await sonos.SystemPropertiesService.GetRDM();

Output object:

property type description
RDMValue boolean  

GetString

Get a saved string.

const result = await sonos.SystemPropertiesService.GetString({ VariableName:... });

Input object:

property type description
VariableName string The key for this variable

Output object:

property type description
StringValue string  

Remarks Strings are saved in the system with SetString, every speaker should send the same data. Will error when not existing

GetWebCode

const result = await sonos.SystemPropertiesService.GetWebCode({ AccountType:... });

Input object:

property type description
AccountType number  

Output object:

property type description
WebCode string  

ProvisionCredentialedTrialAccountX

const result = await sonos.SystemPropertiesService.ProvisionCredentialedTrialAccountX({ AccountType:..., AccountID:..., AccountPassword:... });

Input object:

property type description
AccountType number  
AccountID string  
AccountPassword string  

Output object:

property type description
IsExpired boolean  
AccountUDN string  

RefreshAccountCredentialsX

const result = await sonos.SystemPropertiesService.RefreshAccountCredentialsX({ AccountType:..., AccountUID:..., AccountToken:..., AccountKey:... });

Input object:

property type description
AccountType number  
AccountUID number  
AccountToken string  
AccountKey string  

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

Remove

Remove a saved string

const result = await sonos.SystemPropertiesService.Remove({ VariableName:... });

Input object:

property type description
VariableName string The key for this variable

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

Remarks Not sure what happens if you call this with a VariableName that doesn't exists.

RemoveAccount

const result = await sonos.SystemPropertiesService.RemoveAccount({ AccountType:..., AccountID:... });

Input object:

property type description
AccountType number  
AccountID string  

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

ReplaceAccountX

const result = await sonos.SystemPropertiesService.ReplaceAccountX({ AccountUDN:..., NewAccountID:..., NewAccountPassword:..., AccountToken:..., AccountKey:..., OAuthDeviceID:... });

Input object:

property type description
AccountUDN string  
NewAccountID string  
NewAccountPassword string  
AccountToken string  
AccountKey string  
OAuthDeviceID string  

Output object:

property type description
NewAccountUDN string  

ResetThirdPartyCredentials

const result = await sonos.SystemPropertiesService.ResetThirdPartyCredentials();

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

SetAccountNicknameX

const result = await sonos.SystemPropertiesService.SetAccountNicknameX({ AccountUDN:..., AccountNickname:... });

Input object:

property type description
AccountUDN string  
AccountNickname string  

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

SetString

Save a string in the system

const result = await sonos.SystemPropertiesService.SetString({ VariableName:..., StringValue:... });

Input object:

property type description
VariableName string The key for this variable, use something unique
StringValue string  

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

Remarks Strings are saved in the system, retrieve values with GetString.

SystemPropertiesService event

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

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

parameter type possible values
CustomerID string  
ThirdPartyHash string  
UpdateID number  
UpdateIDX number  
VoiceUpdateID number  

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