Arduino controls the wemo device over local network. When the status of the hardware switch changes, the arduino sends a SOAP call to the Wemo device to change the power status.

Here is the code for the Arduino:

(You need to change the wemoIP and wemoPort variables with ip/port of the wemo device)