With the MythTV box booted up hit escape enough times to exit the MythTV frontend.
Once you're at the KnoppMyth desktop, right-click to access the root menu, select XShells, and then Xterm. I won't have a lot of screenshots, because a lot of the work you'll be doing for these steps is in the terminal... but I'll show some screenshots of key events so you know what to expect.
(Note, in order to make the tutorial readable, in various places I split commands across multiple lines with a \ -- the \ indicates to the shell that you are continuing the same command on a new line. This way, if you're copying/pasting commands out of the tutorial, you won't have any troubles pasting the commands that span across multiple rows.)
Once you're in the terminal, change to your super-user in order to install the modules you'll need to control the X10 devices. Typically the command is su
, followed by the password.
Change to a working directory of your choice for downloading a package and installing. Out of habit, I use /opt
. You'll need to download this file:http://search.cpan.org/CPAN/authors/id/B/BB/BBIRTH/ControlX10-CM17-0.07.tar.gz
root@holodeck:/home/mythtv# cd /optroot@holodeck:/opt# wget \http://search.cpan.org/CPAN/authors/id/B/BB/BBIRTH/ControlX10-CM17-0.07.tar.gz
When wget is finished, if there are no errors, unpackage the tarball:
root@holodeck:/opt# tar -xzvf ControlX10-CM17-0.07.tar.gz
It should display a list of files that were unpackaged. Change into the ControlX10-CM17-0.07
directory and read the README for more information on how to proceed. When you're done reading, here are the steps to follow to install the module:
root@holodeck:/opt# cd ControlX10-CM17-0.07root@holodeck:/opt/ControlX10-CM17-0.07# perl Makefile.PLChecking if your kit is complete...Looks goodWriting Makefile for ControlX10::CM17root@holodeck:/opt/ControlX10-CM17-0.07# makecp CM17.pm blib/lib/ControlX10/CM17.pmManifying blib/man3/ControlX10::CM17.3pmroot@holodeck:/opt/ControlX10-CM17-0.07# make testPERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.tt/test1....ok All tests successful.Files=1, Tests=29, 8 wallclock secs ( 0.02 cusr + 0.00 csys = 0.02 CPU)root@holodeck:/opt/ControlX10-CM17-0.07# make installWriting /usr/local/lib/perl/5.8.8/auto/ControlX10/CM17/.packlistAppending installation info to /usr/local/lib/perl/5.8.8/perllocal.podroot@holodeck:/opt/ControlX10-CM17-0.07#
While you're the root user, run the next two commands to ensure you have all the serial port support in place. Trust me on this one.
root@holodeck:/home/mythtv/x10# apt-get update...root@holodeck:/home/mythtv/x10# apt-get install libdevice-serialport-perl...Setting up libdevice-serialport-perl (1.002-0.3) ...root@holodeck:/home/mythtv/x10#
Next, you need to fetch a script to control the modules. For this we'll go to the MythTV-User mailing list and snag a script written by a person calling himself John, and posted to the list by Kenneth
Use ctrl-D to switch back to the default user in your knoppmyth terminal, and use the cd command to ensure you're in the home directory. You can download the attachment to that email with the following command. Note, the flag to wget is a capital o, not a zero or lowercase o. The purpose is to rename the file to something useful, since otherwise it's just "attachment.bin" which doesn't do us any good. Link to the file below.http://mythtv.org/pipermail/mythtv-users/attachments/20060607/e3181c75/attachment.bin
root@holodeck:/opt/ControlX10-CM17-0.07# exitsh-3.1$ cdsh-3.1$ wget -O x10-myth.tar.gz \http://mythtv.org/pipermail/mythtv-users/attachments/20060607/e3181c75/attachment.bin
Naturally, unpack the tarball, then change into the directory it makes:
sh-3.1$ tar -xzvf x10-myth.tar.gz x10/x10/mainmenu.xmlx10/x10.plx10/x10.xmlsh-3.1$ cd x10
Check that the x10.pl script is using the proper device for your serial port by opening the file with your favorite text editor and changing /dev/ttyS1
to the proper device (it might be /dev/ttyS0 or /dev/ttyS2). I had to change mine to /dev/ttyS0
to work. The only way to know for sure is to test them, so here's how.
You'll need to know your X10 devices' house codes and device codes. For example, my ceiling lights are A2, and my lamp is A3.
sh-3.1$ ./x10.pl A3Jsh-3.1$ ./x10.pl A3K
This turned my lamp on, and then off. Success! I now have control over my X10 devices! Just to be sure, I also issued a few commands to the ceiling lights, to be sure I could dim them. Here's a video:
So, we're good to go! Next step: Give MythTV control.