can't update to 5 fields chart in 1 channel | ThingSpeak Projects | 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
can't update to 5 fields chart in 1 channel
No permission to create posts
April 10, 2018
10:57 pm
Avatar
roni28
New Member
Members
Forum Posts: 3
Member Since:
April 10, 2018
sp_UserOfflineSmall Offline

Hi,

i have a project using dragino lora gateway. i tried to upload 5 data. field 1 = temperature, field 2 = waterlevel, field 3 = ec, field 4 = ph , field 5 = rainrate. when i tried to upload it, the data change to "null", and all fields can't update the data. when i tried to upload into 4 fields, it can work. i used free account and the sensor was set to send data every 5s. why it can happen?

Thanks for your response.

April 11, 2018
8:40 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 218
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Some devices have a small buffer for sending HTTTP commands.  I have run into this problem on the Arduino before, I am not sure about your hardware.  One way to solve it is to separate the HTTP command into multiple writes.

For example,

client.println( "POST /update HTTP/1.1" );
client.println( "Host: api.thingspeak.com" );
client.println( "Connection: close" );
client.println( "Content-Type: application/x-www-form-urlencoded" );
client.println( "Content-Length: " + String( PostData.length() ) );
client.println();
client.println( "api_key=xxxxxxxxxxxxxxxx");

client.println( "&field1=10");

client.println( "&field2=11");

etc...

April 11, 2018
9:25 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Are you using the thingspeak library or do you construct the http requests by yourself?  There have been various people on this forum reporting that the library can silently fail to upload more than 3 or 4 channels.

 

Thingspeak is normally limited to a 15 second update rate - not sure if the 5s was a typo or not.

April 13, 2018
4:26 am
Avatar
roni28
New Member
Members
Forum Posts: 3
Member Since:
April 10, 2018
sp_UserOfflineSmall Offline

Hi cstapels,

thanks for your answer. i'll do as you suggest.

April 13, 2018
4:31 am
Avatar
roni28
New Member
Members
Forum Posts: 3
Member Since:
April 10, 2018
sp_UserOfflineSmall Offline

Hi rw950431,

I'm using thingspeak library and 3 channels. every channels have 5 fields. i tried to upload 5 data to 5 fileds into channel 1 only for testing purpose. but the data changed "null". maybe construct the http requests by my self can solving it problem. thanks for your respond.

Forum Timezone: America/New_York

Most Users Ever Online: 114

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

frenk0, Jassonchulp, MatGame, Domnesich, saxenadj, concepcionoa3

Administrators: Hans: 387, lee: 457