I know there are some guides and posts regarding other subjects than Xiaomi’s and how to set up graphs.
… and yes - I did try to follow some of the guides, but I just can’t seem to get it working So I’m reaching out for some of the people that uses the Xiaomi Sensors and uses the graphs in the habpanel.
What I’m trying to achieve is of course to learn how to set up a graph based on values from a sensor.
Right now I wan’t a nice graph to show the values of the LUX measured for the last 3 days or so.
Have anyone had luck setting up something like that with the Xiaomi gear?
I am uncertain what you struggle with.
Is it the Setup of a Row in Grafana?
Is it the setup of the query for the Row ? Like that ?
Maybe you should check the InfluxDB yourself to see if Data is stored.
Could you please post the content of your influxdb.persist ? (Is the file named like that? if not openHAB will not store anything)
Also you have the “default” Data Source set. Is InfluxDB your Default Data Source?
I selected InfluxDB explicit.
How to check if data is inside the InfluxDB.
// connect to the local database
influx --username 'root' --password 'myPreciousRing'
// show all databases
show databases;
// my case the name is openhab_db, select the database
use openhab_db;
// show what tables exists
show series;
// or
show measurements;
// show values from a specific table
select * from itemName;
I use Grafana with MariaDB. Is there a reason to use influxdb instead of MariaDB/MySQL?
I tried influxdb once, but I found it hard to view the data in this database. Creating graphs is easier then with MySQL. Are there eg ways to manupalute data (edit incorrect values), backup/migrate etc…?
I have one openHAB instance with over ca. 50 Devices that Monitor every 2 sec. the environment. And with that many data-points MySQL grew fast! I made a test for 1 month with both MySQL and InfluxDB.
MySQL grew about 1GB and Influx just around 450MB.
There is much more options why to choose just read this for example. https://db-engines.com/en/system/InfluxDB%3BMongoDB%3BMySQL
Will give it a try. My Xiaomi Sensors it set to do pollingInterval=6000 , but I’m uncertain if this is in seconds or what it is. I can’t fint that in the documentation and haven’t changed it.
Looking at the timestamps in your database, you have values coming in every hour
Extend the time of the graph as well and you should start to see something
I only changed the line thickness I think to 2.
Just play around, you can’t break it!
And if you mess up too much, start again a fresh graph.
There are lots of options, play!