Wednesday, March 5th, 2008
Use Any Old IR Remote to Control Your Computer
Once I moved my old PC into the living room to act as a media pc, I decided it just wasn’t practical to carry the keyboard around whenever I was doing work on my computer. The good news is, you can use your basic computer functions with a simple IR remote control.
1.Get yourself an IR Receiver and old remote.
I got mine from this site for $12 plus shipping. I think his price went up to $18 for the same model since then. Make sure you ask for a windows optimized unit if you buy it from him. If you’d rather do it all yourself, you can try following the instructions from the source at WinLIRC. You can also just buy any other computer remote at your local hardware store, but I’m not sure it’ll be compatible with winLIRC (though it probably comes with it’s own software). Basically, you’ll want to make sure your receiver is connected via a serial connection on your computer, or else check WinLIRC documentation for your remote. The only receiver I can guarantee is the one I use that I mentioned above.
The trick with the remote is that not all signals are recognizable by WinLIRC. 2 of the 4 remotes I have in my house worked fine. One other one I was able to configure with winlirc, but the signal response isn’t solid enough to actually use. In most cases, the best remotes are older ones that you have lying around from your plain old DVD player or TV.
2.Download and run WinLIRC
Get WinLIRC and run the program (it doesn’t require an install). Click on reconfigure… all the default settings are fine for my IR receiver. Yours may vary. Next you need to see if WinLIRC recognizes the remote signal. This is done by clicking “Learn” and following the on-screen instructions. Don’t forget to click “Analyze” when you’re done. Now you should have a .cf file located in your WinLIRC directory, named according to the remote name you gave. You can open this config file in notepad and see all the settings WinLIRC has determined for your remote. If you have WinLIRC running, you should see the “light” in the system tray turn green whenever you press one of your configured buttons. If not, something is wrong.
3. Set up a program to receive the signals
This part is probably where most users find that WinLIRC is too much work than it’s worth. That said, there are a few plugins set up for WinLIRC found at the bottom of this page. There is also an AutoHotKey script set up for WinLIRC if you’re familiar with that program. I plan on preparing my own program in Visual Basic to run and receive the remote signals. This will potentially give me the flexibility of allowing any key to perform any task I desire. It will also potentially require a large amount of work. I’ve written only one portion so far, and it enables this tiny remote to perform some essential itunes commands. The remote config file is available here. The program is up for download here. If you just run the program, you’ll need to configure your buttons to match my configuration file above.
If you’d like to write your own program, WinLIRC has a nice little writeup on how to receive winLIRC signals in Visual Basic.
In the future, I’d like to make the program work with a variety of other programs, and ideally I’d like to set up a little GUI that functions as a way to open movies, songs, or even web pages using nothing but a remote control.