Hans on IoT

ThingSpeak, MATLAB, and the Internet of Things

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

ThingSpeak Data Channels – Now With More Metadata 3

Posted by Hans Scharler,

ThingSpeak user [DodBasim]  requested an additional field inside of the ThingSpeak Data Channel. We named this new field “metadata”. This field works like the “status” field, but allows you to post any type of extra data along with your ThingSpeak Data Channel. An example would be to use the “metadata” field to store a JSON object that you want to parse with your application.

POST https://api.thingspeak.com/update
     api_key=XXXXXXXXXXXXXXXX
     field1=73
     metadata={"officeTemp":73}

The full ThingSpeak Channels API is available on ThingSpeak Docs.

[via ThingSpeak Forums]

3 CommentsOldest to Newest

x x replied on : 1 of 3
I see an example of how to update this 'Metadata' field. Could you provide a complementary example of how to "read back" this value?
x x replied on : 2 of 3
I tired : [result, timestamp, chInfo] = thingSpeakRead (channel_id, 'ReadKey', readKey, 'Metadata', true) and it returned error: 'Metadata' is not a recognized parameter.
Hans Scharler replied on : 3 of 3
We do not support the reading of the metadata setting from the thingSpeakRead function, but you can use webread. indoorChannelData = webread(strcat('https://api.thingspeak.com/channels/', ... num2str(indoorChannelID), ... '/feeds.json?metadata=true&api_key=', ... indoorChannelReadKey));

Add A Comment

Your email address will not be published. Required fields are marked *

Preview: hide