Before we get started, I want to give credit where credit is due: TheFreeElectron wrote an excellent instructable on controlling the Raspberry Pi GPIO pins from a web-browser. In fact, in-order to complete this instructable, you will need to follow almost all of the steps from his instructable including using his awesome web application for controlling your power-strip.
Secondly a reminder that working with mains power can be extremely dangerous. Please be very careful. Those of us that have had the experience of touching a live 120 volt wire do not EVER want to repeat the experience.
Assuming you already have your raspberry pi with the adapter and SD card, you should be able to round up the rest of the ingredients with $40-$50 dollars.
Here's what you're gonna need for this project:
- Raspberry Pi with SD Card
- Micro USB Power supply (Make sure your power supply can supply a full 1 amp)
- Project Box - Available at you local Target ($14.99) - Hurry these are seasonal!
- 8-Channel 5V Relay board - EBay (About $10 shipped, I found mine here.)
- 4 (qty) 15-Amp Power Receptacles (Lowe's or Home-Depot, get the cheap ones about 80 cents each)
- 18AWG Solid Hookup Wire (3 colors) - Radio Shack (About $8.50)
- Short length of 14-Gauge wire. (Only need about 15 inches of white, I found some scrap)
- Large wire-nuts (Red or bigger)
- Colored jumper wires - Female to Female buy them on EBay here.
- Power cord (I used an old computer power cord)
- Scrap wood pieces
- Double Stik tape
- 1/4" wood screws
- Optional (but handy): A female end of an extension cord or broken holiday-light set.
- Trim or plunge-type router with 1/8" straight cutting bit.
- Wire strippers
- Drill & drill bits (various sizes)
- Screwdrivers (various sizes)
- Multi-meter (for testing circuitry)
- Utility knife