Retrieve 'last' value for a specific field | MATLAB | 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
Retrieve 'last' value for a specific field
No permission to create posts
October 13, 2015
8:59 pm
Avatar
AYAduino

Silver
Members
Forum Posts: 9
Member Since:
February 10, 2015
sp_UserOfflineSmall Offline

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

October 13, 2015
10:19 pm
Avatar
Hans
Natick, MA

Admin
Forum Posts: 400
Member Since:
January 18, 2011
sp_UserOfflineSmall Offline

Brad,

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

Hans

October 14, 2015
6:25 pm
Avatar
AYAduino

Silver
Members
Forum Posts: 9
Member Since:
February 10, 2015
sp_UserOfflineSmall Offline

Thanks, exactly what I needed.

Brad

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: samdavies
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

Lakshmanaprakash S B, bettetj60, ronnievw3, bessiesj18, Pavan kumar, Williampup

Administrators: Hans: 387, lee: 457