Frontend Service

From MythTV Official Wiki
Revision as of 00:36, 22 November 2011 by Wagnerrp (talk | contribs) (add category)

Jump to: navigation, search

Important.png Note: Unlike other services, the Frontend Service runs on frontend systems. The default Frontend Service API port is 6547.

Frontend Service API List

API Command POST Required? Description
GetStatus No Get the location, playback status, and a variety of other information about the current state of the Frontend.
SendMessage No Send a message to the frontend, which will appear as a popup message on the screen.
SendAction No Send an action such as UP, DOWN, SELECT, etc. to the frontend.
GetActionList No Get a list of actions which can be performed on the frontend using SendAction.

Frontend APIs


The GetStatus API takes no arguments.

Example Query:


Example Return:

<FrontendStatus version="1.0" serializerVersion="1.1">
        <String key="behindtime"/>
        <String key="chanid">34750</String>
        <String key="chapteridx">1</String>
        <String key="description">0:25:25 of 1:02:25</String>
        <String key="playedtime">0:25:25</String>
        <String key="position">407</String>
        <String key="progafter">0</String>
        <String key="progbefore">0</String>
        <String key="programid">EP012968460038</String>
        <String key="remainingtime">37:00</String>
        <String key="starttime">2011-11-14T17:59:00</String>
        <String key="state">WatchingPreRecorded</String>
        <String key="subtitle">Free Rick</String>
        <String key="title">American Chopper: Senior vs. Junior</String>
        <String key="titleidx">1</String>
        <String key="totaltime">1:02:25</String>


The SendMessage API takes the following arguments:

Message (Required)
Parameter Type: String
The message to appear on the frontend popup.

Example Query:

http://FrontendIP:6547/Frontend/SendMessage?Message=Hello World!

Example Return:

Boolean return. Returns true if the message was sent, false if the message failed.



The SendAction API takes the following arguments:

Action (Required)
Parameter Type: String
The action name to be sent to the frontend.
File (Required)
Parameter Type: String
The filename output where relevant (currently only used for the SCREENSHOT action).
Width (Required)
Parameter Type: Integer
The width of the output where relevant (currently only used for the SCREENSHOT action).
Height (Required)
Parameter Type: Integer
The height of the output where relevant (currently only used for the SCREENSHOT action).

Example Query:


Example Return:

Boolean return. Returns true if the action was accepted, false if the action failed.



The GetActionList API takes no arguments.

Example Query:


Example Return:

<?xml version="1.0" encoding="UTF-8"?>
<FrontendActionList version="1.0" serializerVersion="1.1">
        <Action key="0">0</Action>
        <Action key="1">1</Action>
        <Action key="2">2</Action>
        <Action key="3">3</Action>
        <Action key="4">4</Action>
        <Action key="5">5</Action>
        <Action key="6">6</Action>
        <Action key="7">7</Action>
        <Action key="8">8</Action>
        <Action key="9">9</Action>
        <Action key="ADJUSTSTRETCH">Turn on time stretch control</Action>
        <Action key="ARBSEEK">Arbitrary Seek</Action>
        <Action key="BACK">Exit or return to DVD menu</Action>
        <Action key="BACKSPACE">Backspace</Action>
        <Action key="BIGJUMPFWD">Jump forward 10x the normal amount</Action>
        <Action key="BIGJUMPREW">Jump back 10x the normal amount</Action>
        <Action key="BLANKSCR">Blank screen</Action>
        <Action key="BOTTOMLIST">Move to bottom of list</Action>
        <Action key="BROWSE">Change browsable in video manager</Action>
        <Action key="Burn DVD">Burn DVD</Action>
        <Action key="CANCEL">Cancel news item updating</Action>
        <Action key="CHANGEGROUPVIEW">Change Group View</Action>
        <Action key="CHANGERECGROUP">Change Recording Group</Action>
        <Action key="CHANNELDOWN">Channel down</Action>
        <Action key="CHANNELUP">Channel up</Action>
        <Action key="CHANUPDATE">Switch channels without exiting guide in Live TV mode.</Action>
        <Action key="CLEARMAP">Clear editing cut points</Action>
        <Action key="CLEAROSD">Clear OSD</Action>
        <Action key="COPY">Copy text from textedit</Action>