Sonos virtual object configuration

Tutorial

The Sonos object is used to integrate Sonos speaker with the Grenton system using the GATE module.

Before integrating Sonos speakers with the system, the speaker should be configured in the local network using dedicated application and read its assigned IP address.

To connect Sonos speaker to system, create a new Sonos virtual object:

GATE<em>HTTP</em>VIRTUAL<em>OBIECTS</em>7.png

Set the parameters in the Embedded features tab:

After sending the configuration, the Status feature should take the value 1. This is information about the correct connection of the speaker to the system.

GATE<em>HTTP</em>VIRTUAL<em>OBIECTS</em>9.png
Configuration parameters

FEATURES

NameDescription
HostSonos IP Address
UpdatePeriodState update period
StatusCommunication status:
0 - no connection,
1 - connected
ErrorCodeLast error code:
0 - no error,
negative values - negative HTTP status codes,
positive values - UPnP error codes
VolumeVolume level ranging from 0% to 100%
MuteMute state:
0 - Off,
1 - On
ArtistArtist
TitleTitle
StatePlayback state:
0 - stopped,
1 - playing,
2 - paused,
3 - transitioning
PlayModePlayback mode:
0 - normal,
1 - repeat all,
2 - repeat one,
3 - shuffle, no repeat,
4 - shuffle, repeat all,
5 - shuffle, repeat one
AlbumArtAlbum art address
NameSpeaker name
CooridnatorNameGroup coordinator name

METHODS

NameDescription
SetUpdatePeriodSets the state update period
SetVolumeSets the volume level, ranging from 0% to 100%
SetMuteSets the mute state
SetPlayModeSets the playback mode
PlayStarts playback
PausePauses playback
StopStops playback
NextSwitches to the next track
PrevSwitches to the previous track
VolumeUpIncreases the volume by a specified percentage
VolumeDownDecreases the volume by a specified percentage
SwtichMuteSwitches the mute state
SwitchPlaySwitches the playback state between paused and playing
LeaveGroupLeaves the current speaker group, if any
JoinGroupJoins the speaker group, specified by the group coordinator name

EVENTS

NameDescription
OnConnectedEvent executed after successful speaker connection establishment
OnDisconnectedEvent executed after the speaker connection has been lost
OnErrorEvent executed after an error has been detected
OnChangeEvent executed after a Mute, Volume, Title, Artist, State, PlayMode, AlbumArt or CoordinatorName change occurs
OnMuteChangeEvent executed after a Mute change occurs
OnVolumeChangeEvent executed after a Volume change occurs
OnTitleChangeEvent executed after a Title change occurs
OnArtistChangeEvent executed after an Artist change occurs
OnStateChangeEvent executed after a State change occurs
OnPlayModeChangeEvent executed after a PlayMode change occurs
OnAlbumArtChangeEvent executed after an AlbumArt change occurs
OnCoordinatorNameChangeEvent executed after a CoordinatorName change occurs