Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

Pavlo on How to properly use relative timestamps via delta_t in REST API?

$
0
0

This is about relative timestamps mentioned in REST API https://www.mathworks.com/help/thingspeak/bulk-update-a-channel-feed-1.html

Docs states "For devices without a real-time clock, you can use relative timestamps instead of absolute timestamps. Replace the "created_at" with "delta_t"inside the updates JSON object to use relative timestamps. Here, "delta_t" represents time in seconds passed since the last measurement was recorded."

I thought it's somehow for buffering values and then submitting them at once. Should be great feature.

Intention is more or less clear, but I can't match it with TS' behavior that I see. Or, maybe,  I'm using it in some wrong way.

Actual behavior is that if I submit series of field values, TS interprets it in a way like 1st record in a series is submitted "now" and all consecutive records get's time "now"+delta_t; that is a kind of "in the future" and not in the past as I thought it should be.

I've tried to use negative values s delta_t - no luck.

I also tried to send delta_t of first record as zero and non-zero values. Though it will trigger TS to use zero as "now" and all consecutive submissions as really "relative" to this 1st series. No luck.

 

Please advice if I can somehow get it working in a way so TS treats values as "from the past" and not "from the future".


Viewing all articles
Browse latest Browse all 1833

Trending Articles