3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Home automation server with router

Home automation server with router
Turn a cheap router into a home automation server!

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.
http://www.smarthome.com/2412N/SmartLinc-INSTEON-Central-Controller/p.aspx
http://wiki.smarthome.com/index.php?title=2412_Manual_rev_2.0

Components
• OpenWRT compatible router, with serial header
• AVR microcontroller Development Board (like Arduino)
• Actuators like: RF switched outlets (433.92Mhz) with a remote

 
Remove these adsRemove these ads by Signing Up
 

Step 1Overview

Overview
The System
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.
« Previous StepDownload PDFView All StepsNext Step »
52 comments
1-40 of 52next »
May 20, 2012. 11:30 AMcmorisco says:
Hello mex 23dot error
Command 'cd "/etc/config"'
failed with return code 0 and error message
-ash: groups: not found.
thank you
May 19, 2012. 6:04 AMcmorisco says:
hello mrx23dot this project works with a visual basic
instead of using ipod 192.168.200
Apr 13, 2012. 6:20 PMprince4e says:
Thanks for making this DIY guide. I am almost there but I am little confused about Remote encoder and decoder. Well to be frank I am lost. And what if I have to use 2 RF control outlet. Can I buy same products and use one remote to control both outlet or what should I do?? I am stuck at the last step so any help would be appreciated...
Apr 16, 2012. 4:05 AMprince4e says:
And what if I want to make my own RF control outlet and remote do you have the schematics?? Can it be done?? Thanks for your help. I really appreciate what you are doing?
Apr 14, 2012. 4:16 PMsneaksneak says:
Hello, very nice project.
How aboute the software code for the arduino? Can you upload it?
Apr 9, 2012. 8:34 AMjfurcean says:
I just finished a similar project, but I used a laptop instead of a router. I am getting ready to use a OpenWrt router to try and make the overall cost of the project cheaper. I also set it up using an X-10 interface module. This allowed me to configure any number of modules to control.

http://thenewtech.tv/community/arduinox10-home-automation-over-wifi
Mar 30, 2012. 1:32 PMcryphakon says:
How would add more buttons to the webpage to control separate outlets?
Mar 25, 2012. 2:56 AMmojunwei says:
hi mrx23dot

i am stucked in this
more detail about
Mar 25, 2012. 2:58 AMmojunwei says:
and more detail about MPFS2?

your help will be appreciated! thankx
Feb 21, 2012. 12:08 PMengcu90 says:
Hello
Great project!
I am doing it, but I have a problem that hex data is not received correctly.
First I tried to send from the router to my PC via:

echo -e "\x9B\x11\x08\x22\xC5\x0D" > /dev/ttyS0

I received: 0x9B 0x11 0x08 0x22 0xC5 0x0D 0x0D 0x0A
I receive 2 bytes in excess and I don't know why!

Then I tried to send from the router to pic, then from pic to my PC to check the received data, I get only 6 bytes but all wrong, not the data I sent.

I am using pic18f452 as I didn't use avr before..
I think the problem is the interface circuit..I used shmitt trigger, res, cap as you did but it doesn't work. Is this circuit need to be modified to be suitable for PIC?
Thanks
Feb 22, 2012. 11:32 PMengcu90 says:
Thank you very much. The inverter solved the problem =)
I used the same cct in your schematic, but replaced smhitt trigger with 2 inverters
For excess bytes, it was CR & LF characters. echo -n solved this.
But when I send data from the PIC to the Router, How can I receive the data in index page for example?

Feb 24, 2012. 9:06 AMengcu90 says:
Really appreciate your help..I have successful two way communications :)

I have inquiry about ADSL Modem and the Router connection. I have modem & router in one device TD-W8901G with default ip 10.0.0.1 and router wr741nd default ip 192.168.1.1
I must connect cable from router to my PC to be able to acess 192.168.1.1
Can I access this page without the need for the cable? My PC is connected to the internet via wireless from TD-W8901G, in another words,, when I type 192.168.1.1 in my browser, the ADSL modem forward to the port where the router is connected to.
Also I want the web page 192.168.1.1:81 be public over the internet.
Same manner,The ADSL has real ip, for example 41.20.30.50. I want when some one enter 41.20.30.50:81 in his browser, my ADSL modem forward this to the port where the router is connected to, then the router forward to port 81, web page.
Is there a tutorial about how to do that?
Hope my question is clear enough! :)
Mar 12, 2012. 5:27 AMengcu90 says:
Hello Sir,
I am still confused with this setup. May you clear the steps please?
How to enable DHCP client?
How to get router's mac address?
Thanks
Mar 5, 2012. 2:08 PMengcu90 says:
Hello mrx23dot,

This is what I did for serial reception

First, I used voltage supply 3.3v to my PIC18F452 instead of 5v, and then connected the PIC and the Router directly without the need for inverters, shmitt trigger, ... etc

For reception to the router:
The firmware needs to be upgraded to add packages: coreutils, setserial, using commands opkg install/update

Then to receive data I used:

stty -F /dev/ttyS0 115200 cs8 -parenb ....
#there are many parmaeters to be set according devices specs

cat /dev/ttyS0 >> a.txt
#read data and save it a.txt file

setserial -a /dev/ttyS0 >> is used to check that the device is configured properly

Feb 26, 2012. 11:57 PMengcu90 says:
Thank you for your help mrx23dot :)
For serial reception, I used only voltage divider at Rx of the router to make 5v --> 3.3v
And used command cat for reception, default baud rate 115200. I tried to send ASCII characters and received successfully. When I finish reception of HEX Data, I will attach the full program.
Mar 8, 2012. 10:37 PMedisonchung says:
I have downloaded WinSCP and type followed what you told :
" Download WinSCP, to simply do this through SSH.
http://winscp.net/download/winscp429.zip

Set up a new connection:
Host name: normally 192.168.1.1 (by default)
Port: 22
User name: root
Password: what you gave after installation
File protocol: SCP "

but what do you mean by " Password: what you gave after installation " ?
do u mean the installation of OpenWRT firmware on the router?
Mar 10, 2012. 9:00 AMedisonchung says:
Thx!!! But I come across another problem ><

After the first login, I changed my password then I login again using:

ssh root@192.168.1.1

I tried to install the web UI using Luci due to I'm using MacOS,
but when I tried to update opkg with the command :

opkg update

It failed(as shown in the image attached), it seems like it has no internet connection,
but in fact, I'm able to browse websites on my browser.
Hope you could help me with this and sorry for my ignorance.
Sep 13, 2011. 8:40 AMssrinivas says:
hey mrx23, its a great project. I have decided to do this project as a part of my graduation project. it would be great if u help me. looking forward for some support. thanks man :)
Aug 21, 2011. 3:42 AMEddy Dean says:
looks great, but, how could this be done without WINSCP (as this does not work on my computer)?
Jul 19, 2011. 9:15 PMjohan_tr2000 says:
Nice idea mrx23 and joejoerowley.
Can you elaborate in more detail how to set up and configure the 741 so it allowed to remote control from outside wifi network (from internet)?
May 20, 2011. 6:33 AMMarkV6 says:
Nice project, any idea how to send data the other way? For example show a temperature from the serial port to the website.
Dec 2, 2010. 8:24 AMskeegan says:
Hi mrx23, This project is great- I think it could be really useful for me. I have a couple of questions regarding the schematic (please forgive my electronic ignorance:). Schematic attached-would be great if you could offer some insight. S
Nov 14, 2010. 9:10 AMmadmax2003 says:
Why didn't you use an arduino with Ethernet shield? In my opinion its easier than the Serial Communication between Router and arduino. What do you think?
Greets max
Nov 13, 2010. 11:48 AMan4rchyy says:
Would you be able to link a page for the outlets you used? I was unable to find switched outlets for 8$ and it would be great to get them that cheaply
1-40 of 52next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
17
Followers
1
Author:mrx23dot