Webwrite to metadata Thingspeak Channel
이전 댓글 표시
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개)
Piyush Kumar
2024년 6월 26일
0 개 추천
"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>
카테고리
도움말 센터 및 File Exchange에서 Write Data to Channel에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!