Complete home automation
We are finally here. This is the last time we will be calling our electrician friend to help us. Depending on what appliances you are actually using as compared to what is being said in this section, the circuit arrangement may differ. However, the logic is the same.
Unplug the UNO. You will have to more or less create the circuit that is on the next page. Take a look at it. Do not let the number of wires confuse you. All the wires are insulated. The only wires that are connected to each other are the ones at the main line and the ground (neutral) line. The relay (connected to the Arduino) needs to be placed in a location close to the router, but it is also convenient enough to connect all the wires.
It is recommended that you keep your Arduino + CC3000 + relay setup close to at least one switchboard (perhaps the one in your room). The following image is just to show you where and how the connections go, but it is not an exact representation of how it will be. Physically...