...
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.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 | Preliminary 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 | ||||
---|---|---|---|---|
|
...
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
, 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.
...
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.
...
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.
...
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.
Album Art
...
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.
...