Thingspeak library failure with returned Error codes! with cryptic meanings? | ESP Wi-Fi | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Thingspeak library failure with returned Error codes! with cryptic meanings?
No permission to create posts
May 22, 2016
5:40 pm
New Member
Forum Posts: 1
Member Since:
May 22, 2016
sp_UserOfflineSmall Offline

EmbarassedI'm new here and trying to post to a new channel via the Arduino IDE and a NodeMcu 0.9 ESP8266 board. I can post direct from a browser and see the results OK BUT when I run some code via the 

#include <ThingSpeak.h>

library e.g. the lines below... 

ThingSpeak.setField(1, float(20.2));
ThingSpeak.setField(2, float(23.4));
int ExitCode = ThingSpeak.writeFields(MyTSChannelNumber, MyTSWriteAPIKey);
if (ExitCode == 200)
Serial.print (" 200=Success! ");
Serial.print (" 🙁 Thingspeak Error Code = "); Serial.print(ExitCode);

I get a -302 error code!  and of course no data is written. Otherwise I am quite close to getting something done.

This is a "#define ERR_UNEXPECTED_FAIL     -302    // Unexpected failure during write to ThingSpeak"

Can anyone help with demystifying the library exit code or see a problem in what I have done? How can I test things better. I get a -301 when I sever the connection which is what I would expect.


Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

dogarty, dlwiener, bulksms, bmchoice4u, irajames, YesItsMe

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457