Inconsistent data intervals in Chart | ThingSpeak API | 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
Inconsistent data intervals in Chart
Avatar
Piez

Silver
Forum Posts: 15
sp_UserOfflineSmall Offline
1
January 2, 2018 - 11:59 am
sp_Permalink sp_Print sp_EditHistory

Hello,

I'm experiencing considerable inconsistencies when posting data to the API.

Using this URL.....

http://api.thingspeak.com/update?api_key=HDRIJNETDDISNTDRL&field1=45.00&field2=80.68,api_key,humidStr,tempStr

I am able to log all outbound connections and I can clearly see that in fact, my system is sending the URL every 60 seconds like clockwork.  I can also see that the URLS appear to contain valid data.  So the problem appears to be on the ThingSpeak.com side.

What I get is entries with varying intervals such as 1 minute, 2minutes, 5 minutes, 6 minutes, 8 minutes, 10 minutes, 15 minutes etc....even though I can verify that my side is sending the URL consistently every 1 minute.

Downloading and viewing the raw data in a spreadsheet.....this seems to be confirmed. 

If I manually enter this string into the browser, the points seem to be entered.  That makes me feel it's not on the ThinkSpeak side.  Is there some problem with the data?

Is this a known issue that you simply have to deal with or is there a way to make the receiving and plotting of data more consistent?

Or, is this an isolated issue that only I am experiencing?

Thanks. 

Avatar
cstapels

Gold
Forum Posts: 123
sp_UserOfflineSmall Offline
2
January 3, 2018 - 8:44 am
sp_Permalink sp_Print

What response do you get from the GET URL you are using?  If the update is successful, ThingSpeak will return the entry id, which should get incrementally higher. 

I'm confused by the commas at the end of your URL.  it looks like part of a string building operation.  There shouldn't be any commas at the end of the GET command, after the field data, unless its part of another valid parameter.

If you were trying to perform two successive writes, the server might reject the writes for being too fast.  Are you performing any other updates in your code, or is it possible that the code is trying the same call twice?  Updating two fields at once as your command is written counts only as one write.

Is it possible that the connection is lost between your logger and Thingspeak?  You should be able to tell by the response from the server.

Avatar
Piez

Silver
Forum Posts: 15
sp_UserOfflineSmall Offline
3
January 3, 2018 - 1:44 pm
sp_Permalink sp_Print

cstapels said

What response do you get from the GET URL you are using?  If the update is successful, ThingSpeak will return the entry id, which should get incrementally higher. 

I'm confused by the commas at the end of your URL.  it looks like part of a string building operation.  There shouldn't be any commas at the end of the GET command, after the field data, unless its part of another valid parameter.

If you were trying to perform two successive writes, the server might reject the writes for being too fast.  Are you performing any other updates in your code, or is it possible that the code is trying the same call twice?  Updating two fields at once as your command is written counts only as one write.

Is it possible that the connection is lost between your logger and Thingspeak?  You should be able to tell by the response from the server.  

Hello,

The Data submissions are sent programmatically via an Arduino sketch so there is no response.  The only way I can get that entry ID response is to send the URL directly from a browser.

Commas...

Are you referring to this?  ,api_key,humidStr,tempStr

If so, that is just part of the Sketch.   I did not program it.  It's a popular Temp Humidity ThingSpeak project found here

https://circuitdigest.com/microcontroller-projects/iot-temperature-humidity-monitoring-using-arduino

Looking at the outbound logs, it is only sent once every 60 seconds.    Not that so far today it seems to be doing MUCH better for unknown reasons

Again, looking at the outbound connections log, there appears to be successful outbound URL's to ThingSpeak very 60 seconds and an HTTP FIN response from the ThingSpeak server indicating it was received.

Thanks for your assistance

Avatar
Piez

Silver
Forum Posts: 15
sp_UserOfflineSmall Offline
4
January 3, 2018 - 2:08 pm
sp_Permalink sp_Print

Also, would updating two different channels at the same time cause this behavior?

Today I'm only updating one and it's doing much better.  Not sure if it has to do with the number of separate channels being updated?

Avatar
cstapels

Gold
Forum Posts: 123
sp_UserOfflineSmall Offline
5
January 3, 2018 - 2:48 pm
sp_Permalink sp_Print

Yes, updates to different channels on the same account must still comply with the rate limit.  The free account limit is one update per 15 seconds but you get 3 million updates per year.  More licence options with faster update rates are available.  I'm glad to hear we may have found the culprit for the earlier problem.

Thanks for sharing the link to your sketch.  The commas are definitely not part of the URL, but part of the sprintf() function.

Can you describe your hardware?  I may be able to offer more simple code than the AT command set, depending on what you are using.

Avatar
Piez

Silver
Forum Posts: 15
sp_UserOfflineSmall Offline
6
January 3, 2018 - 3:15 pm
sp_Permalink sp_Print

cstapels said

Yes, updates to different channels on the same account must still comply with the rate limit.  The free account limit is one update per 15 seconds but you get 3 million updates per year.  More licence options with faster update rates are available.  I'm glad to hear we may have found the culprit for the earlier problem.

Thanks for sharing the link to your sketch.  The commas are definitely not part of the URL, but part of the sprintf() function.

Can you describe your hardware?  I may be able to offer more simple code than the AT command set, depending on what you are using.  

ok.

It is quite possible that the requests to the two channels were being sent too close together.   I was running two independent Arduino sketches in independent Arduino Interface windows.  A solution might be to put both channel update routines into ONE Arduino sketch.   I'll have to look into that

Thanks for this info.

My hardware is an Arduino UNO CH340 R3  (Clone)

ESP8266-01 WiFi module

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
27 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:

candacele1

WilliamBer

roxieob18

Metawatch

ozayagw

ubabeutiti

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee