In the above diagram pin 3 is connected to pin 5, by default.
By sending +12V between pin 1 and pin 2, you will
will turn on a switch. Pin 1 and pin 2 will disconnect,
and pin 5 and pin 4 will connect.

A complete circuit can control up to eight relays, that means that a complete circuit can control
eight different devices. You will need a DB25 connector. Using a parallel
switch cable, connect this relay board to your computer. I put the relay board in a box
and use a parallel switch cable to connect it to my Linux box:

Panel: LED, Switch Back: DB25 connector

Below is an example of how a relay board would connect with your electrical device:

To connect the system, just connect your home electrical device to the power outlet. That is it!
You don't need to make any change on the electrical device. And you can
connect any kind of device to that power outlet. Plug this power outlet into any wall outlet.

To see photos of what the finished product looks like, go to the following sites: