| 105 | === Making a Sonos "Play" something === |
| 106 | This functionality is exposed declaratively through the ''PlayURI'' action under Advanced Scenes. |
| 107 | The functionality is also exposed programmatically via Lua code: |
| 108 | {{{ |
| 109 | luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "PlayURI", |
| 110 | {URIToPlay="x-file-cifs:...", Volume=50}, |
| 111 | 666) |
| 112 | }}} |
| 113 | |
| 114 | This action will play what is defined by the URIToPlay parameter. To know how to set this parameter, you can open the Help tab of the Vera Sonos device, you will discover a list of example usages with your current own context. |
| 115 | Here are examples: |
| 116 | * x-file-cifs:`path` - Play the music file defined by "path" |
| 117 | * x-rincon-mp3radio:`url` - Play the MP3 WEB radio defined by "url" |
| 118 | * Q: - Play what is in the Sonos queue, starting at first item |
| 119 | * Q:3 - Play what is in the Sonos queue, starting at third item |
| 120 | * AI: - Play the local line-in audio input |
| 121 | * AI:`name` - Play the line-in audio input of the Sonos unit with name "name" |
| 122 | * TR:`id` - Play the tunein radio station having "id" (a number) as id |
| 123 | * FR:`radio` - Play the favorite radio station having "radio" as name |
| 124 | * SQ:`name` - Play the Sonos playlist having "name" as name |
| 125 | * GZ:`name` - Group the Sonos to Sonos with name "name" |
| 126 | |
| 127 | Notes: |
| 128 | * Parameters not specified will default internally. (''Volume=nil'') By default, the volume is not set. |
| 129 | |
| 130 | |
142 | | `urn:sonos-com:serviceId:Sonos1` |
143 | | * `CurrentService` - name of the current service |
144 | | * `SonosDevices` - Sonos network (for plugin internal usage) |
| 168 | `urn:micasaverde-com:serviceId:Sonos1` |
| 169 | * `CurrentService` - name of the current service, for example "TuneIn" |
| 170 | * `ProxyUsed` - "proxy is used" or "proxy is not used" to indicate if the UPnP event proxy is used |
| 171 | * `RouterIp` - router/firewall IP when the Sonos unit can access the Vera only with a port forwarding rule |
| 172 | * `RouterPort` - router/firewall port when the Sonos unit can access the Vera only with a port forwarding rule |
| 173 | * `SonosDevices` - XML data describing the Sonos network |
| 174 | * `SonosModel` - a number used to display the right icon for the Vera device, depending on the Sonos model (for plugin internal usage) |
| 175 | * `SonosModelName` - model of the Sonos unit, for example "Sonos PLAY:5" or "Sonos CONNECT:AMP" |
| 176 | * `SonosOnline` - "1" when the Sonos is online or "0" when it is offline |
155 | | * `TransportPlaySpeed` - |
156 | | * `CurrentPlayMode` - |
157 | | * `CurrentCrossfadeMode` - |
158 | | * `CurrentTransportActions` - |
159 | | * `CurrentTrack` - |
160 | | * `CurrentTrackDuration` - |
161 | | * `CurrentTrackURI` - |
162 | | * `CurrentTrackMetaData` - |
163 | | * `CurrentTitle` - |
164 | | * `CurrentArtist` - |
165 | | * `CurrentAlbum` - |
166 | | * `CurrentDetails` - |
167 | | * `CurrentAlbumArt` - |
168 | | * `RelativeTimePosition` - |
169 | | * `AbsoluteTimePosition` - |
170 | | * `RelativeCounterPosition` - |
171 | | * `AbsoluteCounterPosition` - |
172 | | * `NumberOfTracks` - |
173 | | * `CurrentMediaDuration` - |
174 | | * `AVTransportURI` - |
175 | | * `AVTransportURIMetaData` - |
176 | | * `CurrentRadio` - |