About six years ago I bought a home theater system with an Integra DTR-4.6 receiver and for some reason last weekend I suddenly wanted to control it remotely. I’ve never really used the actual remote control because the receiver sits in easy reach of the couch and the remote has about 50 buttons when I only use three. I generally leave my receiver at the same volume and just switch the input from the Mac mini to the Xbox 360 and back. I thought it would be nice to power on the receiver from my desk across the room with the proper input selected.
You can talk to Onkyo / Integra receivers via the DB9 RS-232 port on the back (later generations support ethernet). I already had a USB serial adapter (like this one), so getting started was a piece of cake. I searched forums, but was surprised that no one was really building tools to do this. The serial port is intended to be used by system installers so they can tie it into their home automation system… not really people like me that want to do just one thing well. I found a forum post with the full command table for the Integra Serial Control Protocol (ISCP) that Onkyo / Integra equipment uses; it’s usually only distributed to dealers.
To test the serial communication, I first tried opening a terminal attached to the tty device. You can use screen as a serial terminal but I found it difficult since it wouldn’t echo typed characters locally. I downloaded CoolTerm and it worked great. The commands are just a strings of ascii characters. This is power Â on: !1PWR01 The ! is the start character. 1 is the unit type, receiver in this case. PWR is the command. 01 is the parameter; we’d send 00 for off. The protocol features many different commands: SLI to select the input, MVL to control the master volume, and LMD to change the listening mode, to name a few. Almost all commands support the parameter QSTN for polling the device’s state and the receiver alwaysÂ echoesÂ a properly received command back to the terminal.
I played with the terminal a bit to get a feel for how the receiver would behave then decided it was time to make the process a little more scripted. At the command line, you can send something like this to power on the device:
echo "!1PWR01" > /dev/cu.PL2303-0000105D
To do that remotely from my laptop, I just execute it via ssh:
ssh minibox.local 'echo "!1PWR01" > /dev/cu.PL2303-0000105D'
I didn’t want to use the command line to access the receiver every time though so I bundle my scripts as applications using Platypus. I gave each script a unique icon and now I have a single click remote control access to my receiver in my OS X dock.
What’s next: The receiver is just part of the picture. My Panasonic AE-900U projector can also be controlled via serial (although it requires a different cable). Once I get the projector on serial control, I can switch the projector and receiver inputs at the same time. Then I can just set up simple task based buttons: Watch a Movie, Listen to Music, Play a Game, etc. Serial also makes the Zone 2 controls much more accessible so I could add that as well.
I hope someone finds this info useful; I’ve already gotten a thank you comment on my vending machine post.
Aside: I shared this with cnelson and he replied, “I love your refusing to learn programming programming.”