Pages: [1] 2 3   Go Down
Author Topic: My 1st Home Automation system  (Read 12269 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi, I was just introduced to the Arduino systems this past November. My first project consist of an UNO board, paired with an ethernet shield along with a 4 channel relay board. Additionally, i made a simple Android app to accommodate my setup. As a newcomer, I would gladly help any other newcomer who are trying to build a home automation system. Here are some pics of my setup. What do you guys think?



Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2188
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very nice!
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 928
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice job.  How hard was the android app?
Logged

Trying to keep my house under control http://www.desert-home.com/

Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice job.  How hard was the android app?

not too hard, really. I made a website with the IP addresses for each function. i then transferred that webpage to an html based app. i can show you how i made it if you like.
Logged

Tamworth, Australia
Offline Offline
Newbie
*
Karma: 1
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd love to hear how you did it - as someone who can build web apps fairly easily, the phone app process has always been a little daunting to me. If there's an easy transition available  you will have made my day/week smiley
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd love to hear how you did it - as someone who can build web apps fairly easily, the phone app process has always been a little daunting to me. If there's an easy transition available  you will have made my day/week smiley

try this.... http://www.appsgeyser.com
i know this is not the best method to creating an app, but it works perfect!
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as for the buttons, i used an iframe within the webpage which i directed all links to. That way, new tabs arent opened every time a button is pressed.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im doing the same project as yours, can you help me bro? im also a newbie in arduino, just bought it last 3weeks ago and im trying to do a home automation project using web and arduino.. smiley smiley smiley smiley
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi ' im doing the same project and i love your work can u help me?
im new to this , schematics ,code , everything will help

thx
gilad
Logged

Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 3
Posts: 73
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very well done. Have you considered trying out teleduino for off-site remote control?
https://www.teleduino.org/
Logged


cesena,italy
Offline Offline
Newbie
*
Karma: 1
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wel done robv15...care to share the app fro mobile?for which OS you coded that?
the mobile side for me is abosolute impossible,and i'm looking for a good apk file to use on my android devices (nexus 7 tablet and galaxy nexus phone)
thanks
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

#include <SPI.h>
#include <Ethernet.h>
#include <mcp9700a.h>


byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xBE }; // leave as is
byte ip[] = { 192 ,168 ,0 ,177 }; //this is the assigned ip address to the arduino ethernet shield.
byte gateway[] = { 192 ,168 ,0 ,1 }; //your routers ip address goes here. (change if your router has a different ip address)
byte subnet[] = { 255 ,255 ,255 ,0 }; // leave as is
EthernetServer server(80); // port no. assigned here (leave as is)

String readString = String(30);


void setup(){
Ethernet.begin(mac, ip, gateway, subnet);
delay(1000);
pinMode(3, OUTPUT);
digitalWrite(3, HIGH);
pinMode(5, OUTPUT);
digitalWrite(5, HIGH);
pinMode(6, OUTPUT);
digitalWrite(6, HIGH);
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);
Serial.begin(9600);
}

void loop(){
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();
if (readString.length() < 30)
{
readString = readString + c;
}
if (c == '\n') {
Serial.print(readString);
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();


if(readString.startsWith("GET /?out=3&status=1"))
{Serial.print("\n 3 LOW \n");
digitalWrite(3, LOW);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(3);
client.print("\"}");
}
if(readString.startsWith("GET /?out=3&status=0"))
{Serial.print("\n 3 HIGH \n");
digitalWrite(3, HIGH);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(3);
client.print("\"}");
}


if(readString.startsWith("GET /?out=5&status=1"))
{Serial.print("\n 5 LOW \n");
digitalWrite(5, LOW);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(5);
client.print("\"}");
}
if(readString.startsWith("GET /?out=5&status=0"))
{Serial.print("\n 5 HIGH \n");
digitalWrite(5, HIGH);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(5);
client.print("\"}");
}


if(readString.startsWith("GET /?out=6&status=1"))
{Serial.print("\n 6 LOW \n");
digitalWrite(6, LOW);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(6);
client.print("\"}");
}
if(readString.startsWith("GET /?out=6&status=0"))
{Serial.print("\n 6 HIGH \n");
digitalWrite(6, HIGH);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(6);
client.print("\"}");
}


if(readString.startsWith("GET /?out=7&status=1"))
{Serial.print("\n 7 LOW \n");
digitalWrite(7, LOW);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(7);
client.print("\"}");
}
if(readString.startsWith("GET /?out=7&status=0"))
{Serial.print("\n 7 HIGH \n");
digitalWrite(7, HIGH);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(7);
client.print("\"}");
}


if(readString.startsWith("GET /?out=all"))
{
Serial.print("\n OUT ALL\n");
client.print("{\"ip\" : \"192.168.0.1\", "); //enter your WAN ip address here if using your arduino over WAN, otherwise, leave as is
client.print("\"devices\" : ");
client.print("[{ \"type\" : \"lights\", \"name\" : \"Light1\", \"out\" : \"");
client.print("3");
client.print("\"}");
client.print(",{ \"type\" : \"lights\", \"name\" : \"Light2\", \"out\" : \"");
client.print("5");
client.print("\"}");
client.print(",{ \"type\" : \"lights\", \"name\" : \"Light3\", \"out\" : \"");
client.print("6");
client.print("\"}");
client.print(",{ \"type\" : \"lights\", \"name\" : \"Light4\", \"out\" : \"");
client.print("7");
client.print("\"}");
client.print("]}");
}
readString="";
client.stop();
}
}
}
}
}
Logged

Offline Offline
Newbie
*
Karma: 2
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

use the code above with the DomoticHome app on the android market. It should work perfectly!
Logged

cesena,italy
Offline Offline
Newbie
*
Karma: 1
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you very much! smiley
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is exactly what my boyfriend wants to get into! His birthday is coming up, can someone tell me / direct me to what I need to buy to get home started? Please:)
Logged

Pages: [1] 2 3   Go Up
Jump to: