Scripts

IRWatch

This is a script that was designed to monitor lirc for IR input and then perform actions when certain button combinations are performed. The types of events it can monitor for include:
  • Button sequences (ex: Play-Play-Enter)
  • Held button duration (ex: Play button held 1.5 seconds)
  • Repeat count (ex: Play button held for 5 repeats)
The responses to events can depend on the current state of mythfrontend. The script has the ability to connect to the Network Control Port (NCP), issue commands, and return responses. The script has built in functionality for quickly checking the frontend's location ('query location'), as well as special handling for a few special cases (playing anything, a recorded program, live tv, a dvd, or a video), however it can handle any command supported by the NCP.

The response taken to an event can include:
  • Sending a command to the NCP (ex: a key or a jumppoint)
  • Executing an external script (via perl's system command)
  • Any arbitrary perl code
This script can be used for many purposes. A few examples demonstrated in the script
  • Rebooting/halting the machine via secret key combination not likely to be hit on accident
  • A better guide button, which displays the appropriate guide depending on what you are doing, and also closes the guide if pressed again
  • Sending multiple commands at a time to load or unload the commercial cutlist with a single keypress
  • Skipping to the beginning/end of the recording if a skip button is held. This is somewhat similar to tivo's skip to end, but better since you can't easily do it by accident
  • Emulating the functionality of the tivo button on a tivo remote (which alternates between jumping to main menu and the now playing list)
Version 2 has been improved to make it easier to configure, as well as to write custom plugins and easily share them with other users. The current plugins included are:
More details about this script can be found in the IRWatch version 2 blog entry

Current Version - 2.03

Download IR Watch
RFLibs modules also required

Aquos Server


RFLibs


Ceton CCI Scanner


Myth HDHomerun Scanner



MythTV Patches

Ceton InfiniTV 4 support

MythUI ButtonTree with customizable columns


ButtonList Trigger Events

In Myth 0.21, when in the Watch Recordings screen, pressing the right arrow key while a program was highlighted would display the menu where you can chose a number of option for the selected recording (transcode, delete, stop recording, etc). In 0.22, one of the side effects of allowing horizontally laid out themes is that this functionality no longer works, and from what I've read there are no intentions to mimic the old behavior. I'm not quite interested in reconfiguring my remote button mappings to deal with the new setup, so I've written a patch to add that behavior back.

This time, the behavior is themable, so a vertically laid out theme can have it triggered by the right arrow, and a horizontal theme can have it's choice of triggering with either an up or down arrow. In fact, the design is quite a bit more customizable, so that you can have any ButtonList trigger any event in response to a different event. You simply add one additional tag to your buttontree. Here's an example:

<triggerevent context="Global" action="INFO">RIGHT</triggerevent>

This says that anytime the buttonlist is responding to a "RIGHT" action event, instead of the normal processing it's going to lookup the key assigned to the "Global" action named "INFO" and trigger a keypress event for that action. If you set context and/or action to an invalid value, then the assigned keypress will disappear into thin air without generating a corresponding event. This would be useful if you don't want the LEFT key in the left buttonlist to wrap focus around to the right buttonlist. So, for example:

<triggerevent context="" action="">LEFT</triggerevent>

This patch can be applied to 0.24-fixes. I have not currently submitted this patch for inclusion in mythtv.

Download the ButtonList TriggerEvent patch
Download an example theme patch