Smart Home Automation With Android + Ethernet Internet + Arduino





Introduction: Smart Home Automation With Android + Ethernet Internet + Arduino

Home automation becomes more and more popular, affordable and fascinates people. Internet offers such possibilities as never before. Impress your friends showing on Smartphone that you can switch on/off lamp in your apartment miles away and simultaneously see it through a webcam, opening doors. Very cool!

// --------------------------------------------------------

Step 1: Materials

Smart Home Automation with Android + Ethernet Internet + Arduino

01 - Smartphone with Android 2.3+

01 - Wire Ethernet + Router (My Model is TP-Link (TL-WR740N)

01 - Arduino Mega 2560 ou Arduino Uno + Shield W5100 (Ethernet)

01 - Led IR (Optional)

// --------------------------------------------------------

Step 2: App Inventor (application That Control the Arduino Via the Internet)

First you need create an app android, in this case I use an app inventor 2 link:


(Tutorial: AppEthernet - App inventor 2 / Channel: Android e Arduino)

Download .aia to my project, if you need change this application to English, because I created in Portuguese (Project .aia)

Download App to install in Android:


Step 3: Sketch to Arduino Mega - Code Link Download

Download link in the end code:

You need change:

byte ip[] = { 192, 168, 0, 00 }; // IP the arduino

EthernetServer server(80); // Port acess


01 - You need a version IDE 1.0.5 - the code does not work in IDE 1.0.6 because of IRremote library

02 - Every 4 seconds the page automatically updates, if you need change: client.println('<'MET A HTTP-EQUIV='refresh' CONTENT='4; URL='>");

03 - In application "SmartHomeAPP" you need change to a URL='

04 - Change the LED IR code to turn on or turn off your TV or Stereo

Lindo Download Sketch Arduino INO

How can you creating a

Acess the link: or


Step 4: Understanding the Code and Main Features

The methods "Get" send the variable for arduino, you can see in the piece of code:

if (c == '\n') {

if (readString.indexOf("lampada1") > 0) {

digitalWrite(lampada1,!digitalRead(lampada1)); }

//--------- send the page a variable "lampada1"

then the Arduino reads the full page and returns a method "Get" you can see in the piece of code:

//botao lampada1
if(digitalRead(lampada1)){ statusLed = "Ligada"; }

else { statusLed = "Desligada"; } client.println("

Lampada 1 - "+statusLed+"


//--------- in this piece you can see "+statusLed+", it returns to the relay this on or off on page




  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • Science of Cooking

    Science of Cooking

We have a be nice policy.
Please be positive and constructive.



Can i get the circuit diagram and wiring diagram???


excellent project congratulations, here functioning everything perfectly, only has a problem, after a time on circuit it stops/congeals, already I made of everything I changed the source, Internet and nothing, it helps me


i need your guide on my project cause im doing bluetooth and arduino to control home applicance...plz respond as sson as possible

Nice job AlanV2.

Please someone re upload or send me .aia file because the link not work anymore....

you got the link? someone could help please?

OK i got the .aia file. Thanks.

Sir, can you switch on/off your appliances even if the android application is connected to a different internet connection?

hi .am doing a house automation project an your project inspires me a lot .while reading i cannot understand the first part of the connection between smartphone android and the arduino how it works.

as am not a premium user i cannot download your pdf .could you send me it on my personal e-mail :


Hello there, I too with my team working with the same project. We can't avoid to have confusion with the connection especially with the code if there are some lines of functions that we need to be dealt with according to the address of the router. If you had the pdf my friend, It would be a great help for us to complete the project. Here is my email: Hoping for your response, Thank You