• 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

IOT & Deep Sleep

Q&A Forum › Category: ESP32 › IOT & Deep Sleep
0 Vote Up Vote Down
Ian Mather asked 4 years ago

My needs are simple I want to have the means to check the temp & humidity at home from anywhere.
I had deep sleep working with Blynk but no data, I then had data & no deep sleep I am getting help on the forum but there has to be a simple way to achieve what I want. If I leave the ESP32 on all the time it is very hungry for battery power.
Thoughts please?

10 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Ian.
 
I’m not familiar with Blynk, so I’m not sure what’s the issue with your project.
Does blynk save your readings on a “database” or something?
 
How often does it send the readings? How is your program structured?
What happens exactly when you add deep sleep to your example?
 
We have an example using Firebase. It sends data to the database, and then it displays it on a web page accessible from anywhere: 

  • https://randomnerdtutorials.com/esp32-firebase-realtime-database/
  • https://randomnerdtutorials.com/esp32-firebase-web-app/

You can add code for deep sleep, and the last readings would still be visible on the web page because they are saved on the database.
 
Regards,
Sara

0 Vote Up Vote Down
Ian Mather answered 4 years ago

Thank you I will check that out.

Wow that is very in-depth, is there nothing simpler?

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

It takes some time to understand how it works, but once you understand you’ll see that in fact, it is pretty simple.
 
I’m not sure about blynk? Is it accessible from anywhere? If it is, the deep sleep code should work with it too.
How is your code structured?
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

If I’m understanding correctly, all you want to do is to be able to check the current temperature and humidity inside your house when you are on the road (Or, basically, anytime you’re away from the house). Using something like Blynk is a good target architecture but maybe is beyond your means at this stage.
 
There are a number of ways to achieve what you want. Is going to sleep a must have? Does the ESP32 have to run on batteries? If so, You will need an always on server somewhere to store the values you are sensing. Sara has suggested using Firebase but there are quite a few others. You could just use a hosting service with a database. Or use a Cloud MQTT Broker. You could even use your own in house MQTT Broker running on a Raspberry Pi that is available to the wider internet using NGrok.
 
Here are a few articles that may pique your interest:
https://randomnerdtutorials.com/cloud-weather-station-esp32-esp8266/
https://randomnerdtutorials.com/cloud-mqtt-mosquitto-broker-access-anywhere-digital-ocean/
https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/
https://www.sitepoint.com/use-ngrok-test-local-site/
 
My recommendation would be to learn MQTT (Colloquially “Mosquito”). Once you figure out the publish/subscribe paradigm you’ll be using it constantly 😉
 
 

0 Vote Up Vote Down
Ian Mather answered 4 years ago

I have signed up with firebase, I combined your two tutorials (esp32 + DHT22) & Firebase one.
I am seeing data in the serial monitor but nothing on Firebase, any chance of a future tutorial for DHT22 & Firebase?

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

Hi.
What tutorial have you followed?
Can you show me any errors that you’re getting?
Regards,
Sara

0 Vote Up Vote Down
Ian Mather answered 4 years ago

ESP32: Getting Started with Firebase (Realtime Database)


Esp 32 + dht22 
I am not seeing any errors because I am sure I have missed a few key steps.
Thank you for your patience
 
 
 

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

All the needed steps are mentioned on the tutorial.
Make sure you don’t miss any steps and you’ll get it working.
First, try to use the default code we provide, and only then modify the code to add your readings.
Let me know if you need help with any of the steps.
Regards,
Sara

0 Vote Up Vote Down
Ian Mather answered 4 years ago

I have Firebase up & running, I have added the deep sleep function and it is working great.
An app on my phone would be nice showing the temperature & humidity?
Is there a way to add widgets like Blynk & the others rather than a line of text?
Mank thanks
Ian

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

No.
With Firebase to build the web app, you need to create the web page yourself using HTML, CSS and JavaScript.
Regards,
Sara

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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.