
	Automation MediaPortal Process Plugin
	=====================================

This plugin enables MediaPortal to be driven by anything that can send strings
over TCP/IP sockets.

A response is sent (but can be ignored) and anything that does not end with a '!'
has succeeded.


The general format of the string sent is -
	<Request Opt="Arg"/>

Opt is one of -
	Command, Key, Press, Run, Screen, Speak

Arg depends on the Opt.


Command Args -
	Quit - closes the connection cleanly
	Store - saves subsequent requests until a Quit received


Key are just the remote button keys, Args -
	Back, Down, Enter, Home, Left, Mute, OK, Pause,
	Play, record, Resume, Return, Right, Stop, Up, 
	Volume Down, Volume Up

Press Arg is the label on the button (on the currently active screen)
to press. If the button does not exist it is a no-op.


Run allows running a named stored sequence or an external Bat/Cmd file.

The path to the Bat/Cmd file is an option in the configuration
screen (More/F9 while on New button).


Screen is similar to Press but here the button is the name of a
top-level menu option.

Speak uses TTS to speak out the supplied argument string.


To use, just send the XML fragments that correspond to the action
you would do if you were using the remote control 
with some additional functionality.


For example sending -
	<Request Screen="TV"/>
	<Request Press="Channel"
	<Request Press="BBC One"

Will turn on the TV to BBC One.

Note that it does not matter what TV Group 'BBC One' is in, it will
find the channel regardless.


It is possible to test this using Telnet or the Automator plugin.

The default port number is 6573 (can be changed using the 
Automator windows plugin, see below).





	Automator MediaPortal Windows Plugin
	====================================

This windows plugin provides a way to test and demonstrate
the use of the Automation Process plugin from within
MediaPortal.

It can drive both itself and a remote MediaPortal 
(as long as the Automation plugin is installed).

It allows the Automation plugin options to be changed 
from inside MediaPortal (requires a restart).


The main screen has just a New button, this allows a 
named automation sequence script to be created.

Pressing More/F9 while on New brings up the Automation 
configuration screen.

Here there are two options
	Port - port on which the automation plugin listens
	Path - path to any external Bat/Cmd files

	Save - saves the changes


The [New] script window has buttons for -
	Name - just identifies the sequence
	Host/Port - for driving a remote MP Automation plugin
	Description - just a reminder shown at the bottom of the main screen
	List entries - for entering Opt="Arg" part of the request

Click on any of these to bring up an on-screen keyboard and
enter/change the values.

There is no need to enter the Command="Store", Command="Quit"
requests as these are automatically added when the requests 
are sent.


When finished, press Save, this stores it in the Automation 
options file. (There is also a Delete button allowing unwanted 
script sequences to be deleted.)

This will return to the main screen where the new script is 
now in the list.

Pressing the list button will execute the script.

Moving onto the list and pressing More/F9 will return to the 
script window allowing changes to be made or the sequence to 
be deleted.




	Installation
	============

On XP if your MediaPortal paths are defaulted then just run the SetUp.Cmd
If the paths have been changed (or you are installing on Vista/7) 
then the Cmd file will need to be edited to change the Doc and Prog paths.

The installation consists of copying two dlls (one process, one windows)
and three screen XML files.
