Query with time limit to read the field is not working

2 views (last 30 days)
I am reading a field for data of last 45 minutes.
The query given is as follows on the browser.
*** represent my channel id and api key.
I expect that last 45 minutes readings should be available. The response is as follows.
{"channel":{"id":*******,"name":"Pump Parameters","description":"Starting Date, Starting Time, No of working hours.","latitude":"0.0","longitude":"0.0","field1":"Starting Date","field2":"Starting Time","field3":"Working Hours","field4":"Remaining Hours","field5":"User Request","field6":"Pump Status","created_at":"2021-12-03T04:20:52Z","updated_at":"2022-01-20T10:02:50Z","last_entry_id":206},"feeds":[{"created_at":"2022-07-04T01:02:03Z","entry_id":40,"field6":"7"},{"created_at":"2022-07-18T01:02:03Z","entry_id":39,"field6":"7"}]}
Last 2 readings are incorrect. entry_id: 40 and entry_id:39
How to avoid these two readings. I also had valid readings in this time span but still id39 and id40 is appearing in the response. date shown for these id's in not correct. Please advice about getting correct response. It is not possible to use Matlab as I am using Web Page integration. this is free and private channel.

Answers (1)

Christopher Stapels
Christopher Stapels on 15 Feb 2022
You can use MATLAB in the free ThingSpeak even if you dont have a seperate MATLAB license.
Those two readings have a timestamp of July 2022,so they occur in the future. I suggest you download then clear the channel data, then delete those entries, and then write the rest of the data (or new data) back to the channel.

Communities

More Answers in the  ThingSpeak Community

Categories

Find more on Read Data from Channel in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!