Have a Mac OS MythTV Frontend, and a DVICO remote control and USB receiver? Like them to work together? This blog post may help you.
I have the above scenario and was looking for a way to remote control an old Power Mac G4 (circa 2001) running MythTV as a frontend. The machine does a stellar job running my 42″ Fujitsu Plasma panel, however the inconvenience of having to get off my arse to fast forward advertisements was just too much. So I searched around and found the wonderful DVICO Remote Application for Mac OS by Peter Wyss. The way DVICO Remote works is to call an Applescript each time a remote button is pressed. The Applescript is passed some parameters from the DVICO USB Receiver driver (also by Peter) which it then uses to determine which remote button was pressed. The Applescript then simply performs an action based on the remote button. The Applescripts provided by Peter supported only iTele and iTunes, neither of which I was using. So I read through Peter’s Applescripts and did some Google searches. I found Applescript to be a very cryptic and difficult language to learn, due to the scattered and sketchy online documentation it has – unless of course purchasing a book. I’m too cheap for that. Anyway, after a little frustration and hair pulling, I created an Applescript that would translate DVICO remote control buttons into instructions for a MythTV Frontend on a Mac.
The script cannot be uploaded to my blog, so it is linked to my Dropbox account. After downloading the .scpt file, copy it over the IrRemote.scpt file located in Peter’s DVICO Remote Control Application. The path is:
Then point and shoot.
Peter also has instructions on his website for replacing the default Applescripts with custom ones.
If anyone finds this script useful, I’d love to hear from you. Leave me a message at the bottom of this post. 🙂
Worked like a charm. Thanks for all the legwork. I was able to use your script as a basis and modify it to work with Boxee.
Glad you found the script useful. Now I’ll have to google Boxee as I have never heard of it before. 🙂
Yea, AppleScript documentation is pretty weak. You can really cut down the number of lines in your script with a subroutine, though. You’d put something like this after the last line of your current script:
tell application “MythFrontend” to activate
tell application “System Events” to key code aKeyCode
Then you can replace, say, the “Power on/off” code with this:
if buttonPressed is “10” then — power on/off button
else if buttonPressed is “31” then –play/pause
else if buttonPressed is “64” then
tell application “MythFrontend”
tell application “System Events”
key code 15 using control down — Ctrl-R
else if . . . .
I’m sure you get the idea. It should make it much easier to maintain.