Time offset between plotted and read data | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Time offset between plotted and read data
No permission to create posts
December 19, 2019
6:59 pm
Avatar
chalten
New Member
Members
Forum Posts: 1
Member Since:
December 19, 2019
sp_UserOfflineSmall Offline

Hi to all,

when I use the 'Template MATLAB code for visualizing data from a channel as a 2D line plot using'PLOT' function' (ThingSpeak->Apps->Matlab Visualizations) I see a time discrepancy between the data stored in the channel and the plotted data.

The data acquired with 'thingSpeakRead' have a correct timestamp, as I can check exporting them in a .csv file (1 point each 5 minutes).
But when I plot the same (last N) points with the above procedure, I see the data only until -1 hour before- the last stored point. Last plotted data is 1 hour older than last stored data.

I suspect the problem is related to the time zone (i am in the UTC+1 zone) but I am not able to correct the procedure in order to 'align' plotted and stored data.

I found similar topics in the forum but not an effective solution to the problem.

Can someone help me?

Thanks in advance,

chalten

January 3, 2020
9:36 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 807
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Is your channel a public channel? If so can you share the channel number so I can take a look at the data?
You can adjust your preferred time zone in account > my Profile

You should be able to adjust the timestamps using a MATLAB analysis. If you read with outputVariable=thingSpeakRead(...,'outputformat','timetable'), you can adjust the timestamps with regular math. You can use something like
newTimes = outputVariable.Timestamps - hours(1); etc.

FYI, MATLAB answers is now the preferred location for ThingSpeak Community support.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

Soham_Nale, masterhead, shubham mishra, katleenbrown440, avong, vidya

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457