Controlling Mirage Audio System
...
Version | Publication Date | Author | Notes |
---|---|---|---|
1.0 | 2017-11-14 | JS | Initial Release |
1.1 | 2020-09-15 | JS | Added details about service account selection and the Top Menu |
1.2 | 2021-08-06 | JS | Additional details about |
1.3 | 2021-08-06 | JS | Add browsing sub-section to JSON API section |
1.4 | 2021-08-31 | JS | Add detail on browse command structure in JSON API section |
1.5 | 2021-09-04 | JS | Add |
1.6 | 2021-09-07 | JS | Add events that describe changes to Presets and Playlists |
1.7 | 2021-09-09 | JS | Add |
...
1 |
...
Introduction
This document is intended to extend and eventually replace this document. Please refer to that PDF for an extensive accounting of all commands that existed at the time of its creation.
We categorize control of a Mirage Media Server (MMS) into four categories:
Connecting and the preamble
Events
Control
Browsing & content selection
Presets
Playlists
Now Playing
Album Art
For information regarding using the HTTP JSON API endpoints, see the end of this document.
Connecting
An MMS is controlled via a socket or telnet connection to port 5004 on the device's IP address. Commands sent and responses received are terminated with a carriage return and a line feed. Commands commonly used in a connection preamble will be briefly defined here but will have a more complete definition later.
A typical initialization sequence looks like:
Code Block |
---|
SetClientType DemoClient
SetClientVersion 1.0.0.0
SetHost 192.168.0.100
SetXmlMode Lists
SetEncoding 65001
SetInstance Player_A
SubscribeEvents
GetStatus |
SetClientType DemoClient
identifies the control client to the MMS. This command takes a single string argument.
SetClientVersion 1.0.0.0
allows the control client to set a version. We strongly recommend setting a client version. This will allow the server to react to client version changes if necessary. This command takes a version string in the format MAJOR.MINOR.BUILD.REVISION
SetHost 192.168.0.100
tells the server which address the control client connected on. This is useful if the control client is connecting through a external connection where the address it used might a web address. We recommend setting this value always. This command takes a single string argument.
SetXmlMode Lists
tells the MMS to send any lists as XML instead of text mode. This is recommended if the control client supports XML. This command takes a string argument where that argument is None
, Lists
, or All
.
SetEncoding 65001
tells the MMS to send data as UTF-8. There are other encodings available but 65001
will be the encoding of choice most of the time.
SetInstance Player_A
sets which output subsequent browse and control commands are intended for.
SubscribeEvents
tells the MMS to send events related to the currently selected instance as they occur. This command takes an optional boolean argument or a comma delimited list of events to limit the subscription to. If missing, the value is assumed to be true
, which subscribes the control client to all events. The client will remain subscribed for the duration of its connection. The subscription will follow the client from instance to instance. No resubscription is necessary. Events for the selected or default instance are pushed to the connected client. To get events from another instance, see SetInstance
.
GetStatus
requests that all events related to the selected instance be sent now.
Events
The MMS communicates data back to its control clients through events. These events carry information about the current state of the server. They can also be used to request input from the user. Some events inform the control client about the availability of various functions while others tell the control client to take some action.
Events follow a simple format:
Code Block |
---|
Marker Source Event=Value |
and will look like:
Code Block |
---|
StateChanged Player_A TrackTime=121 |
or
Code Block |
---|
ReportState Player_A TrackTime=121 |
Metadata Events
There are four lines of metadata and four metadata labels.
MetaData1
is generally reserved for radio station names or for track count data.
MetaData2
is generally reserved for the artist name.
MetaData3
is generally reserved for the album name.
MetaData4
is generally reserved for the track name.
MetaLabelx
events will always provide the label for the corresponding MetaDatax
field. MetaLabel1
follows MetaData1
, MetaLabel2
follows MetaData2
, etc. There are four MetaLabelx
events
An example of these events:
Code Block |
---|
ReportState Player_A MetaLabel1=
ReportState Player_A MetaData1=Pandora: Stevie Ray Vaughan Radio
ReportState Player_A MetaLabel2=Artist
ReportState Player_A MetaData2=Stevie Ray Vaughan
ReportState Player_A MetaLabel3=Album
ReportState Player_A MetaData3=Texas Flood (Legacy Edition)
ReportState Player_A MetaLabel4=Track
ReportState Player_A MetaData4=Texas Flood |
Now Playing Art is handled by providing a few separate events.
NowPlayingGuid
provides the ID of the now playing item. For example, {20dd901a-b092-3386-dc16-6b56f38a811e}
BaseWebUrl
provides the protocol, address, and port portions of the URL to retrieve art from. For example: <http://192.168.0.59:5005
.>
For further details, see the Album Art section below.
Track Time
Track time is provided in seconds. A track duration may be provided, depending on the source of the content.
TrackTime
indicates track position in seconds as a non-negative integer.
TrackDuration
indicates the total number of seconds in the track as a non-negative integer.
In cases where the content does not have a total time (like a broadcast radio station from TuneIn), TrackDuration
will be 0
.
In such cases where the MMS has neither a track length nor a current track position, both TrackTime
and TrackDuration
will be 0
.
Playback Events
MediaControl
and PlayState
both indicate the play state of the output. They have slightly different values but ultimately have the same meaning.
PlayState
will be one of the following: Playing
, Paused
, or Stopped
MediaControl
will be one of the following: Play
, Pause
, or Stop
Flags
All these events hold a true
|false
value and indicate whether a certain functionality is available.
Back
defines whether or not there is anything in the navigation stack. If true, use Back <int>
to jump back <int>
number of pages. The navigation stack begins with 0
. 0
is the current page.
BrowseNowPlayingAvailable
defines whether a queue is available to browse. This will be true
when the queue has more than 0
items even the now playing item is a radio station.
ContextMenu
defines whether or not AckButton CONTEXT
is a valid command and the TuneBridge™ button should be shown.
Mute
defines whether or not the set instance is muted.
PlayPauseAvailable
defines whether or not the Play
, Pause
, and PlayPause
are valid and the Play or Pause button should be shown.
RepeatAvailable
defines whether or not Repeat
is a valid command and the Repeat button should be shown.
Repeat
defines whether Repeat is enabled or disabled.
SeekAvailable
defines whether or not Seek
is a valid command and the scrubbing thumb should be shown on the track progress meter.
ShuffleAvailable
defines whether or not Shuffle
is a valid command and the Shuffle button should be shown.
Shuffle
defines whether or not Shuffle is enabled or disabled.
SkipNextAvailable
defines whether or not SkipNext
is a valid command and the Skip Next button should be shown.
SkipPrevAvailable
defines whether or not SkipPrevious
is a valid command and the Skip Previous button should be shown.
Multistate Flags
Some values have more than two states and therefore cannot be represented as true
|false
values.
ThumbsUp
indicates the state of the Thumbs Up button and whether the ThumbsUp
command is available. ThumbsDown
is identical to ThumbsUp
, replacing Up
with Down
in all cases. Possible states are -1
, 0
, and 1
where:
-1
indicates the button is disabled and the command is not available.
0
indicates the button is enabled but not set and the command is available.
1
indicates the button is both enabled and set and the command is available.
At the time of writing, no online service still uses a Stars rating system. However...
Stars
indicates the state of the stars and whether the SetStars
command is available. States range from -1
to 5
where:
-1
indicates stars are disabled and the command is not available.
0
- 5
indicate stars are enabled and should be showing the number of stars indicated in the value. The command is also available.
Control
Play
will tell the MMS to play.
Pause
will tell the MMS to pause.
PlayPause
will toggle the play state between play and pause.
Seek <int>
where <int>
is either a non-negative integer between 0
and the value of TrackDuration
or a negative integer between -1
and -1 * <valueOfTrackDuration>
. When <int>
is non-negative, the playback position will be moved relative to the start of the track. When <int>
is negative, the playback position will be moved relative to the end of the track.
SkipNext
skips to the next track. This command is governed by the SkipNextAvailable
event.
SkipPrevious
skips to the previous track if the value of TrackTime
is less than 5
. Otherwise, it restarts the current track if allowed by the given service. This command is governed by the SkipPrevAvailable
event.
ThumbsUp
toggles the ThumbsUp
state between 0
and 1
. This command is governed by the ThumbsUp
event.
ThumbsDown
toggles the ThumbsDown
state between 0
and 1
. This command is governed by the ThumbsDown
event. On some services, setting the ThumbsDown
state to 1
will also skip to the next track.
Browsing
Basics
All browsing on an MMS is done through the same basic format.
Browse<Container> <start> <count>
where <Container>
is the target browse type, <start>
is the one-based index the returned list should start from, and <count>
is the number of items the returned list should contain at most. For example:
BrowseArtists 1 10
will return 10
artists starting at item 1
.
BrowseArtists 11 10
will return 10
artists starting at item 11
.
Depending on whether SetXMLMode
is set, the response may be in either text mode or XML mode. As above, we strongly recommend XML if the control environment supports it as it offers more information.
Every browse item has a default action based on its type. We'll go over these default actions later on. These default actions can be superseded with attributes on each item.
action
defines the secondary action to perform if the user presses the the action button for that item.
listAction
defines the action to perform if the user presses the list item itself.
browseAction
defines the action to perform after doing the default action for that item or doing the listAction
if one exists.
Other list item attributes
artGuid
provides the guid to use if displaying art in the browse (See the Album Art section below). If this attribute is missing, use the value of the guid
.
button
provides an integer value that indicates which secondary action to offer on that item. The value of this attribute is defined by this table
...
Value
...
Function
...
0
...
Off
...
1
...
Add
...
2
...
Delete
...
3
...
Play
...
4
...
Power
...
5
...
PowerOn
...
6
...
Edit
...
7
...
AllTracks
...
8
...
ShuffleAll
dna
provides the name of the attribute containing the value to use for display.
guid
provides the item's ID for use in any action.
hasChildren
indicates whether that menu item is a branch (1
) or a leaf (0
).
name
provides the name of the item.
Picklists
Picklists are a way for the server to generically present a list to the control client without the control client needing any additional information about that menu. All online content uses Picklists. Some local menus are Picklists. Given their frequency, we must go over them first.
Picklists are always browsed using the BrowsePicklist
command. In some cases, performing an item's action
, listAction
, or browseAction
might result in a Picklist when that item's default action would not. A good example of this is when selecting local content for playback. The list items each have a listAction
that results in an intent clarification menu as a picklist that is sent to the client without the need of BrowsePicklist
.
Picklist items are selected with the AckPickItem <guid>
command if there is no listAction
attribute present.
Local Content
Local content can be browsed in whatever order is desired by the control client. However, most clients follow this pattern:
Albums => Tracks
Artists => Albums => Tracks
Composers => Tracks
Favorites
Genres => Albums => Tracks
Playlists => Tracks
To browse a top level list, simply clear the Music Filter using SetMusicFilter Clear
, then send the appropriate Browse command. Valid commands are listed at the bottom of this section.
Online Content
All online sources are Picklist trees branching from BrowseRadioSources
. The response to BrowseRadioSources
is a list of RadioSources
. To select a specific service, use SetRadioFilter Source=<guidOfService>
. Subsequently, use the value of the intended online service. This example assumes SetPickListCount
has been set. The example browses Pandora.
...
.8 | 2022-10-04 | AC | Add Scene commands |
1.9 | 2022-12-13 | JS | Add argument details to |
2.0 | 2023-08-14 | JS | Fix typo in Album Art table |
2.1 | 2023-12-07 | JS | Add |
2.2 | 2024-01-19 | JS | Add preliminary queue modification and |
2.3 | 2024-03-07 | JS | Improve art request information |
2.4 | 2024-08-14 | AC | Add Trigger Info |
Table of Contents | ||||
---|---|---|---|---|
|
Introduction
This document is intended to extend and eventually replace this document. Please refer to that PDF for an extensive accounting of all commands that existed at the time of its creation.
We categorize control of a Mirage Media Server (MMS) into four categories:
Connecting and the preamble
Events
Control
Browsing & content selection
Presets
Playlists
Now Playing
Album Art
For information regarding using the HTTP JSON API endpoints, see the end of this document.
Connecting
An MMS is controlled via a socket or telnet connection to port 5004 on the device's IP address. Commands sent and responses received are terminated with a carriage return and a line feed. Commands commonly used in a connection preamble will be briefly defined here but will have a more complete definition later.
A typical initialization sequence looks like:
Code Block |
---|
SetClientType DemoClient
SetClientVersion 1.0.0.0
SetHost 192.168.0.100
SetXmlMode Lists
SetEncoding 65001
SetInstance Player_A
SubscribeEvents
GetStatus |
SetClientType DemoClient
identifies the control client to the MMS. This command takes a single string argument.
SetClientVersion 1.0.0.0
allows the control client to set a version. We strongly recommend setting a client version. This will allow the server to react to client version changes if necessary. This command takes a version string in the format MAJOR.MINOR.BUILD.REVISION
SetHost 192.168.0.100
tells the server which address the control client connected on. This is useful if the control client is connecting through a external connection where the address it used might be a web address. We recommend setting this value always. This command takes a single string argument.
SetXmlMode Lists
tells the MMS to send any lists as XML instead of text mode. This is recommended if the control client supports XML. This command takes a string argument where that argument is None
or Lists
.
SetEncoding 65001
tells the MMS to send data as UTF-8. There are other encodings available but 65001
will be the encoding of choice most of the time.
SetInstance Player_A
sets which output subsequent browse and control commands are intended for.
SubscribeEvents
tells the MMS to send events related to the currently selected instance as they occur. This command takes an optional boolean argument or a comma delimited list of events to limit the subscription to. If missing, the value is assumed to be true
, which subscribes the control client to all events. The client will remain subscribed for the duration of its connection. The subscription will follow the client from instance to instance. No resubscription is necessary. Events for the selected or default instance are pushed to the connected client. To get events from another instance, see SetInstance
.
GetStatus
requests that all events related to the selected instance be sent now.
Setting Additional Options
In some cases, especially when writing a control client not known to MMS, it may be necessary to set some additional options that MMS presumes for known clients. Use the SetOption
command during the connection preamble. Here are list of those options:
Option | Purpose |
---|---|
supports_playnow=true | Indicates to MMS that the client supports the more advanced queue modification strategies described in the Modifying the Queue section below |
supports_inputbox=true | Indicates to MMS that the client supports Input and Message Box UI events |
supports_urls=true | Indicates to MMS that the client supports Page type Navigate events where MMS needs the client to open the indicated URL in a web browser |
Events
The MMS communicates data back to its control clients through events. These events carry information about the current state of the server. They can also be used to request input from the user. Some events inform the control client about the availability of various functions while others tell the control client to take some action.
Events follow a simple format:
Code Block |
---|
EventReason Source Event=Value |
and will look like:
Code Block |
---|
StateChanged Player_A TrackTime=121 |
or
Code Block |
---|
ReportState Player_A TrackTime=121 |
Metadata Events
There are four lines of metadata and four metadata labels.
MetaData1
is generally reserved for radio station names or for track count data.
MetaData2
is generally reserved for the artist name.
MetaData3
is generally reserved for the album name.
MetaData4
is generally reserved for the track name.
MetaLabelx
events will always provide the label for the corresponding MetaDatax
field. MetaLabel1
follows MetaData1
, MetaLabel2
follows MetaData2
, etc. There are four MetaLabelx
events
An example of these events:
Code Block |
---|
ReportState Player_A MetaLabel1=
ReportState Player_A MetaData1=Pandora: Stevie Ray Vaughan Radio
ReportState Player_A MetaLabel2=Artist
ReportState Player_A MetaData2=Stevie Ray Vaughan
ReportState Player_A MetaLabel3=Album
ReportState Player_A MetaData3=Texas Flood (Legacy Edition)
ReportState Player_A MetaLabel4=Track
ReportState Player_A MetaData4=Texas Flood |
Now Playing Art is handled by providing a few separate events.
NowPlayingGuid
provides the ID of the now playing item. For example, {20dd901a-b092-3386-dc16-6b56f38a811e}
BaseWebUrl
provides the protocol, address, and port portions of the URL to retrieve art from. For example: <http://192.168.0.59:5005
.>
For further details, see the Album Art section below.
Track Time
Track time is provided in seconds. A track duration may be provided, depending on the source of the content.
TrackTime
indicates track position in seconds as a non-negative integer.
TrackDuration
indicates the total number of seconds in the track as a non-negative integer.
In cases where the content does not have a total time (like a broadcast radio station from TuneIn), TrackDuration
will be 0
.
In such cases where the MMS has neither a track length nor a current track position, both TrackTime
and TrackDuration
will be 0
.
Playback Events
MediaControl
and PlayState
both indicate the play state of the output. They have slightly different values but ultimately have the same meaning.
PlayState
will be one of the following: Playing
, Paused
, or Stopped
MediaControl
will be one of the following: Play
, Pause
, or Stop
Flags
All these events hold a true
|false
value and indicate whether a certain functionality is available.
Back
defines whether or not there is anything in the navigation stack. If true, use Back <int>
to jump back <int>
number of pages. The navigation stack begins with 0
. 0
is the current page.
BrowseNowPlayingAvailable
defines whether a queue is available to browse. This will be true
when the queue has more than 0
items even the now playing item is a radio station.
ContextMenu
defines whether or not AckButton CONTEXT
is a valid command and the TuneBridge™ button should be shown.
Mute
defines whether or not the set instance is muted.
PlayPauseAvailable
defines whether or not the Play
, Pause
, and PlayPause
are valid and the Play or Pause button should be shown.
RepeatAvailable
defines whether or not Repeat
is a valid command and the Repeat button should be shown.
Repeat
defines whether Repeat is enabled or disabled.
SeekAvailable
defines whether or not Seek
is a valid command and the scrubbing thumb should be shown on the track progress meter.
ShuffleAvailable
defines whether or not Shuffle
is a valid command and the Shuffle button should be shown.
Shuffle
defines whether or not Shuffle is enabled or disabled.
SkipNextAvailable
defines whether or not SkipNext
is a valid command and the Skip Next button should be shown.
SkipPrevAvailable
defines whether or not SkipPrevious
is a valid command and the Skip Previous button should be shown.
Multistate Flags
Some values have more than two states and therefore cannot be represented as true
|false
values.
ThumbsUp
indicates the state of the Thumbs Up button and whether the ThumbsUp
command is available. ThumbsDown
is identical to ThumbsUp
, replacing Up
with Down
in all cases. Possible states are -1
, 0
, and 1
where:
-1
indicates the button is disabled and the command is not available.
0
indicates the button is enabled but not set and the command is available.
1
indicates the button is both enabled and set and the command is available.
At the time of writing, no online service still uses a Stars rating system. However...
Stars
indicates the state of the stars and whether the SetStars
command is available. States range from -1
to 5
where:
-1
indicates stars are disabled and the command is not available.
0
- 5
indicate stars are enabled and should be showing the number of stars indicated in the value. The command is also available.
Control
Play
will tell the MMS to play.
Pause
will tell the MMS to pause.
PlayPause
will toggle the play state between play and pause.
Seek <int>
where <int>
is either a non-negative integer between 0
and the value of TrackDuration
or a negative integer between -1
and -1 * <valueOfTrackDuration>
. When <int>
is non-negative, the playback position will be moved relative to the start of the track. When <int>
is negative, the playback position will be moved relative to the end of the track.
SkipNext
skips to the next track. This command is governed by the SkipNextAvailable
event.
SkipPrevious
skips to the previous track if the value of TrackTime
is less than 5
. Otherwise, it restarts the current track if allowed by the given service. This command is governed by the SkipPrevAvailable
event.
ThumbsUp
toggles the ThumbsUp
state between 0
and 1
. This command is governed by the ThumbsUp
event.
ThumbsDown
toggles the ThumbsDown
state between 0
and 1
. This command is governed by the ThumbsDown
event. On some services, setting the ThumbsDown
state to 1
will also skip to the next track.
SetVolume
sets the volume on the selected output. It takes a single integer argument from 0-50. The selected output must be in variable gain mode, as configured on the System tab of the device’s configuration page.
Browsing
Basics
All browsing on an MMS is done through the same basic format.
Browse<Container> <start> <count>
where <Container>
is the target browse type, <start>
is the one-based index the returned list should start from, and <count>
is the number of items the returned list should contain at most. For example:
BrowseArtists 1 10
will return 10
artists starting at item 1
.
BrowseArtists 11 10
will return 10
artists starting at item 11
.
Depending on whether SetXMLMode
is set, the response may be in either text mode or XML mode. As above, we strongly recommend XML if the control environment supports it as it offers more information.
Every browse item has a default action based on its type. We'll go over these default actions later on. These default actions can be superseded with attributes on each item.
action
defines the secondary action to perform if the user presses the the action button for that item.
listAction
defines the action to perform if the user presses the list item itself.
browseAction
defines the action to perform after doing the default action for that item or doing the listAction
if one exists.
Other list item attributes
artGuid
provides the guid to use if displaying art in the browse (See the Album Art section below). If this attribute is missing, use the value of the guid
.
button
provides an integer value that indicates which secondary action to offer on that item. The value of this attribute is defined by this table
Value | Function |
---|---|
0 | Off |
1 | Add |
2 | Delete |
3 | Play |
4 | Power |
5 | PowerOn |
6 | Edit |
7 | AllTracks |
8 | ShuffleAll |
dna
provides the name of the attribute containing the value to use for display.
guid
provides the item's ID for use in any action.
hasChildren
indicates whether that menu item is a branch (1
) or a leaf (0
).
name
provides the name of the item.
Picklists
Picklists are a way for the server to generically present a list to the control client without the control client needing any additional information about that menu. All online content uses Picklists. Some local menus are Picklists. Given their frequency, we must go over them first.
Picklists are always browsed using the BrowsePicklist
command. In some cases, performing an item's action
, listAction
, or browseAction
might result in a Picklist when that item's default action would not. A good example of this is when selecting local content for playback. The list items each have a listAction
that results in an intent clarification menu as a picklist that is sent to the client without the need of BrowsePicklist
.
Picklist items are selected with the AckPickItem <guid>
command if there is no listAction
attribute present.
Local Content
Local content can be browsed in whatever order is desired by the control client. However, most clients follow this pattern:
Albums => Tracks
Artists => Albums => Tracks
Composers => Tracks
Favorites
Genres => Albums => Tracks
Playlists => Tracks
To browse a top level list, simply clear the Music Filter using SetMusicFilter Clear
, then send the appropriate Browse command. Valid commands are listed at the bottom of this section.
Online Content
All online sources are Picklist trees branching from BrowseRadioSources
. The response to BrowseRadioSources
is a list of RadioSources
. To select a specific service, use SetRadioFilter Source=<guidOfService>
. Subsequently, use the value of the intended online service. This example assumes SetPickListCount
has been set. The example browses Pandora.
Code Block |
---|
SetXmlMode Lists BrowseRadioSources <RadioSources total="9" start="1" more="false" art="false" alpha="false" displayAs="List" caption="Radio sources" np="1"> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000008000000000002000" name="MurfieDeezer" dna="name" isSearchable="True" browseAction="BrowseRadioGenres" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000000010000000010000" name="Pandora Internet RadioiHeartRadio" dna="name" np="1" isSearchable="FalseTrue" browseAction="BrowseRadioStationsBrowseRadioGenres" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000000008000000008000" name="SiriusXM Internet RadioMurfie" dna="name" isSearchable="True" browseAction="BrowseRadioGenres" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000001000000000000010" name="SlackerPandora Internet Radio" dna="name" np="1" isSearchable="TrueFalse" browseAction="BrowseRadioGenresBrowseRadioStations" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000000100000000000008" name="SpotifySiriusXM Internet Radio" dna="name" isSearchable="True" browseAction="BrowseRadioGenres" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000004000000000001000" name="TIDALSlacker Radio" dna="name" isSearchable="True" browseAction="BrowseRadioGenres" button="0" /> <RadioSource guid="fbbcedb1-af64-4c3f-bfe5-000000000020000000000100" name="Spotify"TuneIn Radio" dna="name" isSearchable="True" browseAction="BrowseRadioGenres" button="0" /> </RadioSources> SetRadioFilter<RadioSource Sourceguid="fbbcedb1-af64-4c3f-bfe5-000000000010 BrowseRadioStations <PickList total="23000000004000" startname="1TIDAL" moredna="truename" artisSearchable="trueTrue" alphabrowseAction="falseBrowseRadioGenres" displayAsbutton="List0" caption="Pandora Internet Radio" source="Pandora" sourceTop="1"/> <PickItem<RadioSource guid="e82779bdfbbcedb1-058faf64-64784c3f-4785bfe5-0bba198d3c1e000000000020" name="Account: pandora@example.comTuneIn Radio" dna="name" isSearchable="True" hasChildrenbrowseAction="1BrowseRadioGenres" button="0" artGuid="/> </RadioSources> SetRadioFilter Source=fbbcedb1-af64-4c3f-bfe5-000000000010" />BrowseRadioStations <PickList total="23" start="1" <PickItem guid="ea03ab84-c1bc-3eb7-c6e8-5e2317c616cb" name="Create a Pandora station..." dna="name" hasChildren="1" button="0" singleInputBox="1" /more="true" art="true" alpha="false" displayAs="List" caption="Pandora Internet Radio" source="Pandora" sourceTop="1"> <PickItem guid="126e079ce82779bd-3c5b058f-8dad6478-017a4785-9bc61ca8e7db0bba198d3c1e" name="Browse Genre StationsAccount: pandora@example.com" dna="name" hasChildren="1" button="0" artGuid="fbbcedb1-af64-4c3f-bfe5-000000000010" /> <PickItem guid="31323232ea03ab84-3637c1bc-35323eb7-3237c6e8-3735363735385e2317c616cb" name="QuickMixCreate a Pandora station..." dna="name" hasChildren="01" button="0" artGuidsingleInputBox="31323232-3637-3532-3237-3735363735381" /> <PickItem guid="30353433126e079c-37353c5b-39328dad-3531017a-3937373933309bc61ca8e7db" name="RageBrowse Against The Machine RadioGenre Stations" dna="name" hasChildren="01" button="6" artGuid="30353433-3735-3932-3531-393737393330" action="action0" /> <PickItem guid="3737323331323232-32373637-39333532-34373237-333630353239373536373538" name="Stevie Ray Vaughan RadioQuickMix" dna="name" hasChildren="0" button="60" artGuid="3737323331323232-32373637-39333532-3437-333630353239" action="action3237-373536373538" /> <PickItem guid="3431393230353433-31303735-33333932-34373531-373937343738393737393330" name="Dinner PartyRage Against The Machine Radio" dna="name" hasChildren="0" button="6" artGuid="3431393230353433-31303735-33333932-34373531-373937343738393737393330" action="action" /> <PickItem guid="3630313337373233-32353237-39303933-31353437-393434383737333630353239" name="AllStevie TimeRay LowVaughan Radio" dna="name" hasChildren="0" button="6" artGuid="3630313337373233-32353237-39303933-31353437-393434383737333630353239" action="action" /> <PickItem guid="3137303334313932-32363130-38353333-39353437-383032373737373937343738" name="SumDinner 41Party Radio" dna="name" hasChildren="0" button="6" artGuid="3137303334313932-32363130-38353333-39353437-383032373737373937343738" action="action" /> <PickItem guid="3235323336303133-33343235-31323930-33393135-303834383336393434383737" name="OfAll Mice & MenTime Low Radio" dna="name" hasChildren="0" button="6" artGuid="3235323336303133-33343235-31323930-33393135-303834383336393434383737" action="action" /> </PickList> |
Choosing Default Online Accounts
To ease access to preferred accounts, we support selecting an account to be preselected in a streaming services' menu. This setting must be reapplied when the control client reconnects as its lifetime is that of the connection. This capability is supported always but only useful if more than one account per service is configured.
Retrieving Available Accounts
To select a specific account, a list of available accounts is required. The BrowseServiceAccounts
command works just like all the other commands. Paging is supported but not necessary as it is unlikely that there are more accounts than can be processed in a single chunk.
Code Block |
---|
BrowseServiceAccounts <ServiceAccounts total="5" start="1" more="false" art="false" alpha="false" displayAs="List"> <ServiceAccountInfo guid="291af38a-ca1d-df78-502c-d9f0952a3c42" name="examplesiriusxm" dna="name" isSearchable="false" button="0" service="Sirius" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000000008" /> <ServiceAccountInfo guid="48a99367-56ce-4e05-710a-22b3cc5afb09" name="examplespotify" dna="name" isSearchable="false" button="0" service="Spotify" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000000100" /> <ServiceAccountInfo guid="83ff91fa-ea96-40dd-3fae-cf6f2f47da92" name="tunein@example.com" dna="name" isSearchable="false" button="0" service="RadioTime <PickItem guid="31373033-3236-3835-3935-383032373737" name="Sum 41 Radio" dna="name" hasChildren="0" button="6" artGuid="31373033-3236-3835-3935-383032373737" action="action" /> <PickItem guid="32353233-3334-3132-3339-303834383336" name="Of Mice & Men Radio" dna="name" hasChildren="0" button="6" artGuid="32353233-3334-3132-3339-303834383336" action="action" /> </PickList> |
Choosing Default Online Accounts
To ease access to preferred accounts, we support selecting an account to be preselected in a streaming services' menu. This setting must be reapplied when the control client reconnects as its lifetime is that of the connection. This capability is supported always but only useful if more than one account per service is configured.
Retrieving Available Accounts
To select a specific account, a list of available accounts is required. The BrowseServiceAccounts
command works just like all the other commands. Paging is supported but not necessary as it is unlikely that there are more accounts than can be processed in a single chunk.
Code Block |
---|
BrowseServiceAccounts <ServiceAccounts total="5" start="1" more="false" art="false" alpha="false" displayAs="List"> <ServiceAccountInfo guid="291af38a-ca1d-df78-502c-d9f0952a3c42" name="examplesiriusxm" dna="name" isSearchable="false" button="0" service="Sirius" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000000020000000000008" /> <ServiceAccountInfo guid="751b418448a99367-589a56ce-36e44e05-9637710a-b0df383c6ecc22b3cc5afb09" name="pandora@example.comexamplespotify" dna="name" isSearchable="false" button="0" service="PandoraSpotify" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000000010000000000100" /> <ServiceAccountInfo guid="1939bc7683ff91fa-d0b1ea96-884140dd-82ed3fae-c8ccbd7cab6acf6f2f47da92" name="exampletidaltunein@example.com" dna="name" isSearchable="false" button="0" service="TIDALRadioTime" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000004000000000000020" /> </ServiceAccounts> |
Setting The Preferred Account
Setting the preferred account for a given service requires both the service's guid (obtained via the BrowseRadioSources
command) and the account's guid (obtained via the BrowseServiceAccounts
command). Use both values when using the SetServiceAccount
command. Here, we select the pandora@example.com
account for the Pandora service.
Code Block |
---|
SetServiceAccount fbbcedb1-af64-4c3f-bfe5-000000000010 <ServiceAccountInfo guid="751b4184-589a-36e4-9637-b0df383c6ecc |
Subsequently, browsing the top menu for Pandora will be that account.
This command can also be latching per output. This means that it is possible to set a given account as default on a given output of an MMS. Do this by appending False
to the end of the above command. For example:
Code Block |
---|
SetServiceAccount " name="pandora@example.com" dna="name" isSearchable="false" button="0" service="Pandora" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000000010 751b4184-589a-36e4-9637-b0df383c6ecc False |
Clearing latched accounts for a service or all services on an output can be done with the following two commands:
Code Block |
---|
SetServiceAccount Service Clear False |
where Service
is replaced by the name or GUID of the streaming service
or
Code Block |
---|
SetServiceAccount Clear Clear False |
More details on this command can be found in this article.
Valid Browse Commands
BrowseAlbums
BrowseArtists
BrowseComposers
BrowseFavorites
BrowseGenres
BrowseNowPlaying
BrowsePicklist
BrowsePlaylists
BrowseRadioSources
BrowseTitles
BrowseTopMenu
Browse Top Menu
The BrowseTopMenu
command supports some non-standard uses. Simply, it can take an additional argument that is neither a start or count value to indicate that the request is actually for the content within a node available as a child to the default response. Subsequently, the picklist response can be handled like any other picklist. This greatly simplifies the handler requirements for a control client.
Code Block |
---|
BrowseTopMenu <PickList total="9" start="1" more="false" art="false" alpha="false" displayAs="List" caption="Home Menu"> <PickItem guid="6d796d75-0000-0000-0000-736963000000" name="My Music" dna="name" hasChildren="1" button="0" /> <PickItem guid="6d797072-0000-0000-0000-736574730000" name="Favorites" dna="name" hasChildren="1" button="0" /> <PickItem guid="72656365-0000-0000-0000-74756e656400" name="Recently Tuned" dna="name" hasChildren="1" button="0" /> <PickItem guid="fbbcedb1-af64-4c3f-bfe5-000000000010" name="Pandora Internet Radio" dna="name" hasChildren="1" button="0" /" /> <ServiceAccountInfo guid="1939bc76-d0b1-8841-82ed-c8ccbd7cab6a" name="exampletidal" dna="name" isSearchable="false" button="0" service="TIDAL" serviceGuid="fbbcedb1-af64-4c3f-bfe5-000000004000" /> </ServiceAccounts> |
Setting The Preferred Account
Setting the preferred account for a given service requires both the service's guid (obtained via the BrowseRadioSources
command) and the account's guid (obtained via the BrowseServiceAccounts
command). Use both values when using the SetServiceAccount
command. Here, we select the pandora@example.com
account for the Pandora service.
Code Block |
---|
SetServiceAccount fbbcedb1-af64-4c3f-bfe5-000000000010 751b4184-589a-36e4-9637-b0df383c6ecc |
Subsequently, browsing the top menu for Pandora will be that account.
This command can also be latching per output. This means that it is possible to set a given account as default on a given output of an MMS. Do this by appending False
to the end of the above command. For example:
Code Block |
---|
SetServiceAccount fbbcedb1-af64-4c3f-bfe5-000000000010 751b4184-589a-36e4-9637-b0df383c6ecc False |
Clearing latched accounts for a service or all services on an output can be done with the following two commands:
Code Block |
---|
SetServiceAccount Service Clear False |
where Service
is replaced by the name or GUID of the streaming service
or
Code Block |
---|
SetServiceAccount Clear Clear False |
More details on this command can be found in this article.
Valid Browse Commands
BrowseAlbums
BrowseArtists
BrowseComposers
BrowseFavorites
BrowseGenres
BrowseNowPlaying
BrowsePicklist
BrowsePlaylists
BrowseRadioSources
BrowseTitles
BrowseTopMenu
Browse Top Menu
The BrowseTopMenu
command supports some non-standard uses. Simply, it can take an additional argument that is neither a start or count value to indicate that the request is actually for the content within a node available as a child to the default response. Subsequently, the picklist response can be handled like any other picklist. This greatly simplifies the handler requirements for a control client.
Code Block |
---|
BrowseTopMenu <PickList total="9" start="1" more="false" art="false" alpha="false" displayAs="List" caption="Home Menu"> <PickItem guid="fbbcedb16d796d75-af640000-4c3f0000-bfe50000-000000080000736963000000" name="RADIO.COMMy Music" dna="name" hasChildren="1" button="0" /> <PickItem guid="fbbcedb16d797072-af640000-4c3f0000-bfe50000-000000000008736574730000" name="SiriusXM Internet RadioFavorites" dna="name" hasChildren="1" button="0" /> <PickItem guid="fbbcedb172656365-af640000-4c3f0000-bfe50000-00000000010074756e656400" name="SpotifyRecently Tuned" dna="name" hasChildren="1" button="0" /> <PickItem guid="fbbcedb1-af64-4c3f-bfe5-000000004000000000000010" name="TIDALPandora Internet Radio" dna="name" hasChildren="1" button="0" /> <PickItem guid="fbbcedb1-af64-4c3f-bfe5-000000000020000000080000" name="TuneIn RadioRADIO.COM" dna="name" hasChildren="1" button="0" /> </PickList> |
To specify a different root, use BrowseTopMenu itemGuid=<childGuid>
.
Code Block |
---|
BrowseTopMenu itemGuid= <PickItem guid="fbbcedb1-af64-4c3f-bfe5-000000000010 <PickList total000000000008" name="85" start="1" more="true" art="true" alpha="false" displayAs="List" caption="Pandora Internet Radio"SiriusXM Internet Radio" dna="name" hasChildren="1" button="0" /> <PickItem guid="85b427d1fbbcedb1-c7d7af64-818c4c3f-b70cbfe5-bfa9670d647f000000000100" name="Account: pandora@example.comSpotify" dna="name" hasChildren="1" button="0" artGuid="fbbcedb1-af64-4c3f-bfe5-000000000010" /> <PickItem guid="ea03ab84fbbcedb1-c1bcaf64-3eb74c3f-c6e8bfe5-5e2317c616cb000000004000" name="Create a Pandora station...TIDAL" dna="name" hasChildren="1" button="0" singleInputBox="1" /> <PickItem guid="126e079cfbbcedb1-3c5baf64-8dad4c3f-017abfe5-9bc61ca8e7db000000000020" name="BrowseTuneIn Genre StationsRadio" dna="name" hasChildren="1" button="0" /> </PickList> |
To specify a different root, use BrowseTopMenu itemGuid=<childGuid>
.
Code Block |
---|
BrowseTopMenu itemGuid=fbbcedb1-af64-4c3f-bfe5-000000000010 <PickList <PickItem guidtotal="37313631-3533-3634-3736-35353839363285" namestart="Shuffle1" dnamore="nametrue" hasChildrenart="0true" buttonalpha="0false" artGuiddisplayAs="d2bafcd0-5068-5b5c-21bd-97daf2342342" /> List" caption="Pandora Internet Radio"> <PickItem guid="3938303385b427d1-3534c7d7-3633818c-3830b70c-373834393733bfa9670d647f" name="Gojira RadioAccount: pandora@example.com" dna="name" hasChildren="01" button="60" artGuid="082f3d18fbbcedb1-2b42af64-84344c3f-e303-67975034e45f" action="actionbfe5-000000000010" /> <PickItem guid="32323034ea03ab84-3139c1bc-32303eb7-3132c6e8-3036313430345e2317c616cb" name="Gunship RadioCreate a Pandora station..." dna="name" hasChildren="01" button="60" artGuidsingleInputBox="e93114a7-30d9-ea99-98d8-e375c0fecff1" action="action1" /> <PickItem guid="35363833126e079c-32353c5b-31378dad-3335017a-3536383739369bc61ca8e7db" name="MastodonBrowse Genre RadioStations" dna="name" hasChildren="01" button="6" artGuid="3a729b47-6af2-88b0-7224-d05b87afb7db" action="action0" /> <PickItem guid="3733353437313631-32343533-32323634-35303736-313637393031353538393632" name="ODESZA RadioShuffle" dna="name" hasChildren="0" button="60" artGuid="0f3611e8d2bafcd0-d0455068-fd685b5c-0c4f-4e167b1233fb" action="action21bd-97daf2342342" /> <PickItem guid="3537313639383033-37313534-34333633-31323830-373238343134373834393733" name="Dream TheaterGojira Radio" dna="name" hasChildren="0" button="6" artGuid="6156cf0c082f3d18-999d2b42-cdd78434-d588e303-04539efeba4e67975034e45f" action="action" /> <PickItem guid="3135353432323034-30373139-38313230-39353132-343430363337303631343034" name="ClutchGunship Radio" dna="name" hasChildren="0" button="6" artGuid="e93114a7-30d9-ea99-98d8-e375c0fecff1" action="action" /> <PickItem guid="35363833-3235-3137-3335-353638373936" name="Mastodon Radio" dna="name" hasChildren="0" button="6" artGuid="0618e9483a729b47-10226af2-f4d088b0-6089-365468554b21" action="action" /> </PickList> |
Presets
...
7224-d05b87afb7db" action="action" />
<PickItem guid="37333534-3234-3232-3530-313637393031" name="ODESZA Radio" dna="name" hasChildren="0" button="6" artGuid="0f3611e8-d045-fd68-0c4f-4e167b1233fb" action="action" />
<PickItem guid="35373136-3731-3433-3132-373238343134" name="Dream Theater Radio" dna="name" hasChildren="0" button="6" artGuid="6156cf0c-999d-cdd7-d588-04539efeba4e" action="action" />
<PickItem guid="31353534-3037-3831-3935-343430363337" name="Clutch Radio" dna="name" hasChildren="0" button="6" artGuid="0618e948-1022-f4d0-6089-365468554b21" action="action" />
</PickList> |
Initiating playback with Content
The end result of browsing content on MMS is, of course, the initiation of content playback.
Directly Addressable Content
Any directly addressable content (local content, presets, playlists, scenes) can be recalled at any time without context or prior browse. Use the Play<Container> <containerGUID>
command to do so. For example, to play an Album
, use PlayAlbum <albumGUID>
. For a Playlist
, use PlayPlaylist <playlistGUID>
. The full list of directly addressable content is as follows:
Albums
Artists
Composers
Genres
Playlists
Presets
Scenes
Titles
Modifying the Queue
Initiating playback with an existing queue can be done in several ways that allow for queue construction or replacement. The available options and each option’s protocol verb are:
Play Next (
Next
)Insert the addressed content after the currently playing track
Play Now (
Now
)Insert the addressed content after the currently playing track and perform a skip
Replace Queue (
Replace
)Replace the entire queue with the addressed content
Add To Queue (
AddToQueue
)Append the addressed content to the end of the queue
Add To Playlist (
AddToPlaylist
)Append the addressed content to the end of a playlist as selected from the subsequently provided menu
While all of these options are always available, the options are condensed to those unique actions and presented to the connected client in a number of ways. In other words, when the queue is empty, the only presented option is Now because there is nothing to modify. Sending Replace
in such a scenario would perform the same exact action as Now
. The list of options is communicated to the connected client via the LocalQueueOptions
status event or as a menu when indicating playback via the ClarifyTitleIntent
command. To ensure MMS knows the client supports this functionality, be sure to indicate as such by sending SetOption supports_playnow=true
during the preamble. See the Setting Additional Options section above for more details.
The intended option is communicated to the server by appending it to the end of the Play<Container>
command after the container’s GUID. For example, PlayAlbum c8507e3c-a5c0-4503-bd87-0b711580987e Replace
. For items where a listAction
is provided and that listAction
is ClarifyTitleIntent
, append the verb to the end of that command. For example, ClarifyTitleIntent 1609d2f0-b7c8-4996-9a48-4f434ad436e0 Next
. Leaving the verb off will result in a menu for the user to select from unless there is only one action available, in which case MMS will perform that action.
Presets
To store a Preset, use the StorePreset
command. This command takes an optional double-quoted name argument. If the name argument is specified, the MMS will store the Preset with that name. If no name is specified, the MMS will prompt for a name using an InputBox. InputBoxes are natively supported by all our control system drivers. As with all protocol commands, each command should be terminated with a carriage return and a line feed (\r\n).
Examples:
StorePreset
- This will be responded to with an InputBox from the server.
StorePreset "Party Time"
- This will save a Preset called Party Time
To recall a Preset, use the RecallPreset command. This command takes either the double-quoted name of the Preset or the unique ID of the Preset. To get either of these, please see the BrowseFavorites command, described below. Recalling a Preset will replace the state of the selected Instance with the state stored in the Preset. As with all protocol commands, each command should be terminated with a carriage return and a line feed (\r\n).
Examples:
RecallPreset "Party Time"
- This recalls the Preset by name
RecallPreset 9f9c8919-f939-d67a-dce2-cb049a4ead99
- This recalls the Preset by unique ID
Edit a preset with EditPreset nameOrId
Rename a preset with RenamePreset nameOrId newName
Delete a preset with DeletePreset nameOrId
To browse available Presets, use the BrowseFavorites
or BrowsePresets
commands. This Browse command adheres to the same pattern as all other Browse commands.
This feature was once called Snapshot.
Relevant Events
There are some events that indicate changes to favorites to the control client.
FavoritesChanged
will be sent whenever any change is made to any preset. It will always be true
. Simply receiving it is sufficient to rebrowse presets.
FavoritesCount
will be sent whenever the number of presets changes.
FavoritesCount
differs from FavoritesChanged
in that it will only be sent when a preset is added or deleted while FavoritesChanged
includes name changes.
Scenes
To store a Scene, use the StoreScene
command. This command takes an optional double-quoted name argument. If the name argument is specified, the MMS will store the Preset Scene with that name. If no name is specified, the MMS will prompt for a name using an InputBox. InputBoxes are natively supported by all our control system drivers. The scene will save with the currently playing content for the selected instance in the currently playing Zones alternatively current instance at the current volume levels. As with all protocol commands, each command should be terminated with a carriage return and a line feed (\r\n).
Examples:
StorePreset
StoreScene
- This will be responded to with an InputBox from the server.
StorePreset StoreScene "Party Time"
- This will save a Preset Scene called Party Time
To recall a PresetScene, use the RecallPreset RecallScene command. This command takes either the double-quoted name of the Preset Scene or the unique ID of the PresetScene. To get either of these, please see the BrowseFavorites BrowseScenes command, described below. Recalling a Preset will Scene will turn on and set the volume in the Zones/Instance contained in the Scene and replace the state of the selected Instance instance with the state stored in the Presetthe Scene. Note that when using Autonomic amps, the instance for playback might be different from the currently selected instance. As with all protocol commands, each command should be terminated with a carriage return and a line feed (\r\n).
Examples:
RecallPreset RecallScene "Party TimeDinnerTime"
- This recalls the Preset Scene by name
RecallPreset RecallScene 9f9c8919-f939-d67a-dce2-cb049a4ead99
- This recalls the Preset Scene by unique ID
Edit a preset with EditPreset nameOrId
Rename a preset with RenamePreset nameOrId newName
Delete a preset with DeletePreset nameOrId
To browse available Presets, use the BrowseFavorites
or BrowsePresets
commands. This Browse
Delete a Scene with DeleteScene nameOrId
Relevant Events
There are some events that indicate changes to scenes to the control client.
ScenesChanged
will be sent whenever any change is made to any scene. It will always be true
. Simply receiving it is sufficient to rebrowse scenes.
ScenesCount
will be sent whenever the number of scenes changes.
Playlists
Playlists are browsed with BrowsePlaylists
. This command adheres to the same pattern as all other Browse commands.This feature was once called Snapshot.
Rename a playlist with RenamePlaylist oldName newName
Delete a playlist with DeletePlaylist nameOrId
Reorder tracks within a playlist with ReorderPlaylist playlistId srceTrackId destTrackId
A playlist can be directly played with PlayPlaylist nameOrId
Relevant Events
There are some events that indicate changes to favorites to the control client.
FavoritesChanged
PlaylistsChanged
will be sent whenever any change is made to any presetplaylist. It will always be true
. Simply receiving it is sufficient to rebrowse presetsplaylists.
FavoritesCount
PlaylistCount
will be sent whenever the number of presets playlists changes.
FavoritesCount
PlaylistCount
differs from FavoritesChanged
PlaylistsChanged
in that it will only be sent when a preset playlist is added or deleted while FavoritesChanged
PlaylistsChanged
includes name changes.
Playlists
...
Now Playing
The now playing queue can be browsed with BrowsePlaylists
. This command adheres to the same pattern as all Browse commands.
Rename a playlist with RenamePlaylist oldName newName
Delete a playlist with DeletePlaylist nameOrId
Reorder tracks within a playlist with ReorderPlaylist playlistId srceTrackId destTrackId
A playlist can be directly played with PlayPlaylist nameOrId
Relevant Events
There are some events that indicate changes to favorites to the control client.
PlaylistsChanged
will be sent whenever any change is made to any playlist. It will always be true
. Simply receiving it is sufficient to rebrowse playlists.
PlaylistCount
will be sent whenever the number of playlists changes.
PlaylistCount
differs from PlaylistsChanged
in that it will only be sent when a playlist is added or deleted while PlaylistsChanged
includes name changes.
Now Playing
The now playing queue can be browsed with BrowseNowPlaying
. Only browse the queue if the BrowseNowPlayingAvailable
event is true
.
All now playing indexes are 1 based.
Change songs by using JumpToNowPlayingitem <indexOfItem>
.
Reorder the queue with ReorderNowPlaying <indexOfTrackToMove> <indexToMoveTo>
.
Remove a song with RemoveNowPlayingItem <indexOfTrackToRemove>
.
Clear the queue with ClearNowPlaying
BrowseNowPlaying
. Only browse the queue if the BrowseNowPlayingAvailable
event is true
.
All now playing indexes are 1 based.
Change songs by using JumpToNowPlayingitem <indexOfItem>
.
Reorder the queue with ReorderNowPlaying <indexOfTrackToMove> <indexToMoveTo>
.
Remove a song with RemoveNowPlayingItem <indexOfTrackToRemove>
.
Clear the queue with ClearNowPlaying
. Passing False
as an argument will clear the queue and stop playback of any station based content. Passing True
or no argument will clear the queue and stop any queue based content from playing back but will not disrupt playback for station based content.
Triggers
Some servers are equipped with Input and Output Triggers. Input triggers are activated by adding a voltage to the input pin (5 -24V AC or DC). Output triggers will supply a voltage on the output pin (12VDC 100mA max).
Relevant Commands
Turn on/off an output trigger with SetOutputTrigger <indexOfTrigger> <true/false>
, where <indexOfTrigger>
is in trigger order independent of the trigger label. IE. Trigger Out A would have <indexOfTrigger>
of 1.
Example:
Turn on Trigger Out A: SetOutputTrigger 1 true
Turn off Trigger Out C: SetOutputTrigger 3 false
Relevant Events
There are some events for Input Triggers. Each Input Trigger does have one event, TriggerIn1 through TriggerIn<x>
, where the event is true when voltage is applied to the input pin.
Album Art
BaseWebUrl
provides the protocol, address, and port portions of the URL to retrieve art from. For example: <httphttp://192.168.0.59:5005
.>
The specific handler on the MMS is called getart
so an example of a base for retrieving art would be <httphttp://192.168.0.59:5005/getart?...
. > Always include the ID of the item. If constructing the URL manually rather than using the value of BaseWebUrl
, it is acceptable to leave the port off the request. For example http://192.168.0.59/getart?...
. Requests for /getart
on port 80
are processed the same as requests on port 5005.
To construct the full URL to get art, use the above values along with the below options.
Option | Purpose | Possible Values |
---|---|---|
c | constrain | 0=size image to fit height and |
width 1=constrain to dimension and maintain aspect ratio | ||
guid | unique id of the album, artist, genre, title, etc | |
fmt | image format. Valid values are | |
instance | the instance GUID | |
h | image height | |
w | image width | |
rfle | reflection elevation | |
rflh | reflection height | |
rflo | reflection opacity | |
rz | reflection rotation (z axis) |
JSON HTTP API
General Information
...