Logging Data with ESP32 Deepsleep and updating app when open

I’m working on a project that is fairly simple in terms of readings and data, but is difficult due to the timing of the readings and connections. Below is the basic function:

  1. Device turns on
  2. Takes readings
  3. Connects to Blynk
  4. Sends Data
  5. Goes into DeepSleep for 10mins
  6. Repeat

In terms of the Blynk App I want to be able to see the Gauge show the the latest update. So if I turn the App on 8mins into the 10min deepsleep, I see the latest reading before the deepsleep started.

I’d also like to use Super Graph and see the full history of readings.

I’m using ESP32, and want to use the hosted Blynk product, not host it myself.

Is this possible?

Thanks for any help in advance.

Yes, of course… Blynk is a great GUI interface for IoT. You will however need to learn some basic programming to get into something more mid-level advanced like this.

Start by using the search facility of this site for others who have made similar DeepSleep projects. As well as reading through the Documentation and Help Center files (all these links are at the top of this page) and we suggest you start simple with the basics Sketch Builder examples, and learn how Blynk works.

Spend some quality time with G :eyes: gle learning about ESP32 DeepSleep and then start the step by step process of putting your project together.

As you run into questions about Blynk commands, settings, etc, be specific, supply details and (forum formatted) code and we will try to assist.

@Gunner thanks very much for your response.

I have searched both this site and google for answers and did not find that they fully answered what I was asking.

Furthermore, the person on my team who is doing the programming reached out to someone at Blynk and were informed that this exact functionality was not currently available. It could have been some communication issue, or perhaps a free vs paid issue.

Regardless I wanted to reach out and post the question just to see if there were other opinions. Based on your answer it could be possible.

Just to clarify though. If the user opens the app after 6 months, which at 10min reading intervals would be 26,000 readings, the Super Graph will show each reading. (as an example of functionality)

Thanks again for your help.

Your MCU and Blynk’s cloud server are generally independent of the app so data would be posted to the server when the app is not being used, providing the project wasn’t stopped in the app.

@Dmitriy would SuperChart pickup the data if the MCU is sleeping or would the OP need to do an API call to retrieve pin data for a 6 month period?

Also the OP asked:

In terms of the Blynk App I want to be able to see the Gauge show the the latest update. So if I turn the App on 8mins into the 10min deepsleep, I see the latest reading before the deepsleep started.

Would the app need to be running permanently for the gauge to show the correct “pre-sleep” value?

Yeap. Or I didn’t understand your question.

@Dmitriy I was thinking of the averaging that you used to have in the basic Graphs. Does it still exist in SuperChart and if it does presumably it would be picking up zero values for 99% of the time i.e. during deepSleep, and distorting the values.

Just letting everyone know, that it seems that this is possible with some slight tweaking to get the right results. Thanks everyone for their help.