Historical data visualization

Hi everyone, I have a project where I'm recording sensor data and visualizing it on Arduino cloud using the dashboard so the problem here is the device is located in a place where the Internet connection might come and go from time to time so to prevent loss of data I plugged a USB stick to my OPTA which will keep recording the sensor data to a new csv file everyday. What I want to do is be able to visualize the "lost" data when the connection to the cloud was not available by sending the data from the csv file to the cloud with timestamps to be able to see it.

Is there a way to do this?

Any kind of suggestions would be helpful Thanks!

You need a way to determine whether the data was successfully logged in the cloud or if an update failed.

Once you have that information, one approach could be to write all data to the local "complete" log as usual while also adding failed entries to a separate file.

Once the internet connection is restored, you can resend the data from this file, confirm it has been received, and then clear the file.

Annoter way is to add a flag in the global log to say if the cloud update went fine or not and use that to push the missing ones. But that means scanning the whole file, which might be long.

1 Like

Sounds like a queue. Write new data to the tail, take data off the head when internet is available.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.