Modifications‎ > ‎

MythXML Module for MythWeb

posted 1 Dec 2010, 02:31 by David Whyte   [ updated 1 Dec 2010, 03:54 ]
Since having an Android phone (HTC Hero) I have been looking for a project to scratch my Android development itch.  I decided that it would be useful to have a basic mythTV frontend that runs on my phone and would allow to view recorded programs, view the guide, schedule recordings or even delete them.

Similar Android applications are out there (mythdroid), but I wanted something that I could use outside of my LAN and mythdroid relies on being able to access your backend to talk mythprotocol to it.  I also had the goal of not forcing the user to install anything on their mythTV server to allow communications with the backend.  This was pretty much impossible.

A happy medium was to create a new self-contained module for mythweb, which provides access to the MythXML API provided by a master backend.

Installation

  1. Download the attached mythxml.tar file.
  2. Untar the file into your mythweb/modules/ directory (e.g. /var/www/mythweb/modules/)on your mythweb server.
  3. If you have set-up Digest type authentication for your mythweb installation, you need to bypass this to allow access to your mythxml module without entering a password (don't worry, we restrict access to the module in subsequent steps).  To bypass authentication, add the following three lines to the top of your mythweb.conf file (e.g. /etc/apache2/sites-enabled/mythweb.conf):
    <LocationMatch .*/mythxml/.*>
        Allow from all
    </LocationMatch>
  4. Restart your web-server by issuing the command sudo /etc/init.d/apache2 restart.
  5. In a browser, go to your installation of mythweb and locate the Settings page.  Here you should have a new entry down the left-hand-side titled 'MythXML'.
  6. Select the MythXML entry so that you should see the following new settings page:
  7. Configure the following:
    • Enable MythXML - Whether the MythXML module is even enabled.  If not checked, you won't be able to access the data on the mythbackend via the MythXML module.
    • Disable Putters - Whether you can call the 'Put' portions of the MythXML API.  If not checked, you won't be able push data to the mythbackend, only retrieve data using the MythXML module.
    • Access Key - This is a simple and plain text key that must be provided to gain access to any data via the MythXML module.
  8. Save the settings.

Accessing MythXML

From a browser, you should be able to access your backend's MythXML API now by making a HTTP request to a URL such as the following:

For a full list of supported MythXML pages, refer to the mythTV wiki page on MythXML.

Notes/Issues

  • Translation strings currently aren't supported.  Hence the garbled text in the screenshots above.
  • Setup described above is based on mythbuntu 10.04 running mythTV 0.23-fixes and the apache web-server.
  • It is intended to persuade the mythTV developers to include this as a new module in a future release of mythTV.  Work will likely need to take place for this to happen.  It may not be accepted at all.
  • You can add new (and therefore, currently unsupported MythXML pages by creating a PHP script which returns XML.  I.e. to create a new command call GetNonNative, you simply create a new file /var/www/mythweb/modules/mythxml/GetNonNative.php and have it print out XML when called.
ċ
mythxml.tar
(20k)
David Whyte,
1 Dec 2010, 03:46
Comments