How to post data to ThingSpeak using AT+UHTTPC command?
Hi,
I am using Ublox SARA-R410M to send (cellular) data to ThingSpeak cloud. I found in the Ublox manual that AT+UHTTPC (POST data command) can do the job. The link below is the location which my data will be saved on ThingSpeak (field1):
"https://api.thingspeak.com/update?api_key=WRITE_API_KEY&field1="
Note that the "WRITE_API_KEY" is 16 characters (combination of letters and numbers).
AT command: AT+UHTTPC=<profile_id>,5, path,<filename>,<data>,<HTTP_content_type>
Based on the information above, which items should I use for path and filename? And how can I use this command in Arduino code?
I appreciate any help in advance.
Abbas
6 Comments
Time DescendingI would use GET, its a bit more simple. HTTP command 1 I think the path and filename are the url. You can find them in the write data documentation .
Here is the write format for the GET request. (which you have already in your post)
https://api.thingspeak.com/update.json?api_key=xxxxxxxxxxxxxxxx
I think "https:...com/" is the path and update.json is the filename. the rest are parameters
This document seems to say the syntax is AT+UHTTPC=<profile_id>,<http_ command>,<path>,<filename>[, param1[,<param2>[,<param3>]]] I think you wont need the content type for the GET request.