Incorrect timestamp when using bulk upload of several lines on Thingspeak

3 visualizzazioni (ultimi 30 giorni)
Using bulk upload in a CSV format to store IoT logs onto Thinkspeak.
My IoT (ESP32) will bulk upload few (~10) lines by the end of a cycle, once in about an hour.
However, ont he time line (both on automatic charts and on export) it seems that the lines are spread on over an hour, so actually I have no idea when this is really happened.
the two following pictures demonstrates it well: both "points" where reported at the same time using a simple bulk update call, but reported like it was posted 40 minutes apart. this is consistent with the data exported in the export function. However there, it is 10-15 seconds shifted from the time on the chart... (?!?!!?)
Why is the timestamp incorrect and spead over time ?
How can I make sure I get the correct timestamp to a log submitted ?
thanks!
  3 Commenti
avner gideobi
avner gideobi il 28 Apr 2020
Thanks Christofer.
relative.
here is an example for the POST message:
write_api_key=XXXXXXXXXXXXX&time_format=relative&updates=999,706,1,1,14,22.00,91391064,250348,122719,,,,New configuration available: 200|999,706,1,1,15,22.00,91391064,250379,31,,,,Server Configuration refreshed|
avner gideobi
avner gideobi il 28 Apr 2020
Also, as implied by your answer tried (well for six hours now) to use absolute timing:
but failing with HTTP/1.1 400 Bad Request.
here is the POST section:
write_api_key=XXXXXXXXX&time_format=absolute&updates=
2020-4-28T22:30:58-1768,3,0,2,1,,91449512,1768,1768,,,,This is boot No. 0 of Device |
2020-4-28T22:30:58-4229,2,0,2,2,,91449512,4230,2462,,,,Device found. Device name: 703|
2020-4-28T22:30:58-4232,2,0,2,3,,91449512,4232,2,,,,Participating in 2 plans.|
2020-4-28T22:30:58-4247,3,0,1,4,,91449512,4248,16,,,,Network configuration loaded and parsed succesfully|
2020-4-28T22:30:58-4278,2,0,1,5,21.00,91449512,4278,30,,,,Temperature: 21.00 Humidity: 52.00|
2020-4-28T22:30:58-4279,3,0,0,6,21.00,91449512,4278,1,,,,Initialization Completed.|
2020-4-28T22:30:58-4286,2,0,2,7,21.00,91449512,4286,7,,,,Going to wake in 3600|
2020-4-28T22:30:58-4287,1,0,2,8,21.00,91449512,4286,0,,,,Going to sleep now for 3600 secs....This cycle took: 4287

Accedi per commentare.

Risposta accettata

avner gideobi
avner gideobi il 30 Apr 2020
sure.
I missed two points in the format, nothing that eight hours of debugging can't solve ;-)
first the format YYYY-MM-DDTHH:MM:SS-XXXX - i tought that the XXXX is miliseconds. of course it is not.
secondly, i got failures as I submitted multiple events with the same second timestamp. as the logs arent consistent it was hard to understand what was the problem.
Some more verbose error messages would have been helpful.
thanks.
  1 Commento
Christopher Stapels
Christopher Stapels il 30 Apr 2020
Thank you for updating. Ill make a request to improve the error messages if possible. Unfortunately the bulk update flow has some special difficulties for reporting errors in real time.

Accedi per commentare.

Più risposte (1)

avner gideobi
avner gideobi il 29 Apr 2020
OK i think i finally got it.

Community

Più risposte nel  ThingSpeak Community

Categorie

Scopri di più su ThingSpeak in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by