Uploading multiple fields to thingspeak
Posted:
Thu Mar 24, 2016 11:27 am
by ardhuru
I need to upload 2 parameters to thingspeak.
What would be the best way to do this?
Do I necessarily have to upload them one at a time, with SENDTS({KEY},{FILED NUMBER},{FIELD CONTENTS}), and space each upload at least 15 seconds from the previous? Or is there a composite syntax for the SENDTS function that I have missed?
Thanks, and best regards.
Anand Dhuru
Re: Uploading multiple fields to thingspeak
Posted:
Thu Mar 24, 2016 4:20 pm
by Mmiscool
Right now it dose not do multiple fields at once. This may be an enhancement at some point here but at the moment it is not supported.
Re: Uploading multiple fields to thingspeak
Posted:
Fri Mar 25, 2016 12:00 am
by ardhuru
Oh, I see. Thanks for that information.
I am no programmer, so I have no idea how feasible it would be, but would it be possible to change the syntax of the TS command to be something like this instead?
SENDTS({write.api},{field1 val},{field2 val}....{field8 val})
The unused fields could then be loaded with a 0, or some such, and ignored while building the Thingspeak channel. Only the relevant fields can be used, and the rest can be ignored.
Please ignore if this is completely impractical to expect, or achieve.
Anand
Re: Uploading multiple fields to thingspeak
Posted:
Wed Apr 27, 2016 2:29 pm
by grzesiu
Hi!
I made some changes in source code that I can insert 4 fields into thingspeak in one query , but this works with only first 4 fields
My sendts function now looks like this:
Code: Select all
if (FunctionName == F("sendts"))
{
//ThingsSpeekBasicSendData(String myChannelNumber, String myWriteAPIKey, String BasicTSf1,String BasicTSf2, String BasicTSf3, String BasicTSf4 )
FetchWebUrl(String(F("api.thingspeak.com/update?key=")) + Param0 + "&field1=" + Param1 + "&field2=" + Param2 + "&field3=" + Param3 + "&field4=" + Param4);
}