ThingSpeak Communication Library written by the ThingSpeak development team

This library enables a Particle Photon or Core to write or read data to or from ThingSpeak, an open data platform for the Internet of Things with MATLAB analytics and visualization.

See the 90 second getting started video

ThingSpeak offers free data storage and analysis of time-stamped numeric or alphanumeric data. Users can access ThingSpeak by visiting http://thingspeak.com and creating a ThingSpeak user account.

6 Likes

Does this library handle all the edge cases, like dropped connections etc etc ?

[Edit: I skimmed the source, and I don’t think it does internally. But it might return enough status to do it externally in the app itself.]

2 Likes

It does not maintain a connection between actions, and reports (reasonably fine grained) information about whether it succeeded or not, so you can implement your own high level logic about what to do in the event of an error. We chose to keep it simple and reliable, rather than keeping a connection open, since the max rate for writing is about once every 15 seconds.

1 Like

@rpurser,

everything was working fine for 2 days and now i get a -304 using Serial.println(ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey));

Data was published fine till this morning (GMT +8) at 9am then stopped working.

I noticed some nginx error popping up last night on the website for mine as well.

Update Opps seems like the TCP failed on the core somehow. Sorry for the false alarm. Works on a Photon now :smile:

1 Like

Great that you got it working!

-Rob

Does the publishing to ThingSpeak has to happen from the Photon?

Is there a way to make ThingSpeak listen directly to the Particle Cloud?

Ideally I would love to track everything that my devices are publishing. Basically storing the equivalent of Particle.subscribe mine

Hi all,

Version 1.1.0 of these libraries now supports Particle Electron!

All the best,
-Rob

2 Likes

Will ThingSpeak be updates for the P2 devices?

1 Like