How to save the data on the local Blynk server permanently and overwrite the data? In my case it is installed on a Raspberry Pi 3 to then use the data in the blynk application

Dear friends, I hope you can help me with your comments and points of view.
I briefly explain my project: I currently have installed the local blynk Server on a raspberry Pi 3 card; and a device that constantly sends data to the Blynk Server, the device consists of 1 arduino nano and a nodeMCU WiFi.

I have a little less than 1 year knowing everything about Blynk, currently the blynk server receives the data from the device and shows me in real time in the application, but when I turn off the server (raspberry Pi) all the data is lost. What I would like is some way to save the data up to a certain limit and then overwrite the information.

Thank you in advance for your time and help.

Do you have raw data storage enabled?

If so, are you wanting to purge your old data after a certain time because you are running out of storage space?

Can you explain more about this? It’s not something I’ve witnessed myself.

Pete.

My project consists of an electronic single-phase electric meter, the device senses the voltage and current of a residence and these data are sent to the Raspberry Pi server and I can see in the application through my cell phone the amount billed according to consumption and a historical picture of consumption per month, but when I turn off the server (raspberry Pi) the amount billed resets to 0 and when historical also ie no data.

As I do not handle very well the commands and configuration in the blynk I would like to know if after turning off the server and turn it on again the data is not erased.

Attached is an image of the application I made.

Interesting, but it doesn’t answer many of the questions I asked.

I’m guessing that you’re holding these accumulated values on your NodeMCU. Is this being turned off at the same time as the server?

Does turning the NodeMCU off then on again, whilst keeping the Pi powered on have the same result?

Pete.

They are not switched off at the same time as they are independent devices.
When I turn off only the NodeMCU the billing values are reset to zero (but I understand that it is a problem of my programming in the arduino) and the consumption history table is maintained which is what matters most to me now and when I turn off only the Pi the billing values and history table are reset.

I want that the values of the history table are always maintained.
And could you explain me about the raw data storage.

If you are looking to store only a few values search littleFS. I write most of my variables to littleFS every time they change so if the mcu reboots at anytime they are ready to be loaded from memory.

1 Like