Webwrite to metadata Thingspeak Channel
Ältere Kommentare anzeigen
Helllo,
I would like to write to the Metadat of my channel but I cna't get it to work. as a test , I tried wiriting to the Status which works.
if fieldName = "status"; is changed to fieldName = "metadata"; it doesn't work! does anyone know the trick for getting this to work?
code here:
%keys & ID here ...
thingSpeakURL = "http://api.thingspeak.com/";
thingSpeakWriteURL = thingSpeakURL + "update";
fieldName = "status";
fieldValue = '[100 100 100 92 93 93 94 ; 55 55 56 57 58 63 64 ; 333 444 555 666 777 888 999]';
response = webwrite(thingSpeakWriteURL,"api_key",writeApiKey,fieldName,fieldValue);
Antworten (1)
Piyush Kumar
am 26 Jun. 2024
0 Stimmen
"Metadata" is one of the channel properties. You can change your channel properties on the My Channels page in the Channel Settings tab. You can also use the REST API to Write Settings.
If you are using REST API to write settings, the URL format should be like this - https://api.thingspeak.com/channels/<channel_id>.<format>
You can go through these links for more details -
- https://www.mathworks.com/help/thingspeak/channel-settings.html
- https://www.mathworks.com/help/thingspeak/writesettings.html - It has an example on how to "Use POSTMAN to Write Channel Settings".
- https://www.mathworks.com/help/thingspeak/rest-api.html
If you want to update channel data using REST API, the URL format should be like this - https://api.thingspeak.com/update.<format>
1 Kommentar
Marc Hanssens
am 27 Jun. 2024
Kategorien
Mehr zu Write Data to Channel finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!