How can I create a Compatible Remote Bridge for a Dune media...

Expand / Collapse
 

How can I create a Compatible Remote Bridge for a Dune media player?


Question:

How can I create a 'Compatible Remote Bridge' for a Dune media player, to intercept remote events, allowing for light, curtain or device power controls?

Answer:

The My Movies mobile applications in their remote control functionalities supports a device type called 'Compatible Remote Bridge', which is a device type created to allow a third party control server or the My Movies for Windows software packages (available from My Movies for Windows Media Center and My Movies Collection Management 4.06 Pre Release 3 or My Movies Home and Essentials Server Solution 2.14 Pre Release 3) to act as a middle station for remote commands send by the mobile applications.

This means that the mobile application connects to the 'Compatible Remote Bridge' device, which can provide informations about one or more players that can be controlled through the bridge. The mobile application then sends the commands to the bridge, which forwards the command to the respective player, and sends the response from the player back to the mobile application. For the user, this looks exactly as if the mobile application was connected directly to the player, but it allows the bridge to react on certain button presses, allowing it to pass controls such as volume controls to a receiver or a TV, instead of to the player, or, it allows for the bridge to capture playback events, to control lights or curtains.

The My Movies Collection Management, My Movies for Windows Media Center and My Movies Home and Essentials Server Solution software packages can all function as a remote bridge, allowing for it's build-in event handling functionality to pass volume controls to the supported receivers and television sets, but partners can also implement a remote bridge for their own solutions.

The remote bridge currently supports Dune media players only, but is planned to be extended in the future. The documentation here therefore focuses on how to create a bridge for the Dune player.

Through "Settings", "Remote Control" in the My Movies mobile applications, the user enables the remote control functionality, and select to add a player. In the list of players, the user selects "Compatible Remote Bridge", which allows the user to add a name for the bridge, and the IP address for the bridge. The name in this relation is used only to be able to identify the bridge in the mobile application in case the user would like to remove it later. The mobile application now connects to the IP address on port 51414, which is currently a fixed port that the bridge must operate on - it is planned that the port can be configured in the future. Notice also that the port 51414 is used by the My Movies software packages, meaning that third party bridges cannot currently operate on the same computer that holds a My Movies for Windows installation.

Notice! We will throughout the examples use the IP address "192.168.1.100" as example of the IP address of the remote bridge. The IP address can be any IP address on the network, which the remote bridge operates on.

Initially, the mobile application sends the following to the remote bridge:

http://192.168.1.100:51414/?command=listremotebridgedevices

The response from the bridge must be an XML document, with the following layout:

<Response status="ok">
  <Device Type="DuneFull" Name="Zone or Player Name"/>
</Response>

There can be multiple "Device" elements in the response. The options for Type is currently "DuneFull", "DuneMedium" or "DuneSimple", where full, medium or simple is the button layout of the device. Please try to connect a mobile application directly to a Dune player to see the differences in layout between the full, medium and simple layouts.

The listed devices will now become available in the "Remote" area of the mobile application. The mobile application send the following command when the user selects a player to control:

http://192.168.1.100:51414/?command=sendremotebridgedevicecommand&device=Zone%20or%20Player%20Name&commandstring=cmd%3Dstatus

The bridge now must connect to the device, and send the command included in the "commandstring" parameter. The "commandstring" parameter is URL encoded, meaning that "cmd%3Dstatus" is decoded to "cmd=status". The bridge then sends back the response from the device in the following way:

<Response status="ok" custombuttons="False">
    <command_result>
        <param name="protocol_version" value="3"/>
        <param name="player_state" value="standby"/>
    </command_result>
</Response>

The "Response" node of the response is created by the bridge, where the "command_result" XML content of the node is the direct reply from the Dune player. If the "commandstring" command is "cmd=status", which is the initial player status request, the bridge must include the attribute "custombuttons" on the Response node - this instructs the mobile application if the bridge has custom buttons for the device. If the parameter "custombuttons" is "True", the mobile application sends the following command:

http://192.168.1.100:51414/?command=listcustombuttons&device=Zone%20or%20Player%20Name

The bridge device must respond with the custom buttons it has for the device in the following form:

<Response status="ok">
    <Button Name="Button1" Label="Lights On" Group="Lights">
    <Button Name="Button2" Label="Lights Off" Group="Lights">
</Response>

The attribute "Name" contains the internal name of the button, which is also the button name that the mobile application will send to the bridge when the button is pressed. The "Label" attribute contains the label displayed below the button on the mobile application, while the "Group" attribute is not yet supported, it's intention is that you can avoid all buttons to be played in one big list on the layout, but you instead can let the mobile application show each button group separately, which as one group for lights, and another group for curtains.

Once a custom button is pressed, the mobile application sends the following command to the bridge:

http://192.168.1.100:51414/?command=sendcustombutton&device=Zone%20or%20Player%20Name&button=Button1

The bridge then must reply in the following form:

<Response status="ok"></Response>
or
<Response status="failed">The button press can result in a message displayed to the user if the press failed, which is a clear text written in the response node.</Response>

Each time a user presses a button on the remote control, the button press is sent to the bridge, which sends it to the Dune, and sends back the response from the Dune to the mobile application. 

It is recommended to always return the direct response from the Dune player, but there are also situations where the command is intercepted by the bridge, and never send to the Dune player, in situations such as volume control commands, in which case the bridge simply responds with:

<Response status="ok"></Response>

If you prefer to develop your own remote bridge device, or if you have an always available server running one of the My Movies for Windows software options, and therefore prefer to use My Movies for Windows as the bridge is up to you.

Should you choose to use My Movies as bridge device, you can instead create Event Handler plug-in DLL files to react to the events that My Movies traps in the communication with the Dune player.

Technically, the mobile applications will send the commands "status", "launch_media_url" and "ir_code" to the Dune, meaning that all button events can be intercepted by catching one of these parameters. The individual button codes is listed in the Dune IP Control documentation.




Rate this Article:


Comment require login or registration.

Details
Last Modified:10-02-2014 08:42:35

Last Modified By: Administrator

Type: FAQ

Rated 2 stars based on 2 votes.

Article has been viewed 4.356 times.

Options