Controlling IR Devices (using IRTrans) WITHOUT iRed!

Posted on
Tue Jan 13, 2009 3:24 pm
Mark offline
User avatar
Posts: 263
Joined: Apr 21, 2005
Location: California

Controlling IR Devices (using IRTrans) WITHOUT iRed!

Yes, it's possible!

I have multiple IRTrans units (infrared transmitters) as part of my home's AV system. For years I've struggled with getting them to do what I want, and to integrate them reliably into my home automation system. I've been using iRed, and while I appreciate the efforts of that product's developer, the software has never been able to keep pace with my needs. iRed 1 could not reliably communicate with more than one IRTrans module (independently), and iRed 2 (in beta) has not yet achieved a level of stability that most users would need. Almost to the day that iRed's developer released a statement informing his beta testers that he's going to have to back track a bit on iRed 2 to get it working properly, I made a most interesting discovery.

Some IRTrans units are capable of learning (and storing) IR codes and broadcasting those codes WITHOUT the use of software (like iRed)!! So I went about what turned into the somewhat daunting task of making that happen. I'm happy to report that I've gotten it all working, and it works great! I've been able to store the entire set of IR codes from five different remotes into my two IRTrans units, and can have either unit (independently) fire those codes using a simple AppleScript call. While I send those AppleScripts in a somewhat complicated way, they could just as easily be sent from an Indigo Action Group. Bye, bye iRed, I'll look forward to version 2 when it's ready, but in the meantime, I have my Indigo/IR integration.

The process, once I figured it out, was actually quite easy. There are two caveats, however, some hardware/software requirements:

1) The IRTrans unit must include something called IRDB. This is some mechanism within the unit itself that allows the unit to store the IR codes. The developer of IRTrans explained that most units that ship for use with a Mac include IRDB. I believe the label attached to the unit calls that out. Check with the manufacturer to be sure. I lucked out, and both my units had the IRDB component.

2) The bad news, the only way to "teach" IR codes to the IRTrans requires the use of software that only runs on Windows. The good news is, once the IRTrans unit has learned the IR codes, you no longer need the Window's software (or ANY software), the IRTrans units respond quite nicely to AppleScript. Actually, the IRTrans responds to a simple HTML URL that you can send from any Web browser. I just use AppleScript so that I can fire my IR codes without having to use a browser window.

I couldn't get the Windows software to communicate properly with the IRTrans unit using VMware Fusion. And I didn't try Parallel's software, VirtualPC or Bootcamp. (If any of you try this, and get one of those to work, I'd really like to hear about it). Instead, I borrowed a friends PC laptop and got the IRTrans programmed with that. I won't go into the details of how that software works. If you want to pursue this process, and have trouble, feel free to ask. I will say that the IRTrans developers were very helpful, and responded to my Emailed questions very quickly. The challenges were many, including the IRTrans documentation (a bit weak), understanding how the process worked (a bit confusing), getting the IRTrans configured correctly, and of course the Windows OS (what a nightmare, how do people do it?!?). But, like I said, once I figured it all out, the actual programming of the units went quite smoothly.

And Matt was kind enough to lead me to the AppleScript solution that made the whole thing work without a browser. (Thanks again, Matt!)

The short version:
- Install the IRTrans software onto the PC (two components: irserver and GUI Client).
- Connect the IRTrans to the PC (in my case, they were both connected to my local ethernet network)
- Launch irserver (this is the component that communicates with the IRTrans, but doesn't actually have any interface)
- Launch GUI Client
- Use GUI Client to learn the IR codes (basically you setup and name a "Remote" and then create "Commands", each time you create a Command, you just point your remote control at the IRTrans and push the appropriate button: power, volume, etc.)
- After all the Commands are "learned", use GUI Client again to upload all the IR codes to the IRTrans. (Once all the commands are learned by GUI Client they reside as text in a single file on the PC. I was able to edit this simple text document, which made the process even easier. In some cases I added IR codes that were stored in my iRed database by simply copying and pasting from fields in the iRed interface into the text document.)

That's it. No more need for the PC (or iRed!). Use the following AppleScript to fire the IR codes, which you could put into an Action Group or an Indigo script attachment.
Code: Select all
send_to_IRTrans("xxx.xxx.xxx.xxx", "Name of Remote", "Name of Command")

on send_to_IRTrans(irTrans_IP_address, remote_name, command_name)
   set the_url to "http://" & irTrans_IP_address & "/send.htm?remote=" & remote_name & "&command=" & command_name
   set the_script to "curl --connect-timeout 5 --max-time 10 -s '" & the_url & "'"
   do shell script the_script
end send_to_IRTrans

Substitute:
"xxx.xxx.xxx.xxx" with the IP address of the IRTrans unit (you'll need to fix the IP address, instead of letting the IRTrans connect using DHCP)
"Name of Remote" with the name of the Remote you setup in the GUI Client software
"Name of Command" with the name of the Command you setup in the GUI Client software

The format for the URL can also handle multiple Commands, with pauses, so you could conceivably string together a macro to control multiple AV devices (TV on, receiver on, Blu-ray player on, etc.) or to select a multiple digit channel (5-0-4-Enter).

Now this process doesn't replace iRed's remote control interface capabilities, but for me that was no biggie because I never used that part of the program anyway. Instead, I've created my "Virtual Remotes" using Indigo interface elements on my Control pages.

Have fun!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 20 guests