Shares
Control Your ESP8266 Projects From Anywhere With aREST Pro

Control Your ESP8266 Projects From Anywhere With aREST Pro

Last Update: / by Marco Schwartz

In this tutorial, you will learn how to use the ESP8266 WiFi chip along with aREST Pro, in order to control your projects from anywhere in the world. Compared to the standard version of aREST, aREST Pro adds several features like a much faster server, a 99.99% availability and a device manager integrated inside the aREST dashboard website. You can of course try aREST Pro for free, for up to 5 connected devices!

In this article, we are going to use several of those features, including the auto-registration of devices and the device manager inside the aREST dashboard. As an example, we’ll simply learn how to control an LED from anywhere in the world from the aREST dashboard. Let’s start!

Hardware & Software Requirements

You will need an ESP8266 board, like the Adafruit ESP8266 Feather board that I used for this tutorial. You will also need one LED, one 220 Ohm resistor, a breadboard, and some jumper wires.

On the software side, you will need the latest version of the Arduino IDE (> 1.6.11):

http://arduino.cc/en/main/software

You will need to get & install the aREST Arduino library and the PubSub library. You can install those libraries using the Arduino library manager. You will also need to install the ESP8266 boards definitions for Arduino. You can find the procedure at the following link:

https://github.com/esp8266/Arduino

Hardware Configuration

Simply place the ESP8266 board on your breadboard, and then connect it to your computer with an USB cable.

For the LED, simply connect it in series with the resistor, with the longest pin of the LED connected to the resistor. Then, connect the remaining pin of the resistor to pin 5 of the ESP8266 board, and the remaining pin of the LED to the GND pin.

Creating an aREST Pro Account

The next step is to create an aREST account, and then select a Pro plan. For that, go over to:

https://dashboard.arest.io/

There, go into the Account tab. You should see a link that will allow you to select an aREST Pro plan. If you just want to try it out, you can select the Starter plan which is free. After your aREST Pro account has been activated, you should now see your aREST Pro key inside the account page:

Control Your ESP8266 Projects From Anywhere With aREST Pro

Copy this key, you will need to insert it in a moment inside the code that we will use to configure the ESP8266 WiFi chip.

Configuring the Device

In order to configure the device, you can simply use the default sketch that you will find inside the aREST repository, called ESP8266_cloud_pro. Inside this sketch, there are only two things you need to modify. The first thing is the WiFi name and password of your WiFi router:

const char* ssid = "your_wifi_name";
const char* password = "your_wifi_pass";

Then, simply insert your aREST Pro key inside the key variable:

char * key = "your_key";

After that, configure the board with the code using the Arduino IDE. Note that if you have more boards to configure, you can just use the same sketch: the boards will all self-register on the aREST Pro server, which is a pretty cool feature of aREST Pro compared to the normal version.

Managing & Controlling Your Devices from the Dashboard

Let’s now see how manage and control our device from the cloud. For that, we are going to use the aREST dashboard again:

https://dashboard.arest.io/

You might have noticed that compared to before (without activating aREST Pro), there is now an extra tab inside your dashboard, called Devices. Click on this link to go to the aREST device manager, only accessible for Pro users. Inside this page, you will see all your devices listed, along with some information about those devices:

Control Your ESP8266 Projects From Anywhere With aREST Pro

Right now, you should see your device that is online inside the device manager. Then, go to the Dashboards tab, and create a  new dashboard. Inside this dashboard, create a new element with the following parameters:

Control Your ESP8266 Projects From Anywhere With aREST Pro

Of course, make sure to select your device from the list that is available inside the element builder. This is also a feature exclusive to aREST Pro: you don’t need to enter manually the ID of the device, as you can just select the desired device from the list.

You should now see the newly created element inside this dashboard:

Control Your ESP8266 Projects From Anywhere With aREST Pro

You can now try to use the buttons: when clicking on the On button, it should immediately light up your LED, wether you are in your own local WiFi network or at the other end of the world!

Have you already tried out aREST Pro? What was your experience with it? Please share below!

Want to learn more about aREST?
If yes, join over 6,000 people who receive exclusive information about the aREST framework. You will also receive a free sample from my book, Discover the aREST Framework. Simply click on the button below!

Leave a Comment

Please enter your name.
Please enter your email.
Please enter your comment.
rameshwar a month ago
how to uplode code in esp8285
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Joshua 6 months ago
I am a new user to the platform, using esp8266 nodemcu module. I am successful when testing the esp to turn led on/off but when i set my cloud account i am running into an issue w/ thd drop down menu for the device id under the elements tab. (menu is blank & it will not allow me to enter in my device id that i created in arduino IDE. Also when i would try and connect to the cloud using the browser instead of connecting my board it just keeps pulling up a google search. Everything else has worked up till this point.....I would be interested in signing up for a paid membership, but i want to make sure i will be able to use all the functionality w/ my esp8266 1st. If anyone has a bit of information that could point me in the right direction it would be much appreciated....
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Jeff Hambleton 6 months ago
I used the free version. The software is nothing like your video. The pro version wasn't available in the examples. Your description wasn't compatible with the software. I could not get the ID to work. It said offline. I could not find the Pro Key. This program is a big mess and waste of time. Obviously just aimed to make money.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Shippy 6 months ago
Marco, Wonderful idea ! 1. Does this framework also support https with the ESP32? 2. Can we setup up our own cloud server with dashboard?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Siebe (The Netherlands) 8 months ago
Hello there is a problem with logging in to aREST, I have tried all possible web browsers also via mobile phone which also fails. Every time I get a successful registration, but if I want to log in, the wrong email address or password is reported.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
joshua Siebe (The Netherlands) 6 months ago
hey man had the same problem....i found that i had to type it in the blank, when i use the text prediction the text would show up but not work. SOUNDS CRAZY... just try it and hopefully it works for you like it did me. unfortunately software not allowing me to input my device id
Sabil 10 months ago
Hi, I can`t sign up. Does anyone have the same problem? Greetz
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Shital Chawre a year ago
Hi ,still arest dashboard not appearing on website our old dashboard not shown there now its more than 3-4 month. Still we are facing problem requesting u to plz solve
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Igor a year ago
Hi, Marco! How to create a new element in the Dashboard (dashboard.arest.io) now to control a robot by functions ("stop", "forward", ...) from a chapter 12 of the book "Internet of Things with ESP8266" Thank!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Ivan a year ago
Hi,your dashboard .arest is excellent.But I would have a question.It`s no to be edited ESP8266_cloud to be able to measure variables as need?I`m doing this with Reset now.Thanks Ivan
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Vikas a year ago
I am using ESP32 bootkit V1. I uploaded the "ESP32_cloud" from examples. Serial monitor shows that WiFi got connected and I also got the message "connected to aREST.io". However. I'm not able to see my device in https://dashboard.arest.io/devices. I've tried 2 boards so far. These are the changes I made to the example code: char* device_id = ssid: password:
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Daniel Grajales a year ago
Good day, I have a doubt, without registering how many interactions I could do with a device? Do you have any limits?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.