Problem Description

I want to dedicate a given output to a specific user's account on a streaming service.

Considerations:

Solution

Before setting a default service account, be sure to select the target instance using the SetInstance command. For example:

SetInstance Player_A

See the Connecting section of the main protocol document for more details.

The control protocol has a command called SetServiceAccount. This command takes two arguments, the Service Name and the Account Name.

SetServiceAccount <ServiceName> <AccountName>

For example: SetServiceAccount Pandora john@smith.com

To see how this command can make semi permanent changes, see the end of this article as it depends on the firmware version running on the MMS.

In order to do this programmatically, it may be necessary to retrieve a list of all service accounts available on the server. To do this, there is a command BrowseServiceAccounts that operates just like any other browse command where it takes a <start> and <count> argument. There is an additional, optional third argument where a specific service can be specified by name or GUID.

For example:

BrowseServiceAccounts 1 10 would retrieve 10 accounts starting at 1.

BrowseServiceAccounts 11 10 would retrieve 10 accounts starting at 11.

BrowseServiceAccounts 1 5 Pandora would retrieve up to 5 Pandora accounts, if any exist.

A standard response would look like:

BeginServiceAccounts Total=4 Start=1 Alpha=0 Caption="ServiceAccounts"
  ServiceAccountInfo {288be067-d458-348d-41ac-d8c2a0aeb68f} "autonomic-controls@deezer.com" "Deezer" "-1" "" "" ""
  ServiceAccountInfo {751b4184-589a-36e4-9637-b0df383c6ecc} "demo@autonomic-controls.com" "Pandora" "-1" "" "" ""
  ServiceAccountInfo {cef56813-4618-7616-1ee3-767039265a72} "development@autonomic-controls.com" "Rhapsody" "-1" "" "" ""
  ServiceAccountInfo {034d5a69-f802-794e-8388-09866a85a252} "autotidal1" "TIDAL" "-1" "" "" ""
EndServiceAccounts NoMore

In XML mode, the response looks like:

<ServiceAccounts alpha="false" art="false" displayAs="List" more="false" start="1" total="4">
    <ServiceAccountInfo button="0" dna="name" guid="288be067-d458-348d-41ac-d8c2a0aeb68f" name="autonomic-controls@deezer.com" service="Deezer"/>
    <ServiceAccountInfo button="0" dna="name" guid="751b4184-589a-36e4-9637-b0df383c6ecc" name="demo@autonomic-controls.com" service="Pandora"/>
    <ServiceAccountInfo button="0" dna="name" guid="cef56813-4618-7616-1ee3-767039265a72" name="development@autonomic-controls.com" service="Rhapsody"/>
    <ServiceAccountInfo button="0" dna="name" guid="034d5a69-f802-794e-8388-09866a85a252" name="autotidal1" service="TIDAL"/>
</ServiceAccounts>

As with all MMS control commands, it must be sent to port 5004 on the MMS. It must be followed by a carriage return and a line feed. Once sent, simply browse the service in question normally and the specified account will be preselected for you.