Hystoric data under bad internet

I have a situation where the internet is not as stable as we can desire.

Edgent is a great value that I would like to keep.

I’m looking for a smart way to keep something like a data log in web console where I could keep some registers of task done by the device.

With Edgent, if there is no Internet connection for a while, the device will start a loop of reset, stopping doing its tasks until it reach internet again.

There is any way to send some data to the server that can be shown in the web console in a way to check a least what the device done during it’s stable internet connection?

any ideas?

I’m not 100% sure what you’re asking, but I suspect that you may be saying that once the internet connection is restored, you’d like to upload some information about data that was collected during the offline period?

If so, then the HTTP(S) API is one option…


You could also use Events. These would have the wrong timestamp, but the event description could contain some information about times, dates, values etc.

It really depends what exactly you wnat to achieve, and how good your coding skills are.


Thanks Pete, as usual you are always ready to help.

My problem is when the device get offline for some time, it stop working because of Edgent. It starts a cycle of rebooting until it reconnects.

That period of time,the device stop doing its works.

In my specific case, the device dose a chemical element every some time to an aquarium.

I was thinking in sending some data to the server like a log, with every dose done.

In that way, if the user have some way to see that log on the web console, just seeing the not listed doses, you can determine what wasn’t dosed because of the offline (not working) period.

Events are what you should use then.


This is how i record informational events relating to my solar lighting…


Thanks Pete!

1 Like


Do you know if there is any way to keep in events just the last 100 records?

When the events reach the 100 records, it stops receiving any other event.

That’s because you’re exceeding the limits for the number of events per 24 hour period.


Yes Pete, I know the reason. And I know that you can reset the event counter on the web console.

My question is if there is any way to automatically reset the event counter or just keep the last 100 events like a FIFO logger.

No, the 100 event limit is there for a reason.
Why on earth are you dosing your tanks more than 100 times per day?


Because in Reef aquariums you need to keep the ionic balance as much stable you can.

More doses per day means a more stable Reef aquarium.

What quantities are we talking about?


The doser I made allows a maximum of 2800 doses per day (every 30 seconds)

Is your code written so that it continues to dose the aquarium when not connected to Blynk, and if so does this work effectively?


I’m using Edgent.

When the device disconnect from Internet, the Edgent code start a cycle of rebooting until it connects to bkynk again.

But in that Cycle, the device stop doing the dosing.

I’m starting the Edgent in setup.

Why have you chosen to use Edgent?


Because of the dynamic authtoken provided by Edgent.

It’s very useful when a new version of my code is ready anc it can be send overt the air to the device. Without Edgente I would have to take care of the specific device Authtoken before sending any update.

So how many devices do you have?


About 15

Maybe you should explore the possibility of using ESP32 devices and running the Edgent code in one core and the dosing code in the other, so that the dosing continues even when there is no internet connection.


1 Like