6:57 am

July 26, 2017

Being able to upload many data points each associated with a timestamp to ThingSpeak at once is essential for my project. I am finding it hard to implement from the electron. As in the title, I'm getting a "Response code" of 1, 0, or 500 published every time the example code tries to send to ThingSpeak and my thingspeak channel is not updated.
I have tried to use a webhook with a JSON as recommended in the Particle website, but even when I have done my best to format the JSON as it is in the bulk transfer documentation, the response is usually an error 400 or 401 (I am definitely using the correct api key).
Advice on how best to implement this feature for an electron, or an explanation of what the confusing response codes mean would be much appreciated.
7:29 pm


MathWorks
May 1, 2016

Have you considered modifying this example and seeing if this works from your device:
I believe that your POST does not contain the right fields you will get a 400 or 401 response code.
6:33 am

December 24, 2017

I have tried to use a webhook with a JSON as recommended in the Particle website, but even when I have done my best to format the JSON as it is in the bulk transfer documentation, the response is usually an error 400 or 401 (I am definitely using the correct api key).
5:10 pm


Moderators
March 7, 2017

The formatting for a bulk update can be tricky. If you can, look over the documentation one more time and then if it still fails then you can try posting the format of your request here and we can try to help you debug it.
https://www.mathworks.com/help/thingspeak/bulkwritejsondata.html
As a side note I have often seen users try bulk write when a regular write will suffice, and the formatting is easier.
Would this fit your needs?
https://www.mathworks.com/help/thingspeak/writedata.html
Most Users Ever Online: 166
Currently Online:
26 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
rw950431: 272
Vinod: 240
piajola: 95
turgo: 70
vespapierre: 63
Adarsh_Murthy: 62
Member Stats:
Guest Posters: 1
Members: 8665
Moderators: 1
Admins: 2
Forum Stats:
Groups: 3
Forums: 14
Topics: 1600
Posts: 5760
Newest Members:
JadeFloralde98, mgnthe54, Zain-Ul-Abidin, wellbeingcentresuk, Vamsi, frankmehlhopModerators: cstapels: 460
Administrators: Hans: 405, lee: 457