mathworks / thingspeak-arduino

ThingSpeak Communication Library for Arduino, ESP8266 and ESP32
https://thingspeak.com
431 stars 231 forks source link

writeFields does not always succeed #54

Closed eklinger closed 4 years ago

eklinger commented 5 years ago

Hello, I have a simple example that just sets a variety of fields and then writes them in bulk. However, sometimes the writeFields call doesn't seem to complete. Here is the log:

09:56:26.429 -> ts::setField (field: 2 value: "26.00000") 09:56:26.429 -> ts::setField (field: 3 value: "90.00000") 09:56:26.429 -> ts::setField (field: 4 value: "0.00000") 09:56:26.429 -> ts::setField (field: 5 value: "0.00000") 09:56:36.462 -> ts::setField (field: 6 value: "0.69811") 09:56:36.462 -> ts::setField (field: 7 value: "2.00000") 09:56:36.462 -> ts::setField (field: 8 value: "0.00000") 09:56:36.462 -> Connect to default ThingSpeak: api.thingspeak.com:80...[hostByName] request IP for: api.thingspeak.com 09:56:36.462 -> [hostByName] Host: api.thingspeak.com IP: 34.226.171.107 09:56:36.462 -> :ur 1 09:56:36.462 -> :del 09:56:36.462 -> :ref 1

And that's it. Typically for a successfull call there is a response from writeFields like so: 09:45:44.505 -> Success. 09:45:44.505 -> ts::writeFields (channelNumber: 797035 writeAPIKey: XXXXXXXXXXX)

Any idea what could be happening?

nothans commented 5 years ago

How fast are you sending data to ThingSpeak? Free accounts have a rate limit of 15 seconds between updates.

jasontwinters commented 5 years ago

This part is not normal:

09:56:36.462 -> :ur 1 09:56:36.462 -> :del 09:56:36.462 -> :ref 1

It makes me think you are either running low on memory or have an un-terminated char array in your application.

eklinger commented 5 years ago

Sending is only every 15 minutes.

v-c commented 4 years ago

This appears to not be reproducible. Closing issue. Please reopen with additional info, including a full sketch (with API keys redacted) if this warrants more attention.