Please see the next reply
Hello, at first, Iāll describe the situation: for the battery saving, Iām using both deep_sleep and modem_sleep (turned off WiFi, but able to run my tasks) mode. Iām doing some log of measured data during the time and keep stored data in array like ātimestamp, valueā.
Time to time Iām starting WiFi, connect to Blynk and I wish to upload/post all the data in order to graph them in Blynk. Is there any way how to tell Blynk server, that despite they are send now, that the 1st value is 1 minute old, second is 2 minutes old etc.? In order to have correct and smooth graphs? I cannot connect to Blynk each time the new value is measured, since the battery drainā¦
Thanks for any advice.
Iām not quite sure if I understand your question. Well, each value sent to server is timestamped and stored with value. There is no need to send the timestamp from device side - it is added to value on server side.
Maybe I badly described my situation.
Values are measured in āofflineā state, I mean, in time when Blynk is not connected, and WiFi is turned off. That is a common state of the device in my project - to be āofflineā - because of the battery drain. During this āofflineā mode Iām measuring data in time intervals and storing them in the memory. Only when the memory is full, Iām starting WiFi, connecting to Blynk and then I want to post all my data (more or less from the past). The problem is, that it does not make sense, to post all measured values (during past couple of hours) with the same timestamp. The graph is not valid then.
Only I can do is to average measured data and post only this one, averaged value. But in this case Iām loosing a lot of details and resolution for graphsā¦
Ther is no facility (at the moment) to do batch uploads of historical data to Superchart.
If you want one reading per minute (the minimum Superchart granularity) then youāll need to wake-up every minute and upload your result in real time.
Pete.
Thank you, Pete for the instant reply.
So I decide to measure in 5 seconds interval, and average measured data after 120 measurements, than upload this average to Blynk. It means, that the best āresolutionā in graphs will be 10 minutes. It is the compromise between ācatching the spikesā in measured quantity, and power consumption.
If you havenāt already, you should probably read this:
http://docs.blynk.cc/#widgets-displays-superchart
Especially the bit at the end of that section about granularity.
Pete.
I got your point now. Then, as @Pete had already informed you, it is not possible with Blynk at that time. You would need a kind of X-Y plot which is not possible with Blynk at all at the moment and Iām not sure it had been discussed in the past. It is however already possible to store a āstructuredā value: the comma separated values stored with the same timestamp under the same variable (Vpin). But then you need to export that value and create the plot on your own. Iām sure you would not be satisfied with that solution