![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505763/image.png)
Grafana and Thingspeak API
조회 수: 24 (최근 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!