Remove the four screws on the back of the plug
Remove the two smaller screws on the back of the PCB that is attached to the front of the plug
Solder some fly wires to Pins 3 (GPIO 0) and 12 (Reset) of the ESP8266 daughter board. Solder wires to the TX and RX pads on on conn 2.
Remember that if GPIO 0 is held low on a reboot (ie reset is triggered by pulling the RESET pin low), the device is in programming mode.
Connect up each wire to an FTDI plug. You can see the wiring diagram here. DO NOT HAVE THE DEVICE PLUGGED IN TO THE MAINS. Wire up a separate +VCC and GND (It's the red and black wires going to CONN 1)
Code up and upload new firmware from the Arduino IDE.
- GPIO 4 is the Blue LED
- GPIO 5 is the Relay
- GPIO 13 is the button. You want to bind an interrupt handler to GPIO 13
Here is some example code to get you started.