This project will allow you to switch outlets/lights from your iPhone, or any browser.
You will also be able to send out serial commands remotely.
This project is based on SmartLinc.
• OpenWRT compatible router, with serial header
• AVR microcontroller Development Board (like Arduino)
• Actuators like: RF switched outlets (433.92Mhz) with a remote
Step 1: Overview
The Router runs a web server, you access it via browser.
After you push a button on the web page the router sends out a serial command,
we process this with a microcontroller, the AVR converts it to RF protocol, injects it into the RF remote, which controls the RF outlets.
I chose the TP-Link TL-WR741ND, because it is cheap (~$30).
Disassembly it (this will void the warranty!). You will have to solder a serial header to the circuit board, to gain access to the serial port.
The TL-WR741ND instructions can be found here: http://wiki.openwrt.org/toh/tp-link/tl-wr741nd
For other routers, search here: http://wiki.openwrt.org/toh/start
After finished soldering, manage the four cables out of the case, through the vent holes. I used a RJ22 plug at the end, for rapid connection.
Step 3: Configure the Router
The TL-WR741ND instructions can be found here:
If you are stuck, start here: http://openwrt.org
After you have a working SSH connection you can proceed.
Because of the router (by default) runs the web admin page on the port 80, we need to add a secondary port to serve our custom web site. For that, we need to configure the uhttpd (web server application) configuration file.
Download WinSCP, to simply do this through SSH.
Set up a new connection:
Host name: normally 192.168.1.1 (by default)
User name: root
Password: what you gave after installation
File protocol: SCP
Find this file: /etc/config/uhttpd
Copy the following into it:
config 'uhttpd' 'secondary'
option 'listen_http' '81'
option 'home' '/HomeAutomation/www'
option 'cgi_prefix' '/cgi-bin'
option 'script_timeout' '60'
option 'network_timeout' '30'
And save it.