Adding Remote Control Functionality
Page: 1/8
As part of our MythTV tutorial we installed MythWeb. Doing so is pretty easy and we will repeat the instructions here. However we want to go beyond that.
MythWeb does a great job of managing recordings and recorded shows as well as showing program and movie listings. These features depend primarily upon the mythbackend database. We want to go beyond that and control mythfrontend. mythfrontend doesn't have any direct, programatic means of control. It's only means of control is the user interface. The user interface accepts mouse and keyboard inputs so we can exercise some programatic control by simulating keyboard events. This is how an infrared remote works with MythTV.
One weakness of this approach is this - its strictly one way. We can tell mythfrontend to do things but we can't ask anything. This matters because the things we can tell it to do, that is the commands we can invoke, depends on what mythfrontend is doing. For example, a slightly different set of commands are available if we are watching live TV versus watching a recording. In programming terms we call “what mythfrontend is doing” its “state” and would like the ability to query mythfrontend for its state. That way we could display the appropriate UI for the commands available in its current state. The same problem exists for other remotes so we're no worse off. Just venting a little.
We will start off installing Apache 2 and MythWeb v0.17. These instructions are repeated from the MythTV tutorial and assume you are running Gentoo Linux. You can skip ahead if you already have these installed.