I use the latest versions of OH and installed Grafana/influxDB via the openhab-config tool. When asked for user names in that process, I used some that seemed reasonable to me instead of the proposed ones. Then things didn’t work out, so I reinstalled everything and used the proposed usernames. But it seems that at least some of the previous ones were still used.
The current problem: A connection from OH to Grafana (via influxDB, I expect) works to some degree, because the item names are shown and I could select one (EVU in the following screenshot). But there are no data:
At the moment, it looks like Grafana can connect to the database (if I interpret this screenshot correctly):
So I guess that the data don’t get from OH to influx.
In OH, this is what was proposed and what I currently use (I tried ‘Ursusprimus’ as well but without success). I would have expected one of these to work.
- Is it a username-problem or possibly something else?
- If it’s the usernames: Which username goes where / How to check if the connection OH-influxDB works?
- If too messed up: Is there a way to change all Usernames so they fit together? E.G. with some commands or by reinstalling everything but in a way that the standard usernames are used (and not the ones I set)?
With the commands at the command-line of influx db i figured out the passwords and also noticed that data is inserted into the fields. So it doesn’t seem to bew an OH problem. And I got everything running fine when I send the data from node red.
I guess the problem is some kind of data-type error or something with a query, but I think I’ll figure that out, too.
Check if you have set more than one retention policy (autogen, etc. ). You’ll find information on that in the influxdb documentation.
You need to set the correct policy in grafana, otherwise it will not show any values!
It’s somewhat strange and I have no idea what the problem could be.
Retention policy shouldn’t matter (if I understand the concept correctly) because the values are coming in all the time, so new values are there. And the node red-data are the same. Maybe these screenshots give you an idea of where the problem is:
The openhab-database - no data in grafana:
And the version that works where I get the data from node red:
Apart from not working in Graphana I wonder why the OH-influxdb-database only gets a few fields (10 it seems, see screenshot below). I have many more items and would expect that a field would be created for every item that carries a value …?
Can you post your .persist file? Also, can you click on “default” right next to FROM in your query and check if there are any other retention policies? Think of it as separate DBs, so it does matter!
thanks for offering your help. But after having spent some more time with the graph functions of OH I tend to stick to OH for now. My knowledge is just too limited and me being also an OH-beginner, there’s a lot to learn first.
So once I’ll have managed my OH and node red problems/tasks, I’ll tackle grafana again, but that might take some time …