General area when it fits no where else

Moderator: Mmiscool

User avatar
By ardhuru
#43954 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
User avatar
By Mmiscool
#43973 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.
User avatar
By ardhuru
#43985 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
User avatar
By grzesiu
#46338 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);
  }