Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 4.19.75-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.2
OH Version: 2.5
All,
I think I have everything setup as per what I have read in the forum and online via googling , my problem is that I cannot seem to get anything other than âN/Aâ to show up in my test dashboard.
In the GROUP BY line, try clicking on "time ($interval) and fill(null) and remove these. If you still have a mean in the SELECT line, remove this as well.
If you wish to use an agrigate function, you will need to specify a time interval.
You could also check your event log to ensure you have values for Temperature_GF-Living within the selected time period (top right time picker)
You should bisect your problem. See if data is being written into influx. Try using the command line and select the measurements after opening the database. See this InfluxDB getting started guide. Also, you should see the writes happening in your /var/log/syslog file (assuming you havenât turned off the write logging). If this is good, proceed to debug Grafana. If you donât see data, nothing you do in Grafana will help.
That will pull out all the Influx entries in the syslog. You can also use nano or any other text editor to examine the syslog. You will always see some activity assuming InfluxDB is running. What you are looking for are http writes to the database.
For #1, see the InfluxDB documentation. This getting started guide is very good. Basically something like this:
> show databases (will show databases)
> use openhab_db (or whatever you named it)
> show measurements (should see your Item here in the list)
> select * from Temperature_GF_Living
You should see a list of values for your measurement with their timestamp. You may need to use the user/password when starting up if you set that up. This will use the default retention policy. Iâm guessing you havenât changed that.
If you see the measurements, then you know the data is getting written, and your issue is only with setting up Grafana. If you canât see the measurements, then we need to figure out why they are not written out.
Did you follow the instructions on this post originally? If so, thatâs where you set the password for your database. Or did you follow some other guide? It seems like you didnât grant the openhab user access to the openhab_db. Probably you did create an admin password?
$ influx
Connected to http://localhost:8086 version 0.13
InfluxDB shell version: 0.13
> CREATE DATABASE openhab_db
> CREATE USER admin WITH PASSWORD 'SuperSecretPassword123+' WITH ALL PRIVILEGES
> CREATE USER openhab WITH PASSWORD 'AnotherSuperbPassword456-'
> CREATE USER grafana WITH PASSWORD 'PleaseLetMeRead789?'
> GRANT ALL ON openhab_db TO openhab
> GRANT READ ON openhab_db TO grafana
> exit
In case you donât remember what you did, you can stop influxdb, turn off authentication, start it up and enable it with a new password. See this for more information.
These are for an old version (0.13). I suggest to follow these instructions for the current version.
The errors you get are caused by the fact that DISTRIB_ID and DISTRIB_CODEBASE are probably not defined as environment variables. You should give them a proper value for the distribution you want,
OK, sorry about that âŠ
I just noticed that you are running Raspbian and looks like you where using the Ubuntu install instructions. The install commands should look like this,(because Raspbian is a distribution based on Debian):
Thanks to another post I figured out how to get access to the files via Filezilla, I now edited the files are per above however when I take the influxdb.conf file from my the PI to PC for editing via visual code studio and try to place it back Filezilla comes up with an errorâŠ
How can I get around this ?
Disregard please, I edited the file via sudo nano /etc/influxdb/influxdb.conf and the changes seemed to stick