Home page
About
Boston Linux
Freshmeat
Slashdot
Meltdown



 

| |
ir is an interface program to Chris Dodge's RedRat 2 infrared controller.
It will not work with any other infrared device, especially IRDA.
It is written in Perl. It uses only the basic Perl
constructs and no external packages, so it should work on any platform
that supports Perl and serial communications.
Download ir here
FEATURES:
- Macros: You can store a series of commands in a macro file. Referencing
that macro file will call up all the commands stored in them. The names
of the commands, not the IR codes themselves, are stored, so if you
relearn the IR codes the macros will use the new codes.
- Sequential learn mode: You can specify a series of codes to learn.
After each IR code it sees, it waits to scan the next one. This makes
learning all the codes for a device very quick with one command.
- Command line interface: The command line interface can be called
manually, or from a cron job, or whatever you want:
- ir r device command device command...
Learn a series of commands from one or more devices.
ex: ir r tv on tv off tv chup tv chdn
- ir s device command device command...
Send a series of commands to one or more devices.
NOTE- if mode not specified, default mode is send.
ex: ir s cable on cable 1 cable 3 vcr on vcr record
ex: ir cable on cable 1 cable 3 tv on
- ir m macro device command device command...
Create the named macro file with the listed sequence. To send the
macro codes, use "macro" as a device name, and the macro name for
the command.
ex: ir m recordpbs cable on cable 0 cable 2 vcr on vcr record
Then to play back, issue ir s macro recordpbs
- Email interface: If you put the line
'ir: "|/usr/local/bin/ir e"' in /etc/mail/aliases, then sending
email to ir@mydomain.com will send the contents of the email to the
stdin of the ir program, which will skip all lines containing
illegal characters (all mail header lines do), and execute any
commands on lines that pass the test.
- Web interface (the biggie!): If you call ir from your web server (I
made a symbolic link from /usr/local/bin/ir to
/home/httpd/cgi-bin/ir.cfg to enable this), it will dynamically
build a list of devices and commands, including macros, and present
them in a form. The form also has a field to list a series of
commands to be executed, and another one to build a new macro file
from a list of commands. There's a checkbox for verbose feedback
and another one test only (don't really send the IR commands). When
the form is submitted, the commands are executed and the form is
again displayed.
- X-10 control: If you buy an IR to X-10 controller, like X-10's IR543, you can control almost
anything in your house. I have one and I can send you the codes to
send to the unit.
USES:
I use this program mainly from my crontab file (I have a linux aserver on
24/7) to record tv programs when I'm not home. Since my cable company
requires me to select the channel with my cable box, I have cron entries
like ir cable on cable 1 cable 3 vcr on vcr record to record a tv
program, then ir vcr off cable off to stop recording.
I plan on utilizing the web and email interfaces as soon as I can
implement some security concerns. I would also like to set up a home
security system whereby triggering certain events in the house would send
an email to my cell phone (yes, I can do that) and turn on lights via X-10.
SCREEN SHOTS

INSTALLATION:
- Put 'ir' somewhere in your path.
- Change the configuration variables at the top of the program to match
your platform and paths, etc.
- Create the directories listed in $HomeDir and $DeviceHomeDir. If you
want users other than root to be able to record codes under
UNIX/Linux, you may have to play with the permissions on the files.
Each device you learn codes for will get a directory under
$DeviceHomeDir, and each code you learn will be a file in that
directory. Macros are stored in a directory called "macro" under
$DeviceHomeDir, so don't call a device that. See more notes in the
INSTALL section on device and code names.
- If you want to utilize the web interface, create the file link
mentioned above (make sure your web server is configured to follow
symbolic links if you use them).
- If you want to utilize the email interface, create the aliases entry
mentioned above.
- Start recording codes. When you record a code for a new device, the
software will automatically create the needed directory. Do not call
your device "macro" though. And of course, it must be a valid
directory name for your platform/filesystem. The same goes for code
names. I have not tested it with spaces, but I suppose it's possible
if you quote the name on the command line.
- Kick back and control the world!
LICENSE:
Copyright © 1999 David Kramer
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Download ir
|