ThingSpeak: How to set 'NumPoints' equal to the maximum available in the channel?
8 views (last 30 days)
I'm looking for a way to set the '2733' in my command below equal to the amount of datapoints available.
[data, time] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', 2733, 'ReadKey', readAPIKey);
For context, I'm trying to setup visualisations that still work when the dataset in the channel is changed. For my current dataset, I have 2733 lines so the above works, but I'd like to get it to the point where it can work without amendment when I change the dataset.
Vinod on 16 Nov 2021
See this documentation. The NumPoints can be at max 8000. If you have less than 8000 points in your channel, everything is returned. If you have >8000 points, only the most recent 8000 are returned.
I'd recommend also answering this survey from the developers as they are looking to provide functionality based on use cases.