Plugin Sonos
Go to the main Plugins page.
Go to the complete Plugin List.
Contents
Plugin Description
Control over Sonos wireless audio systems.
Actions for the Sonos plugin
ClearQueue
Sonos.ClearQueue
Remove all tracks from the current queue for the current player/coordinator.
CreateGroup
Sonos.CreateGroup
Creates a group or adds to an existing group.
Returns the name of the new group if successfully created.
You may include more than 3 players by adding new parameter boxes using the Parameter Helper.
- Parameters: 2-4
- GroupName : Existing Group or Single player [string]
- Player1 : First player to add [string]
- Player2 : Second player to add [string]
- Player3 : Third player to add (add more params if needed) [string]
DissolveAllGroups
Sonos.DissolveAllGroups
Dissolves (removes) all known groups freeing the individual players from the groups they were in, if any.
DissolveGroup
Sonos.DissolveGroup
Dissolves (removes) the group named <Group Name> freeing the individual players from the group.
- Parameters: 1
- Group Name : Name of Group to dissolve [string]
GenXML
Sonos.GenXML
Generates payloadXML files based on the Sonos library of items.
XML files will be created in the folder VoxCommando\SonosPayloads
Individual song titles are not generated by default because this can be a very slow process. You can enable the generation of song title payloads in the Sonos plugin settings window.
GetCurrentURI
Sonos.GetCurrentURI
Returns the current URI and Meta values. This can be a useful way to figure out how to queue content using the Sonos.SetURI action.
GetGroupInfo
Sonos.GetGroupInfo
Returns the name of the group for the Sonos <Player> if specified.
Otherwise it returns the name of the group for the current player.
- Parameters: 0-1
- Player : [string]
GetFavourites
Sonos.GetFavourites
Returns information about all favourites, including the URI and Meta for each one. This can be a usefulway to figure out how to queue music using the Sonos.SetURI action.
PartyMode
Sonos.PartyMode
Create a group containing all available players. If <Coordinator> is not specified then the current player will be used as the <Coordinator>.
- Parameters: 0-1
- Coordinator : [string]
Play
Sonos.Play
Actions to play various types of content on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
See also Sonos.SetURI for additional ways to play content.
Album
Sonos.Play.Album
Play Sonos library songs from a given <Album> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- Album : Name of album to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
AlbumArtist
Sonos.Play.AlbumArtist
Play Sonos library songs by <AlbumArtist> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- AlbumArtist : Name of album artist to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Artist
Sonos.Play.Artist
Play Sonos library songs by <Artist> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- Artist : Name of artist to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Composer
Sonos.Play.Composer
Play Sonos library songs by <Composer> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- Composer : Name of composer to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Favourite
Sonos.Play.Favourite
Play Sonos library songs that were previously saved as a Sonos Favourite.
The tracks will be played on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- Favourite : Name of the Sonos Favourite [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Genre
Sonos.Play.Genre
Play Sonos library songs matching the <Genre> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- Genre : Specify content to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
SavedQ
Sonos.Play.SavedQ
Play Sonos library songs that were previously saved to a Sonos Queue.
The tracks will be played on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.
- Parameters: 1-2
- SavedQ : Specify content to queue and play [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Sonos.Play.Share
Example of a share:
\\NAS\music
will play all the music stored in \\NAS\music and its subfolders.
If you only have created one share then this equates to "play everything".
- Parameters: 1-2
- Share : Path for a top level folder that was shared with the Sonos [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
TuneIn
Sonos.Play.TuneIn
Radio station IDs for your favourite radio stations can be found in the payloadXML file after generating XML for your Sonos library: .\SonosPayloads\MyRadio.xml
- Parameters: 1-2
- StationID : Sonos radio station ID # [string]
- Clear Queue : Clear existing queue before adding new items [boolean]
Player
Basic control of the currently selected player (device) or group.
AdjustGrpVol
Sonos.Player.AdjustGrpVol
Adjusts the current group's play volume by a positive or negative value in percent.
*** Caution is advised if setting volume above 50! Avoid using loops or payloads that could increase the volume to a high level accidentally.
- Parameters: 1
- Adjustment : +/- % [integer]
AdjustVol
Sonos.Player.AdjustVol
Adjusts the current player's play volume by a positive or negative value in percent.
*** Caution is advised if setting volume above 50! Avoid using loops or payloads that could increase the volume to a high level accidentally.
- Parameters: 1
- Adjustment : +/- % [integer]
GetStatus
Sonos.Player.GetStatus
Get the current player's status (Playing or Stopped).
GetVolume
Sonos.Player.GetVolume
Get the current player's volume (0-100%)
GetGrpVol
Sonos.Player.GetGrpVol
Returns the group volume (average volume of all players in group).
If <GetList> is True then matches will be returned with:
{Match.1.1} = Player1 name , {Match.1.2} = Player1 volume
{Match.2.1} = Player2 name , {Match.2.2} = Player2 volume
{Match.3.1} etc. for any other players in group
- Parameters: 0-1
- GetList : default: False [boolean]
Next
Sonos.Player.Next
Advance the player to the next track in the queue (if any).
Pause
Sonos.Player.Pause
Pause or stop playback of the current player.
Play
Sonos.Player.Play
Start playback of the current queue (if any).
Previous
Sonos.Player.Previous
Return the player to the previously played track in the queue (if any).
Does not rewind to the beginning of the current track.
This can be accomplished using Sonos.Player.SeekTime 00:00:00
SeekTime
Sonos.Player.SeekTime
Seeks in the currently playing track to the
- Parameters: 1
- Time : format HH:MM:SS [string]
SeekTrack
Sonos.Player.SeekTrack
Seeks in the current play queue to the track specified by <TrackIndex>
Note: the first <TrackIndex> # is 1, not 0.
- Parameters: 1
- TrackIndex : Track number to play [integer]
SetGrpVol
Sonos.Player.SetGrpVol
Set the current group's play volume to a value from 0 to 100 percent.
*** Caution is advised if setting volume above 50!
- Parameters: 1
- Volume : 0 - 100% [integer]
SetLoudness
Sonos.Player.SetLoudness
Set the current player's loudness to true or false (enabled disabled)
- Parameters: 1
- Enabled : True or False [boolean]
SetPlayMode
Sonos.Player.SetPlayMode
Sets the playback mode to one of:
SHUFFLE, SHUFFLE_NOREPEAT, NORMAL, REPEAT_ALL
- Parameters: 1
- PlayMode : eg: SHUFFLE_NOREPEAT [string]
SetVol
Sonos.Player.SetVol
Set the current play volume to a value from 0 to 100 percent.
***Caution is advised if setting volume above 50!
- Parameters: 1
- Volume : 0 - 100% [integer]
SetLastPlayer
Sonos.SetLastPlayer
Select the last current player which will be controlled by subsequent actions.
This allows you to temporarily target a player as follows. Assume you are using player 'A' and want to temporarily control player 'C':
Sonos.SetPlayer C
... do various actions here ...
... do various actions here ...
Sonos.SetLastPlayer
SetPlayer
Sonos.SetPlayer
Select the current player which will be controlled by subsequent actions.
- Parameters: 1
- Player Name : Player to control [string]
SetURI
Sonos.SetURI
Low-level action for playing or queuing items manually.
You can discover new working URI and Meta parameters using Sonos.GetCurrentURI and Sonos.GetFavourites
Example:
Track from library share:
URI: x-file-cifs://NAS/music/mp3/Air/Moon%20Safari/01%20La%20Femme%20d'argent.mp3
Meta: <no parameter required>
- Parameters: 1-2
- URI : URI to play: see action description. [string]
- Meta : Only required for some URIs [string]
TTS
Text To Speech actions
Speak
Sonos.TTS.Speak
Creates a wav file with <Text> spoken by the current Sonos TTS voice, and plays it on the current Sonos Player Device.
***WARNING: The voice might need to be different from the one being used by the normal VoxCommando TTS plugin. We hope to fix this. It depends on the TTS voice.
- Parameters: 1-2
- Text : TTS text to say aloud [string]
- Volume : Temporary volume for current player only [integer]