Webwrite to metadata Thingspeak Channel
Mostra commenti meno recenti
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);
Risposte (1)
Piyush Kumar
il 26 Giu 2024
0 voti
"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 Commento
Marc Hanssens
il 27 Giu 2024
Categorie
Scopri di più su Write Data to Channel in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!