This post may contain affiliate links. See the Affiliate Disclosure for more information.
Use of information on this site is at your own risk. View the Terms of Service.

AD: This post was reviewed by Grammarly, the Best Automated Proofreader.

Home automation is a trending topic these days so I wanted to share with you a new project. We are going to control AC appliances over the internet using an Android phone from anywhere around the world. I used an ESP8266 development board as the main controller.

Here  we will be using RemoteMe services. If you have no experience with RemoteMe, Check out “Control Devices using NodeMCU” and “Weather station” tutorials to get a general idea.

CAUTION: Alternating Current is very dangerous and accidental shock could be fatal. Only work with AC appliances if you are 100% sure you know what you are dealing with. We shall not be held responsible if you cause any harm to yourself or anyone else.

With that said, let’s get started.

What is RemoteMe?

I decided to start with a simple introduction to RemoteMe for those who do not know what it is and what you can do with it.

  • Facebook
  • Twitter
  • Pinterest
RemoteMe is a web application that is used to communicate with devices like Arduino, NodeMCU, Raspberry Pi, etc. With the RemoteMe application, you can host a website to control your devices in the RemoteMe cloud.

Only you and the users who have the generated key have access to those websites. You can have as many pages as you want, and it’s totally free! RemoteMe also has a built-in code wizard, so you don’t have to write all of the Arduino code from scratch. All you need is an account on RemoteMe to use its features.

What is Arduino Remote LITE ?

  • Facebook
  • Twitter
  • Pinterest

Arduino Remote Lite is Android application which can be used to remotely control your projects via Bluetooth or WiFi. It can also be connected to RemoteMe server to control Relays and other such devices. You can download this app from the Playstore. Here is the link.

Smart Home Automation Project Components

Hardware

  1. ESP8266 dev board (You can use an Arduino with an ESP01 module)
  2. Relay board (I have used a 4 ch relay, you can even use 8 ch or 16 ch relays)
  3. Breadboard (For prototyping, you can make it permanent on PCB if you want)
  4. Male to Female jumper wires
  5. 9v battery (To power the relay)

Software Components

  1. Arduino IDE. (To upload the code)
  2. RemoteMe account.
  3. Arduino Remote Lite app

Set Up the Arduino IDE

First things first, We have to set up the Arduino IDE and install all the required libraries.

In order to be able to program the ESP board, you need to configure the Arduino IDE.

Once the ESP environment is ready next step is adding the libraries required for RemoteMe connection. Open the Arduino IDE and Goto >> Sketch >> Include Library >> Manage Libraries. A pop will show up where you have to search the required libraries and install them one by one.

  • Facebook
  • Twitter
  • Pinterest

Libraries you’ll need to install are as follows:
* RemoteMe.h
* Remotemeutils.h
* RemoteMeSocketConnector.h
* RemoteMeDirectWebSocketConnector.h
* ESP8266WiFi.h
* ESP8266WiFiMulti.h

Once these libraries are installed, the IDE is ready to work with RemoteMe.org.

Configure RemoteMe

First head over to RemoteMe.org, and signup if you haven’t already.

Now install the Arduino Remote Lite apk, and sign in using the RemoteMe account. Once that is done, go back to RemoteMe website to create variables.

Follow the following steps carefully:

After logging in goto ‘Variables’, here you will notice a list of variables created automatically by the ‘Android Remote Lite‘ app. We will be using these variables to control the relays.

Weather Station using NodeMCU Tutorial
  • Facebook
  • Twitter
  • Pinterest

 

Now above ‘Variables‘ there is another option named ‘Devices‘ click on it and a new page will load where you can create devices.

  • Facebook
  • Twitter
  • Pinterest

Click on ‘New Devices‘ option on the top right corner, a drop-down list will appear. Select the last option ‘New Network Device‘. Now give the device a name like ‘Relay‘ or ‘Automation‘ or anything you want. Also, give the device a unique ID so the device is recognized and differentiated from other devices.

  • Facebook
  • Twitter
  • Pinterest

Generating Arduino Code

After the above step, a new device will appear. Now we have to generate the Arduino code. Click the burger menu (Represented by 3 horizontal lines). Then, select ‘Code Generating Wizard.‘ You will see a popup window with a list of all the variables generated by the App.

  • Facebook
  • Twitter
  • Pinterest

Scroll down to find the list of relays. As here I am using a 4 ch relay, I will select the first 4 relay variables, If you are using 8 / 16 ch relays. select the numbers you require and click on ‘Next

  • Facebook
  • Twitter
  • Pinterest

In the next step enter your WiFi name and password and click on ‘Next‘.

  • Facebook
  • Twitter
  • Pinterest

You also have an option to enable ‘Enable Direct Connection.‘ If you enable this option, the App will connect to the device directly without the internet if the Smartphone is in the range of the WiFi.

  • Facebook
  • Twitter
  • Pinterest
In the next step, enable the Debug option, and hit next. Now you can download the code to your computer. We’ll need to edit the code to set the I/O pins.
  • Facebook
  • Twitter
  • Pinterest

Modify the Home Automation Arduino Code

If you’ve already used RemoteMe, this part should look familiar. Make modifications as needed for your project. Or, you can download our modifications.

Wire up the Electronics

Now that the software is ready, we can wire up the circuit board.

Here is a circuit diagram:

  • Facebook
  • Twitter
  • Pinterest

First, place the ESP8266 board on Breadboard, and connect the GND pin to the -ve rails on both sides.

  • Facebook
  • Twitter
  • Pinterest

Now connect some male to female jumpers to the relay board. Refer to the pictures below for the connections.

  • Facebook
  • Twitter
  • Pinterest

Next, attach a 9v battery clip to the breadboard. It will power both the Relays and the Logic circuit of the relay board.

Then, connect the wires of the Appliance you want to control. The AC appliance will have 2 wires. First, cut the live wire and connect one end to the center terminal of the relay and another end to the normally open terminal.

  • Facebook
  • Twitter
  • Pinterest

Now, we can move on to test the build. First power up with 9v battery. If you want to power the ESP board with the battery as well, just connect the Vin pin of ESP board to +ve rail of the breadboard. Then you don’t need to connect the USB cable.

  • Facebook
  • Twitter
  • Pinterest

Open the Arduino Remote Lite app, Head over to the 3rd option “Relay Control” from here you can control the Relays with the switches. Finally, when you trigger the relay from RemoteMe, the lamp should turn on and off.

Hope this post was informative and helpful. If you have any questions, please drop a comment below!

Would you like to learn how to build robots? Join our new Robotics eCourse. For more tutorials like these, consider sending us a Coffee.

Like my work? Keep me caffeinated.

global robotics competition online

Get Notified of the Next Competition

 

Be the first to know when we launch our next online robotics competition. Plus gain FREE robotics tips to your inbox.

You have Successfully Subscribed!

liz miller learn robotics


GIVE ME 1 WEEK IN YOUR INBOX

Gain Access to FREE robotics projects.

You have Successfully Subscribed!

GET YOUR FREE COPY

Enter your email below!

Get ready to build a tiny robot! Check your email for the download!

Gain Arduino Skills, FAST!

Take our online Arduino for Beginners Course, and learn to build projects using Arduino.

Enter your email to receive more information about the course.

learn to prototype with Arduino online course

You're in! Check your email for some awesome updates!

Pin It on Pinterest