August 20, 2017
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".
August 20, 2017
March 7, 2017
I think the intention of the timestamp field is to record the submission time. Using bulk update and relative timestamps will be difficult to get the behavior you hope for.
Is your goal to show the data with accurate datetimes on your channel page? One possible work around would be to use a MATLAB visualization to read the data from your channel and adjust the datetimes and then re-plot the data. If you use ThingSpeakRead() with the 'outputformat','timetable' then MATLAB makes it easy to shift your data. For example lag(TT,dt) shifts the data in time table TT by a value of dt. Then you can show that visualization on your channel page.
Most Users Ever Online: 114
Currently Browsing this Page:
Guest Posters: 1
Newest Members:harriettlf60, ShaToow, Aleftinfenny, DiaBentee, firstname.lastname@example.org, Pisaruk530
Administrators: Hans: 387, lee: 457