Find (GET) values from a field in a ThingSpeak channel
fieldvalues=thingspeak_fieldvalues(channelID,privacy,apiWriteKey,apiReadKey,fieldnbr) fieldvalues=thingspeak_fieldvalues(channelID,privacy,apiWriteKey,apiReadKey,fieldnbr,optionName,optionValues)
ID of the channel in ThingSpeak
Specify whether the channel is 'public' or 'private'
Write API Key of the channel
Read API Key of the channel
The field number to retrieve the data from (1-8)
Additional options on how to retrieve the field values
Return the field's values
This function is used to get values from the thingspeak channel. The additional options are:
results : number of values to retrieve
days : retrieve values up to x number of days
min : minimum values to retrieve
max : maximum value to retrieve
sum : sum of values in time intervals
average : average values in time intervals
median : median values in time intervals
timescale : first value for each time interval
startdate : Retrieve the values starting from the given date. The format is "yyyy-MM-dd HH:mm:ss". The default timezone for the date is UTC. You can change the timezone using the 'offset' option.
enddate : Retrieve the values up to the given date. The format is "yyyy-MM-dd HH:mm:ss". The default timezone for the date is UTC. You can change the timezone using the 'offset' option.
offset : Change the timezone used by 'startdate' and 'enddate' options.
status : Boolean input on whether to include status for each entry.
location : Boolean input on whether to include the location (latitude, longitude,elevation) for each entry.
The allowed time intervals for sum, median, average and timescale are 10, 15, 20, 30, 60, 240, 720 and 1440 minutes.