Retrieve 'last' value for a specific field | MATLAB | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





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

Register Lost password?
sp_Feed sp_TopicIcon
Retrieve 'last' value for a specific field
Avatar
AYAduino

Silver
Forum Posts: 9
sp_UserOfflineSmall Offline
1
October 13, 2015 - 8:59 pm
sp_Permalink sp_Print

I need to be able to retrieve the last value written to a specific field along with its timestamp. I have no way of knowing if the field was written to a minute ago or 20 days ago. It's entirely possible there are 8000 NaN values between now and that last write so I can't reliably read in an array and search for the data. I was able to get the value using the URLfilter (url:https://thingspeak.com/channels/666/fields/2/last.json?api_key=BLECHIMTIREDOFFLAILING) but I can't see how I can retrieve the date/time.

I don't suppose there's a simple name/value pair for 'last?' Or perhaps a workaround?

I need to retrieve two or three values from the same channel and unfortunately it's not possible for me to split them up into their own dedicated channels.

thanks,
Brad

Avatar
Hans
Natick, MA

Forum Posts: 390
sp_UserOfflineSmall Offline
2
October 13, 2015 - 10:19 pm
sp_Permalink sp_Print

Brad,

Try "webread" instead of urlfilter. This will allow you to get all of the data fields inside of last.json

Hans

Avatar
AYAduino

Silver
Forum Posts: 9
sp_UserOfflineSmall Offline
3
October 14, 2015 - 6:25 pm
sp_Permalink sp_Print

Thanks, exactly what I needed.

Brad

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: cstapels
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

yeseniara11

RomanFug

JamesPes

RobertBak

ScottSmiva

Amourhotte

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee