Posted by Daz Tue, 13 May 2008 18:32:25 GMT
I've been setting up remote controls on mythtv recently but one of them is a bit old and clunky. It occurred to me that it would be nice to use my smartphone to control mythtv instead. I found an existing app for smartphones but installing the .net libraries onto my phone and compiling a C program for the server too seemed a little too much when I don't even have activesync installed. What I do have on my phone already though is a web browser.
I wrote this ruby script to create a web interface, it generates a page and translates the links into telnet commands that are passed to mythtv. Because it simply translates the urls you can use pretty much any of the mythtv telnet commands by just inserting a slash where there would normally be a space. It's been a nice application of Ruby, it was quick to write (in fact an attempt at KISS) and is self contained apart from needing Ruby of course.
mythcontrol.rb
Change 192.168.1.6 to the ip address of the frontend you want to control
run by typing mythcontrol.rb
point your browser at :
http://127.0.0.1/
You can do everything you need with the buttons i've exposed but all you need to do to add/change them is change the URLs in the code - check out mythtvs docs for a list of possible commands
http://www.mythtv.org/wiki/index.php/Telnet_socket