Hi All - I've been very much enjoying and benefiting from RC for a while now. In an attempt to give back to the community, I drafted up this primer. I hope it is of some use. Of course, I welcome comments and corrections!
What is RS-232 and IP - A PrimerBACKGROUND
Anyone reading this likely knows that IR control provides a way for sending control commands to a component "through the air" by modulating radio waves in the infrared spectrum. As a control option, IR has about one thing going for it: it is very inexpensive to implement. It's well known limitations include "line of sight" requirements, one-way only communication and the omission of discrete commands in many implementations. Additionally, when IR commands are represented in text, the ridiculously long and random character sequences are anything but human readable.
Simply put, IR was a great way to let couch potatoes change TV channels from afar, but was never intended as a control technology for automation or integration scenarios. So, what's a geek to do?
Enter RS-232 and IP.WHY RS-232 and IP?
If you are looking for a control protocol that provides robust, two-way communication for device control and automation/integration, RS-232 and IP will hit the spot. Key benefits of these control protocols include:
1. Options for reliable, hard-wired connections. (Actually, RS-232 is inherently a wired communication method. IP can be wired or wireless, as described below.)
2. Robust, two-way communication that enables command verification, device status reporting and transmission of information in addition to control data.
3. Rich API's that include, and go way beyond, discrete commands.
These factors make RS-232 and IP great options for automated control of devices. However, when it comes to universal remotes, the story is mixed. IP control can be done with a remote that supports wifi, but because of relatively long "wake-up" times for wifi, this is not suitable for all applications. RS-232 is hardly suitable for universal remotes, since it does not natively support wireless communication.TECHNICALLY SPEAKING
Before going further, some technical notes to keep in mind:
1. Technically speaking, RS-232 is a standard for serial data communication that has numerous implementations. While a detailed discussion of the standard is beyond the scope of this primer, it is important to know that not all RS-232 ports are created equal. This means some fuss can go into finding the right cable for connecting two devices over RS-232. As always, Wikipedia is your friend: RS-232
, Null modem
2. IP, which is short for Internet Protocol
, does not actually specify a physical connection standard. Rather, it describes a method for sending packetized data over any manner of physical connection. In the context of AV and home automation, it is safe to say that IP refers to "IP over Ethernet", where Ethernet describes the physical medium through which the data is sent.THE SPECIFICSRS-232
In order to control a device using RS-232, several things are required:
1. Both the device and the controller must have a RS-232 port
2. The two devices must be connected using a cable that properly matches the specific variety of RS-232 interface on each device (see TECHNICALLY SPEAKING above)
3. The port of the controller must be configured to use the same settings (speed, data bits, parity and stop bits) as the devices.
4. The ASCII character sequence of the commands supported by the device must be programmed into the controller.
If your device has a RS-232 port for control, chances are your manual will document the ASCII commands. For example, my Panasonic TH-50PHD8UK monitor manual shows that sending the following sequence of characters to the ASCII port will turn the device on:
02h P O N 03h
In this example, 5 characters in all are sent. The first character is the hex value 02, the second character is the letter "P", and so on.
Now, if your mindset is geared around a universal remote control, you are probably wondering, "how does this benefit me if I don't have a RS-232 cable running from my remote to the devices I want to control!?"
The answer lies in gateway devices, such as the URC MSC-400
. These devices sit between your remote control (or other user interface) and the devices you wish to control. When you push a button on your remote, the remote sends an instruction to the gateway (typically through either IR or RF), and the gateway then forwards the appropriate command to the target device over the RS-232 connection. Here's what that looks like using a RF remote, the URC MSC-400 gateway and a TV:
Remote --[RF]--> MSC 400 --[RS-232]--> TV
One drawback with RS-232 control is that many AV components don't support it. If your AV receiver costs less than $1000, there's a good chance that you're out of luck. If you have a large screen plasma or LCD high def tv/monitor, you've got a reasonable shot.IP
In order to control a device using IP (over Ethernet), here's what's required:
1. Both the device and the controller must have Ethernet ports
2. Both devices must be on the same IP network
3. The controller must know the IP address of the target device
4. The character sequence of the commands supported by the device must be programmed into the controller.
As where RS-232 control requires a gateway device between a universal remote and target devices, IP control can be done directly from remotes that support wifi. (TIP: your iPhone or iPod Touch makes a great IP remote!) However, it is still often the case that gateway devices are used for IP control, including whole home control processors from companies such as Crestron, AMX and Control4.
If you already own devices that support RS-232 or IP communication, why not explore products and options for exploiting that capability. You can do so right here on RC!
If you don't already own such devices, consider making RS-232 or IP support a requirement for one of your future purchases. Once you enjoy the reliability and flexibility of these protocols, there's just no going back.
Also, keep an eye out for other two-way communication protocols such as ZigBee and Z-Wave. Unlike RS-232 and IP, these are complete protocol stacks designed from scratch for automation and device integration.
Last edited by crosen on August 21, 2009 01:18.