Go Down

Topic: DomoticHome [Arduino - Android - WebApp] (Read 14620 times) previous topic - next topic

bl4d3

Hi guys,
i can't write down the past thread about DomoticHome
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284455681/0#0
a quick resume about it, my target is to provide an opensource and cheaper way to take the control of your home.
Right now there is availabe an app for Android device as show in the last thread and in this days I've deployed a web app that expose a simple interface for generate the code for Arduino, in this way you have just to enter the device that you want to command (ex: plug, light, gate, ...) and the Arduino out where the actuator (usually a relays) is wired.

I added the possibility to send the data retrieved from a sensor (temperature, CT) to the web app, so you can view realtime graph about your sensor to make working this you have just to flag "Send to remote server" and code will be generated for you.

So, right now, I support just this temperature sensor MCP9700A and CT Sensor (I asked to the openenergymonitor guys if i can use their code to read apparent power).

You wanna try it you are welcome, but keep in mind that it's still in alpha version and I've write down the code on the night so there will be some mistakes for sure.

It's an arrive point but just a start point, if someone want to collaborate I'm here.
As you can see the interface is pretty ugly, it's into the todo list too.

****In those next week I could modify the database structure and I'm not garantee that the data stored will be saved****

Domotichome.net


comeollas

#1
Feb 01, 2011, 12:25 pm Last Edit: Feb 01, 2011, 12:31 pm by comeollas Reason: 1
Nice project!!

I have Iphone i follow ur project thanks for create this app's for all ppl ;)

Ah, the project its possible make it with ENC28J60 it's more economic jejeje i have one original eth shield and one enc28j60 with webserver in arduinos and work's perfect, but ur project for control with phone its awesome :P

#2
Feb 20, 2011, 07:06 pm Last Edit: Feb 20, 2011, 08:14 pm by alfred_j_kwak Reason: 1
Hello, and thank You for nice project.

I had some problems with communication. So far I have tried two different android device without success.
I have ZTE Blade phone running with 2.1 software and Archos 70 tablet with 2.2.
Both can connect with Arduino, but when I try activate some functions Android told that connection is not good.
Sync is working but not any of the actual devices after that.
When I use serial monitor I can see sync message, but not any other messages.

Any ideas?

-Jussi-

And as You might notice, my english is not so fluent...

EDIT: And as usual - right after this post I got it up and running.

bl4d3

@alfred_j_kwak glad to hear that, could you post some pics about your work/integration here?

No pictures yet...  8)

I just have arduino with ethernet shield.
What I was trying to accomplish is some kind of central radio system for my friend.
He has new house under construction and they are installing speakers all around the house, even to the patio.
I want to use something like your software to select which speakers are on or off.

As I already wrote I managed to get your program running in my hardware. Next I'm going to add sift register latch and some buffer (ULN2003 or similar) to control bunch of relays. I want to use sift registers cause then I can operate almost unlimited amount of devices with only 3 outputs of arduino.

Your software is nice, but (there is always a but..  ;) ) it would be nice to see actual status of device. Maybe some color change in operating button.

-Jussi-


bl4d3

I just added a basic tutorial on domotichome.net about how to turn on/off a led take a look
http://www.domotichome.net/tutorials/2-how-to-turn-on-off-a-led/public_show

bl4d3


lu8emw

#7
Mar 27, 2011, 08:25 pm Last Edit: Mar 30, 2011, 02:52 am by lu8emw Reason: 1
Sorry for my English. Very good your project. I make you a question you plan to do the code for the shield of ENC28J60? It is the only one who got in Argentina. Publish the tutorial does not specify that shield is used, if only you could specify wiznet so no confusion. If you need to traslate Spanish tutorials let me know, I'm writing in English very bad, but to go from English to Spanish no problem.

Greetings

spumanti

Hi there.

I'm looking at this very cool project as well, and will surely try to play with it, and hopefully make my home a bit smarter  ;)

Like lu8emw wrote, it would be nice to know which shields are supported. (the wiznet shield seems to be a lot more expensive than the ENC28J60 based one).


Great project - looking forward to play with it some more

bl4d3

right now just wiznet  is supported if someone want to translate the code for other shield i'll be happy to integrate it.

spumanti

Thanks for the reply.

Will get the wiznet one then  8)

comeollas

#11
May 11, 2011, 11:09 am Last Edit: May 11, 2011, 11:15 am by comeollas Reason: 1

I almost finished porting for iPhone



WOW!!! u are the best app for iphone its perfect for me jejejje

What's the time estimated for release the iphone app?

If you need tester for iphone app send me the ipa (i tested android app and works fine, but i use iphone's and), i have shields wiznet and enc, and if u want i send you a sketch of enc and wiznet used for open and close relays for see the diferences.

Thanks for ur time!!

nrmv105

Hi everybody!!!!!

Does anybody have a sample code for arduino, I have no idea of how to program my duemilanove

Thanks

Ledfreak3d

Hi All.

First off
Domotichome is great

i modified the code so it can also read dallas instrument temp sensors
and it uses rf switches to controll everything so its only connected to the network and the rest is wireless

however my code it noy all that eficient yer but it works

Code: [Select]
#include <SPI.h>
#include <Ethernet.h>
#include <DallasTemperature.h>
#include <RemoteSwitch.h>
#define ONE_WIRE_BUS 9
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xBE };
byte ip[] = { 192 ,168 ,1 ,15 };
byte gateway[] = { 192 ,168 ,1 ,1 };
byte subnet[] = { 255 ,255 ,255 ,0 };
Server server(5000);

String readString = String(30);



void setup(){
sensors.begin();
Ethernet.begin(mac, ip, gateway, subnet);
delay(500);
pinMode(3, OUTPUT);
digitalWrite(3, LOW);
pinMode(4, OUTPUT);
digitalWrite(4, LOW);
pinMode(5, OUTPUT);
digitalWrite(5, LOW);
pinMode(6, OUTPUT);
digitalWrite(6, LOW);
//Serial.begin(9600);
}

void loop(){

unsigned long code1;
unsigned long code2; 
unsigned long code3;
unsigned long code4;   
unsigned long code5;
unsigned long code6; 

code1 = 722;
code2 = 726;
code3 = 1694;
code4 = 1698;
code5 = 2018;
code6 = 2022;
code1 |= (unsigned long)315 << 23;
code2 |= (unsigned long)315 << 23;
code3 |= (unsigned long)315 << 23;
code4 |= (unsigned long)315 << 23;
code5 |= (unsigned long)315 << 23;
code6 |= (unsigned long)315 << 23;
code1 |= 3L << 20;
code2 |= 3L << 20;
code3 |= 3L << 20;
code4 |= 3L << 20;
code5 |= 3L << 20;
code6 |= 3L << 20;

sensors.requestTemperatures(); 
float temperatureReading_341 = sensors.getTempCByIndex(1);

// float temperatureReading_354 = sensors.getTempCByIndex(1);

//Serial.print(temperatureReading_341);


Client 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"))
{RemoteSwitch::sendTelegram(code1,10);
//digitalWrite(3, HIGH);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(3);
client.print("\"}");
}
if(readString.startsWith("GET /?out=3&status=0"))
{RemoteSwitch::sendTelegram(code2,10);
//digitalWrite(3, LOW);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(3);
client.print("\"}");
}


if(readString.startsWith("GET /?out=4&status=1"))
{RemoteSwitch::sendTelegram(code3,10);
//digitalWrite(4, HIGH);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(4);
client.print("\"}");
}
if(readString.startsWith("GET /?out=4&status=0"))
{RemoteSwitch::sendTelegram(code4,10);
//digitalWrite(4, LOW);
client.print("{\"status\" : \"0\" , \"out\" : \"");
client.print(4);
client.print("\"}");
}


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


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


if(readString.startsWith("GET /?out=9&status=1"))
{Serial.print(temperatureReading_341);
client.print("{\"status\" : \"ok\" , \"value\" : \"");
client.print(temperatureReading_341);
client.print("\"}");
}


//if(readString.startsWith("GET /?out=7&status=1"))
//{Serial.print("\n 10 f_MCP9700A \n");
//client.print("{\"status\" : \"ok\" , \"value\" : \"");
//client.print(temperatureReading_354);
//client.print("\"}");
//}


if(readString.startsWith("GET /?out=all"))
{
Serial.print("\n OUT ALL\n");
client.print("{\"ip\" : \"192.168.1.15\", ");
client.print("\"devices\" : ");
client.print("[{ \"type\" : \"light\", \"name\" : \"Lamp1\", \"out\" : \"");
client.print("3");
client.print("\"}");
client.print(",{ \"type\" : \"light\", \"name\" : \"Lamp 2\", \"out\" : \"");
client.print("4");
client.print("\"}");
client.print(",{ \"type\" : \"light\", \"name\" : \"Lamp 3\", \"out\" : \"");
client.print("5");
client.print("\"}");
client.print(",{ \"type\" : \"light\", \"name\" : \"Enable Rf\", \"out\" : \"");
client.print("6");
client.print("\"}");
client.print(",{ \"type\" : \"temperature\", \"name\" : \"Temp 1\", \"out\" : \"");
client.print("9");
client.print("\"}");
//client.print(",{ \"type\" : \"temperature\", \"name\" : \"Temp 2\", \"out\" : \"");
//client.print("7");
//client.print("\"}");
client.print("]}");
}
readString="";
client.stop();
}
}
}
}
}



nrmv105

Thaks!

But I have a WiShield V2.0 for conect to the internet, so, do you have the same example but with the WiShield Wifi libraries???

Go Up