Operate outlets via wifi by hardwiring the corresponding RF remote to your Raspberry Pi.
For several years, my parents used a set of radio frequency outlets to turn on/off a few lamps in their living room. I always appreciated the functionality and convenience when I would go visit; however, finding the accompanying RF remote was cumbersome because it often lodged iteslf into the most unlikely cracks and crevices.
At some point, I found myself to be a burgeoning Computer Science major who possessed a set of RF outlets, a Raspberry Pi, and the spirit of laziness innovation.
- Raspberry Pi 3 (or any other verion + USB wifi adapter) with Raspbian Linux
- Jumper wires
- RF Outlets with remote
- Array of 5V relays (two relays per outlet)
- soldering iron, solder, and the ability to solder
- apache
- php
- mysql
- Set up your Pi (There are many sites with great tutorials)
- Connect jumper wires from the following pins to the 5V relay inputs
- Pin 15
- Pin 1
- Pin 6
- Pin 11
- Pin 27
- Pin 29
- Connect a jumper wire from one of the Pi's GRND pins to the GRND pin on the relay array
- Connect a jumper wire from the Pi's 5V pin to the VCC pin on the relay array
- Follow the traces on the RF Remote to determine the on/off buttons for each outlet
- Connect wires to each relay's switch terminals and solder them to the corresponding buttons on the RF remote
- Install apache, mysql, php, and php_apache_mod
- Create mysql
stateDB withoutletstableoutletoutletstate
- Initialize the
outletstable
| outlet | outletstate |
|---|---|
| 'one' | 'off' |
| 'two' | 'off' |
| 'three' | 'off' |
- Clone this repo into your apache DocumentRoot
- Rename
db_info.php.exampletodb_info.phpand add your DB login info - Start the apache server
- On a smartphone, navigate to the Pi's IP, then add to home screen
- Tap the new icon on your home screen
I DO NOT recommend putting this on the internet via port-forwarding, firewall allowance, or any other method. This is a tinkerer project, so have fun with it, but don't get crazy.

