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.
Siebe (The Netherlands) 2 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.
Sabil 4 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 4 months 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 9 months 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 10 months 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 10 months 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.
javad a year ago
Hi Dear Marco, for first time i tested this topic, it was work properly. but during some days later i tried to setup again in my ESP8266, i faced to some problems which are not available in my first time experience. 1- my ESP8266 time to time start to connecting to MQTTserver 2- my ESP8266 never be able to turn on the pin (display N/A in dashboard) what is the problem?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz javad a year ago

Sorry about that, we had a lot of new users during the end of the year period, so we had some issues with the server. Now we have a much bigger server so everything is back to normal :)

wtling a year ago
Hi Macro, thanks for your work. i try the library work nice for esp8266 with dashboard control just a small and simple pin 13 output control on off. but try the url method is fail as mention in webpage format cloud.arest.io//digital/13/1 in browser will get the message "message "Wrong API key or API key missing for protected device.", do the format was change
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz wtling a year ago
Thanks! It seems like you are using an API key, make sure to pass it as an URL query (?key=...) in your request
qwerty a year ago
I can't find https://dashboard.arest.io was the page deleted?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz qwerty a year ago
It's still there for sure :)
mesut a year ago
App Inventor Extensions ilgili bazı kodları paylaştım neden cevap yok
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Rollie Lucky from Philippines
Just bought Discover the aREST Framework
a few seconds ago verified by SiteEngine
Tim from Germany
Just bought Discover the aREST Framework
10 days ago verified by SiteEngine
John from Spain
Just bought aREST Cloud Access
15 days ago verified by SiteEngine
Marc-Olivier from Spain
Just bought aREST Cloud Access
15 days ago verified by SiteEngine
John from Spain
Just bought aREST Cloud Access
15 days ago verified by SiteEngine
Jeffrey from the United States of America
Just bought Hobbyist Plan
a month ago verified by SiteEngine
Ravivarman from India
Just bought Hobbyist Plan
a month ago verified by SiteEngine
Nicholas from the United States of America
Just bought Hobbyist Plan
a month ago verified by SiteEngine