Webwrite to metadata Thingspeak Channel
Mostrar comentarios más antiguos
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);
1 comentario
Marc Hanssens
el 9 de Jul. de 2024
Respuestas (1)
Piyush Kumar
el 26 de Jun. de 2024
0 votos
"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 comentario
Marc Hanssens
el 27 de Jun. de 2024
Categorías
Más información sobre Write Data to Channel en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!