MATLAB Answers

Can't get thingSpeak to display data

9 views (last 30 days)
Data is being sent by a webhook from a Particle Photon. I know the data is being received by thingSpeak because I see the entries number is being incremented when new data arrives.
Here is my setup page.
Can anyone help? Thank you. Larry
Larry McIntyre
Larry McIntyre on 23 Jan 2021
Great idea. Here is my export of the first field. No data, only times and entries.
Here is my webhook setup in Particle Console.
And here is my code to send data to thingSpeak. I'm using a library that I got from Particle that is commonly used. My data is being posted as events in Particle Console.
Here is my channel set up at thingSpeak.
I really appreciate your help.

Sign in to comment.

Accepted Answer

Christopher Stapels
Christopher Stapels on 25 Jan 2021
You are sending the string value "ctcurrent" to ThingSpeak, in your querry string parameters (not the value of the variable). You do have it as a parameter in the JSON, but I suspect the syntax is wrong. I would not send it in the JSON. Also, you have your write api key as a parameter in the webhook.
It is possible to use webhooks, and its nice to be able to abstract parameters so you can reuse a webhook for multiple processes. But it can be a bit tricky. I would really reccomend theThingSpeak library I mentioned above. It does all the work for you and doesn't need a webhook.
If you are really stuck on using the webhook, I'd find and example and carefully copy what you see.
Also, did you export only field 1? Do you have field 2 enabled in your channel view? If you exported the whole feed but only had channel 1 enabled, you might see something like what you show above. I was expecting to see the string "interval" based on what you shared.
  1 Comment
Larry McIntyre
Larry McIntyre on 26 Jan 2021
The TCPClient is working for me. I agree it is much easier than setting up a webhook. Thanks again for the help.

Sign in to comment.

More Answers (0)


More Answers in the  ThingSpeak Community



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!