![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505763/image.png)
Grafana and Thingspeak API
35 ビュー (過去 30 日間)
古いコメントを表示
Hi all
I am trying to use Grafana dashboard to show my Thingspeak data which is generated by a Microbit IoT device. The data logs perfectly to the thingspeak website, and the GET command works fine as I copied and pasted into a new browser and i got json data (channel is public).
However, when I try connect my grafana dashboard and add the JSON channel feed (through simple JSON a plugin), I get a error in Grafana (although it says connection established). The error is:
<!DOCTYPE html> <html> <head> <title>We're sorry, but something went wrong (404)</title> <style type="text/css"> body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } div.dialog { margin: 3em auto 0 auto; } h1 { font-size: 100%; color: #f00; line-height: 1.5em; } </style> </head> <body> <!-- This file lives in public/404.html --> <div style="padding-top: 50px"> <img src='/thingspeak_logo_white.png' width='200' height='35' style='background-color: #2f7eb2; padding: 10px;' /></div> <div class="dialog"> <h1>The page you were looking for doesn't exist.</h1> <p>You may have mistyped the address or the page may have moved.</p> </div> </body> </html>
I am using a windows machine.
Regards
0 件のコメント
採用された回答
Vinod
2021 年 2 月 1 日
I have this set up like this and it works:
1) Set up the datasource. In my case, I set up a new JSON API with this URL: https://api.thingspeak.com/channels/12397/fields/1.json
2) Next I created a new dashboard with the above datasource, the "Query string" set to "results=8000" and 2 queries
a) $.feeds[*].created_at
b) $.feeds[*].field1
Now I select a graph visualization and get this dashboard:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505763/image.png)
This is no different than the chart here:
So, can you provide more context on your use case for Grafana instead of the built in charts?
3 件のコメント
その他の回答 (2 件)
Sriramajeyam Sugumaran
2021 年 2 月 18 日
You can use Grafana Infinity Datasource for this purpose. Below screenshot is an example from https://thingspeak.com/channels/1103934/ and how to use it. This plugin also allows you to other formats like csv/json.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/523577/image.png)
PS: I am the author of the grafana infinity datasource plugin
1 件のコメント
j wright
2022 年 3 月 14 日
hi thanks for making such a great plugin! I had my data up and displayed in grafana in no time! i am wondering if you can help as I am only recieving 26-27 minutes worth of data displaying in grafana?
Is this to do with thingspeak only sending 100 lines at a time?
What do i need to do to be able to see more historical data than 26 mins ago?
All help appreciated
Thanks
Jacques van der Mescht
2023 年 3 月 1 日
I know it is an old thread, but I am also having an issue of only getting a limited amount of history data. I record data every minute and can only get/view data in Grafana for about 6 days which is 8000 points and the thingspeak server limit. Is there not a way to not read the last 8000 points, but say 8000 points in a specific period of a year ago. Or even read batches of 8000 points to make up the history range I need? Grafana works perfect to view the data, but the limit of 8000 points is a problem. Or is there another program to visualize more than 8000 points? Thanks Jacques
0 件のコメント
コミュニティ
その他の回答 ThingSpeak コミュニティ
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!