
Grafana and Thingspeak API
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
pravin vaz
le 1 Fév 2021
Réponse apportée : Jacques van der Mescht
le 1 Mar 2023
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 commentaires
Réponse acceptée
Vinod
le 1 Fév 2021
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:

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 commentaires
Plus de réponses (2)
Sriramajeyam Sugumaran
le 18 Fév 2021
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.

PS: I am the author of the grafana infinity datasource plugin
1 commentaire
j wright
le 14 Mar 2022
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
le 1 Mar 2023
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 commentaires
Communautés
Plus de réponses dans ThingSpeak Community
Voir également
Catégories
En savoir plus sur ThingSpeak dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!