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

Avatar

Please consider registering
Guest

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
Avatar
PlStrss
New Member
Members
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! ");
}
else
{
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.

Paul

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

harriettlf60, ShaToow, Aleftinfenny, DiaBentee, hugo11dom@gmail.com, Pisaruk530

Administrators: Hans: 387, lee: 457