Digital Power Switch

Final schematic:
(To Be Defined)

The idea is to simply connect a relay to a RS232 port from the computer.
As the RS232 port didn't had enough power to switch the relay I needed a little driver unit

At first, I got this schematic from circuitsonline

The optocoupler I used was a til111, but it was practicaly the same.
The top schematic is a simple 12V power supply, you can use one suplly on multiple switches. you can also use a normal 12V adaptor.

The bottom schematic is the actual switch, it's very easy, the optocoupler separates the digital signal and the high voltage circuit. The transistor amplifies the signal and the TRIAC blocks all the current or passes all the current.
After testing it I noticed it wouldn't handle inductive loads (transformer)