Incorrect timestamp when using bulk upload of several lines on Thingspeak

3 ビュー (過去 30 日間)
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 件のコメント
avner gideobi
avner gideobi 2020 年 4 月 28 日
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 2020 年 4 月 28 日
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

サインインしてコメントする。

採用された回答

avner gideobi
avner gideobi 2020 年 4 月 30 日
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 件のコメント
Christopher Stapels
Christopher Stapels 2020 年 4 月 30 日
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.

サインインしてコメントする。

その他の回答 (1 件)

avner gideobi
avner gideobi 2020 年 4 月 29 日
OK i think i finally got it.
  1 件のコメント
Christopher Stapels
Christopher Stapels 2020 年 4 月 29 日
Please let us know what worked when you get the chance.

サインインしてコメントする。

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeThingSpeak についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by