Difference between revisions of "Frontend control socket"

From MythTV Official Wiki
Jump to: navigation, search
m (Added link to RemoteKommander Application)
Line 26: Line 26:
  
 
   [http://www.luckies.nl/remotekommander/ RemoteKommander]
 
   [http://www.luckies.nl/remotekommander/ RemoteKommander]
 +
 +
 +
The command set was expanded in Changeset 12907 (by Chris Pinkham)
 +
 +
Changeset: http://cvs.mythtv.org/trac/changeset/12907
 +
 +
Modified:
 +
 +
trunk/mythtv/programs/mythfrontend/networkcontrol.cpp
 +
 +
Log:
 +
 +
Network Control socket interface changes.
 +
 +
Add some new valid keys. The list:
 +
home, end, return, tab, backtab, insert, delete, plus, comma, minus,
 +
period, numbersign (aka poundsign), dollar, percent, ampersand, parenleft,
 +
parenright, asterisk, question, bar, pipe, and F13 through F24. This also
 +
adds the ability to use the actual symbol for mose of these such as "key +"
 +
instead of having to type "key plus".
 +
 +
Add the ability to send key combinations such as CTRL+B, ALT+F, etc.. The
 +
four supported modifiers are CTRL, ALT, SHIFT, and META and they can be
 +
used individually such as CTRL+B or together such as CTRL+ALT+B.
 +
 +
Fix some minor bugs related to case conversion, previously the code would
 +
lower() the whole input command and then uppercase the few places that
 +
needed it such as when passing a Qt::ISODateTime, now we just lower() when
 +
comparing things that need case-insensitive comparisons.
 +
 +
For debugging purposes, add the ability to sleep in the middle of a key
 +
combination. You can now use the keyword 'sleep' to sleep one second in
 +
the middle of a key command. Here's a not-so-useful example:
 +
"key down down sleep down enter"

Revision as of 20:36, 8 March 2007

Release 0.19 of MythTV introduced the ability to control mythfrontend via a socket interface. Commands are sent and replies are received in text mode, there is no fancy xml interface or anything - it is meant to be able to be used via something as simple as telnet.

This feature has to be enabled in the general settings of the frontend setup. The default port is 6546, so after restarting mythfrontend, you can test by telnetting to localhost on port 6546 ("telnet localhost 6546"). For a list of supported commands, type "help". For help on a specific command, type "help COMMAND" (where COMMAND is the name of the command like "help jump").

There can be only one socket connection to mythfrontend at a time, if a new connection is opened, the old one will be automatically closed.

See also MythTV docs on Telnet socket

[source: Changeset 8688 ]



Here is an example of how you can use the telnet port to run the MythTV frontend.

 Controlling MythTV from a DirectTV D11 remote

Here is an example of how you can use the telnet port and a Nokia N80 to run the MythTV frontend.

 MythTV Mobile Remote

Here is an example of how you can control a remote frontend using the telnet socket using Kommander (http://kommander.kdewebdev.org/)

 RemoteKommander


The command set was expanded in Changeset 12907 (by Chris Pinkham)

Changeset: http://cvs.mythtv.org/trac/changeset/12907

Modified:

trunk/mythtv/programs/mythfrontend/networkcontrol.cpp

Log:

Network Control socket interface changes.

Add some new valid keys. The list: home, end, return, tab, backtab, insert, delete, plus, comma, minus, period, numbersign (aka poundsign), dollar, percent, ampersand, parenleft, parenright, asterisk, question, bar, pipe, and F13 through F24. This also adds the ability to use the actual symbol for mose of these such as "key +" instead of having to type "key plus".

Add the ability to send key combinations such as CTRL+B, ALT+F, etc.. The four supported modifiers are CTRL, ALT, SHIFT, and META and they can be used individually such as CTRL+B or together such as CTRL+ALT+B.

Fix some minor bugs related to case conversion, previously the code would lower() the whole input command and then uppercase the few places that needed it such as when passing a Qt::ISODateTime, now we just lower() when comparing things that need case-insensitive comparisons.

For debugging purposes, add the ability to sleep in the middle of a key combination. You can now use the keyword 'sleep' to sleep one second in the middle of a key command. Here's a not-so-useful example: "key down down sleep down enter"