This is a simulation of a two-way switch.
One switch is a manual switch and the other is controlled by a relay. The idea here to be allow the relay to be controlled remotely (over and internet connection) and still allow a manual override so that we can control a light.
The switch beside the 5v DC is in place of a microcontroller and is used to open and close the relay switch.
The second part of this circuit it my attempt at an Optocoupler so that we get feedback on whether or not the main light is on or off. (I'm sure this part can be tidied up a bit - any suggestions will be welcomed)