I used relays before but just for simple 5V DC signals control using a Raspberry Pi. Now I'm quite cautious and would like to ask for some help from professionals because I'm not planning to set my apartment on fire.
What do I currently know about this?
I currently use the relay to switch on/off my computers. Doing this is very simple. Since computers turn on by shorting two terminals, I just took a branch from the power buttons of my computers and hooked them to a relay (like the one in the picture) to the terminals are not connected by default. I have a little script that switches the relay for 0.5 seconds, which is enough to turn computer on.
Now I would like to use this to control some 220 Volts power outlet. For that, I bought a socket, like the one in the picture, and mounted it on a plastic project box:
From that socket comes 3 terminals, two terminals (call them black and red) and earth in the middle (call it green).
I would like to install an IEC socket on the box, too (like the one in the following picture):
How should I connect the outlet socket to the IEC through the relay? Please advise.
If you require any additional information, please ask.