How to Control Your ESP8266 From Anywhere in the World

Hey there,

The most common questions I get about the ESP8266 WiFi Modules are: “Is it possible to control my ESP8266 from anywhere in the world?” and “How can I control my ESP8266 from anywhere?”.

I’m happy to announce today that I have a solution for that problem.

With the new version of Home Automation Server you can add an ESP8266 to your dashboard and control your ESP8266 GPIOs from anywhere in less than 5 minutes!

Let’s see how you can do that…

Watch the video demonstration below

Step #1 – Register Your Free Account

First you need to create your free account at Home Automation Server. Go to http://app.homeautomationserver.com/register, type all your details and submit your registration.

Then go to your email address, confirm your account and login into your account.

Important: Please note that this is the new version of Home Automation Server, if you already created an account in the old Home Automation Server your account still works with the same login details. You can reset your password here.

1_has

Step #2 – Adding an ESP8266 to Your Dashboard

When you login for the first time you’ll need to click the green button that appears (see Figure below) that says “Click here to add your ESP8266”.

2_has

You  also need to upload some Lua code to your ESP8266. Click the gray button “First time here? Click here to generate your ESP8266 code”.

3_has

Follow the instructions that appear below the gray button:

  1. Flash your ESP8266 with NodeMCU firmware
  2. Upload the code generated at Home Automation Server to your ESP8266
  3. Follow these schematics below to control 2 LEDs with your ESP8266

Step #3 – Test It

Now you can control your ESP8266 GPIOs from outside your home network using any device that has browser!

Click the “Turn On” buttons to make your ESP8266 GPIOs go HIGH.

featured_has

 

NOTE: The GPIOs of your ESP8266 are updated every 20 seconds, please respect the API calls limit so we don’t overload the server. Thank you!

Do you have any questions or feedback? Leave a comment down below!

If you like this post probably you might like my next ones, so subscribe my blog and my Facebook page. Thanks for reading,

-Rui Santos


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

30 thoughts on “How to Control Your ESP8266 From Anywhere in the World”

  1. Hi Rui
    Great tutorial! Thank you!
    Is it possible to send data BACK to the site from the ESP?
    State of led / temperature perhaps?
    Any plans on a MQTT tutorial?
    Rgds
    Vleis

    • Right now I don’t plan to add MQTT, but I want to add the option to send data from the ESP8266 to Home Automation Server.
      Thanks for your suggestion,
      -Rui

  2. Do you know how to do this if I programmed my ESP8266-01 using Arduino IDE?
    I cant seemed to program my ESP8266 using ESPlorer so I decided to use Arduino IDE.

    Thanks

  3. He rui ..now I am in final year b.tech ..my project control robot through iot like Ethernet shield or esp 8266.. Move robot forward, backward,left ,right …how I make..give me suggestion

      • u have work any gsm base controll robot ..put sim card in sim 900 gsm board & generate gprs so we controll robot through server website…sim900 gsm board interface with arduino uno………….
        & 2nd
        i am new in programmer how to controll robot like forward,backward,left,right,stop through server(IOT)..ethernet shield interface with arduino uno…give me code like controll robot forward,backward,left ,right,stop of arduino scketch & server code

  4. Hi Rui,
    very nice tutorial, i would to ask you 2 questions:
    1) if i want to control more than 2 output(LED), what can i do? is there another module?
    2) in this case is necessary to use a breadboard? I wanted to control a relay board
    Thanks

  5. Found the problem and though I should report the solution for other readers. The default NodeMCU install I had did not include the CJSON module. Fortunately Marcel Stoer’s custom build site allowed me to include this with the other reported modules as reported after a restart. His site is nodemcu-build.com. Hope it helps as this has cost me a couple of days – but I learned a lot including that not all answers come from google!

  6. This does not work with the ESP8266 – 12E board. There are compile errors when running the code, The information provided is unclear. What network name? What is #payload ?
    No need to go to any trouble trying to help me get this working because I am moving on to other solutions. Thanks anyway.

  7. Hello,
    we are from 4semitechnology Pvt Ltd, i tried to upload the code for ESP8266-01 but i am getting an error in uploading it. I have an doubt that should to use ESP dashboard app, should i download any related app or named as “dashboard” only.

    • Hi Karl.
      We’re no longer working on home automation server. We no longer accept registrations.
      I’m sorry about that.
      Regards,
      Sara 🙂

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.