• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Using HTTP GET as wakeup?

Q&A Forum › Category: ESP32 › Using HTTP GET as wakeup?
0 Vote Up Vote Down
Ross Satchell asked 5 years ago

Hi,
Thank you for your excellent guide!

i am working on a project for my garden that uses capacitive soil moisture sensors with an analog output.
I have written a class that I use to calibrate the sensors (wet soil and dry soil) which I call by using a touchpad wakeup, so that it only runs when I want it to.
I also have the ESP32 sleeping for 2 minutes, then waking and taking soil moisture readings (and BME280 readings), before going back to sleep again.
Now I want to integrate the Webserver example and have the readings update on the webpage every 2 minutes, or if someone sends a HTTP GET request, but I am unsure how to do this.
Can a HTTP GET request be used as an interrupt? Or can I use the last readings taken to populate the webpage? Or would you suggest a different way to approach this?

Thank you 🙂

5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Ross.
Thank you for sharing your project.
I didn’t understand if you want to run the web server on the same ESP32 that is taking readings or in a different ESP32. Can you clarify that?
The ESP32 that is sleeping can’t be used as a web server because it won’t be accessible because it is asleep.
What web server example were you looking for to integrate in your project?
Regards,
Sara

0 Vote Up Vote Down
Ross Satchell answered 5 years ago

Hi Sara,
Thanks for your reply.
I am currently using the Webserver – Display Sensor Readings example, and have successfully modified it to display my Moisture Sensor readings along with the BME280 readings in a local webpage.
My plan was make the ESP32 in my garden battery powered and set up solar charging for the battery. To reduce power consumption I planned to make it sleep most of the time and wake at 2 minute intervals (or when I touched a touch interrupt pin, which would be used to calibrate a soil moisture sensor).
So if I am understanding correctly, I would need to use 2 x ESP32’s: one in the garden (sleeping most of the time), and one as the webserver. Is that correct?
If that is correct, how would you suggest I set up the communication between the 2 ESP32’s?
An alternative may be to use a larger battery and solar cell combination to provide the power requirements for a single ESP32 that is always on?
Eventually I want to :

  • set up a pump to automatically individually water the plants based on their needs
  • get weather forecasts and decide whether to water based on soil moisture and rain forecast
  • track weather conditions over long periods and perhaps compare to previous years
  • possibly contribute to something like WeatherUnderground (although it looks like it is being killed off?) 
  • maybe even add a webcam of my garden 

Thanks,
Ross
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi again.

Yes, if you want to use deep sleep, you’ll need two ESP32 boards.

To send the data between boards, I suggest using something like: Wi-Fi, or LoRa, or ESP-NOW.
See some examples:

  • https://randomnerdtutorials.com/esp32-client-server-wi-fi/
  • https://randomnerdtutorials.com/esp-now-two-way-communication-esp32/
  • https://randomnerdtutorials.com/esp32-lora-sensor-web-server/

If you want to use a single ESP32, it will consume a lot of power with the Wi-Fi always powered on. But you need to see the power consumption and check if your solar panels and battery are able to keep up with the demands.

Thanks for sharing your project.

Regards,
Sara

0 Vote Up Vote Down
Ross Satchell answered 5 years ago

Hi Sara, 
I think I’ll go the WiFi Client Server route. Ill post back and let you know how I go.
 
Thanks for your help!
 

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Great!
You’re welcome 🙂

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.