.
New Article: ESP32 online Web Remote Watch: Video

Online Web Remote for ESP32 Microcontrollers

  share with someone if you find it useful

ESP32 microcontrollers are a great option for building IOT projects. Built in wifi allows them to send and receive data from internet. This article will guide you to use your ESP32 with this browser based web remote, available as an out of the box web service.

Online Web Remote for ESP32

This DIY project needs no coding effort from your side. The code for ESP32 is already provided. You just need to embedd your authentication token (auth_token) in the code as described later in the article. If you have created an account on this website, then you would already be having your auth_token. Otherwise, create an account to receive your auth_token. Upon successful loading of code, your ESP32 will start talking to this (helloworld.co.in) website to receive commants from Web Remote.

No network configuration is required to be undertaken on your home router / network. Just make sure that the ESP32 is connected to internet through your wifi LAN or any other hotspot.

It requires just a few minutes to setup and configure your online web remote and ESP32. Once configured, you can start controlling the GPIO pins of ESP32  over internet. The setting up process is described below.

Set up your online Remote

1. First of all you need to create an account to generate and receive your auth_token via email. If you already have an account, simply login and access your online remote.

2. Configure your remote using the settings icon (cog icon on top left). The numbers in the text boxes of configuration page correspond to GPIO pins of ESP32. Once configured, a button is assigned to control a specific pin as shown in the example below.

Configure Web Remote to control ESP32

The pins you select on the Web Remote will be controlled on the ESP32. You need not modify the ESP32 code even if you change the pin numbers on the Web Remote.

Set up your ESP32

1. Download the code for ESP32 from this Github link. Paste your WiFi credentials and auth_token in the sections shown below. This ES32 code communicates with helloworld website to fetch the command generated by the Web Remote and control the GPIO pins accordingly. 

ESP32 code to connect with Web Remote

2. You can upload this code to your ESP32 using Arduino IDE. To parse the JSON data, I have used 'ArduinoJson.h' library (by Benolt Blanchon). You can download it from here and install it so that the code compiles successfully. Once installed successfully it should be visible in your 'Library Manager' as shown below.

Arduino JSON library for ESP32

3. In case you experience trouble while uploading the code to ESP32, press the Boot button for small duration while uploading the code. 

4. You are now all set to have fun with your online Remote and ESP32.  

States of a button

The various states of a button of the Web Remote during the command generation and execution are shown below. Single 'tick' on the button and lighter shade of the color indicates that the command is in transit and waiting at the server. Double 'tick' and darker shade of the color indicates that the command has been received by your ESP32 and actions is performed, working as a feedback to you.

State of buttons of Web remote of ESP32

Time involved between command generation and its execution on remote ESP32 may take upto 25 seconds. The state of the button (as described above) notifies whether the action is completed or pending.  

Control multiple boards

The web interface allows you to configure upto four remotes. That means, you can use these remotes to control 4 different / isolated ESP32 boards. The procedure to install code on each ESP32remains the same as described above. You just need to ensure that the value of ‘board_no’ in ESP32 code needs to correspond to the Remote no selected on the web interface as shown in figure below. Whenever using multiple ESP32 devices with this Web Remote, always ensure that board_no is different in all of them i.e. no two ESP32 should have the same board_no.

Control multiple ESP32 from Web Remote

Do let me know about your experience of using this Web Remote with your ESP32 in the comments below or send me an email at jitesh@helloworld.co.in

 


Comments

  • from Dermot Donnelly , 1 year ago

    Got this error when I tried to upload code. It may be nothing to do with the code. I used latest Arduino IDE 2.0.3. I was able to upload the simple BLINK example ok. Anybody else have this problem? I'm using the ESP32 board from the libraries supplied with IDE 2.0.3 and my board is ESP-WROOM-32.

    Compilation error: no matching function for call to 'ArduinoJson6200_F1::JsonVariant::as<char*>()'

    • from Spark , 1 year ago

      Thanks for pointing out. You need to install the ArduinoJson library (by Benolt Blanchon) to compile the code successfully. You can search and install it through your Arduino IDE or download it from the link provided in section 'Set up your ESP32' section above.

Leave a comment