how to read channel status using thingSpeakRead in Matlab?
1 回表示 (過去 30 日間)
古いコメントを表示
Danielle Honigstein
2021 年 5 月 4 日
コメント済み: Danielle Honigstein
2021 年 5 月 5 日
Hi all, I read the data from my channel using thingSpeakRead, but the status of the channel doesn't seem to be available. How do I read that from Matlab (not using REST or MQTT)?
EDIT:
Code I am using:
lastData = thingSpeakRead(channelID,'OutputFormat','TimeTable','ReadKey','MY_READ_KEY')
What is printed out:
lastData =
1×5 timetable
Timestamps AppName Action Address Version Extra
______________ ______________ _________ _________ _________ ____________
04-May-2021 14:09:25 {'Data1'} {'Data2'} {'Data3'} 3.2 {'Data4'}
I would have expected a column of "Status", as my channel has the status enabled. It is not one of the fields, it was from enabling "Show Status" in the channel settings.
Thanks,
Danielle
0 件のコメント
採用された回答
Christopher Stapels
2021 年 5 月 4 日
Our up time is really high, there is no reason the channel should be unavailable. Can you show the format of the command you are using? (feel free to redact the API keys.)
3 件のコメント
Christopher Stapels
2021 年 5 月 4 日
I totally misunderstood your question, my apologies.
The ThingSpeak status field is not available with ThingSpeakRead. (at present)
You can use the API command and webread to read it in MATLAB.
url='https://api.thingspeak.com/channels/592680/feeds/last.json?api_key=xxxxxxxxxxxxxxxx&status=true';
lastData=webread(url);
その他の回答 (0 件)
コミュニティ
その他の回答 ThingSpeak コミュニティ
参考
カテゴリ
Help Center および File Exchange で Read Data from Channel についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!