Trouble setting up influxdb+grafana

Hi, I am fairly new to openhabian and am trying to get influxdb+grafana set up on openhabian 2.5.7. Everything seemed to install fine through sudo openhabian-config. I can connect to grafana fine but when I try to connect influxdb to grafana is where I run into problems. This is not the first time I have tried to set up influxdb+grafana and ran into problems back in 2.4 version. Every time I have tried it’s always the same problem and influx gives me the error can’t create (user password database) unable to phrase authentication credentials. This could be due to not setting a database. I have tried
sudo chown -hR openhab:openhab /etc/openhab2
sudo chown openhab:openhabian /etc/openhab2/services/influxdb.cfg
sudo nano /etc/influxdb/influxdb.conf

sudo nano /etc/influxdb/influxdb.conf

in the file under http you find:
auth-enabled = true
change this to false
And several other things I have forgotten. I have completely reset openHAB since the first time I tried but nothing seems to work when I type in influx it does come up as connected to http://localhost:8060 version 1.8.1. Any help on this would be greatly appreciated I have need trying for a long time now and slowly building my automated home and I’m finally at a point where tracking energy usage on graphs would be very useful.

During the installation of influxdb by using openhabian-config a user admin and a user openhab is created. During this setup you were asked to provide passwords for these accounts.
At the end auth-enabled will be set to true.

You should be able to connect to influxdb using:

influx -port 8086 -username openhab -password <password> -host localhost


influx -port 8086 -username admin -password <password> -host localhost

Just starting influx without any further argument connects to the db but you need to authenticate and be admin to e.g. show databases resp. create a user.

Run command

show databases

The result should look similar to

name: databases

Is this the case for your environent ? If not what output messages do you get ?

Ah ok, that worked and I finally got it to connect to grafana turns out I had just put it in wrong, thank you!

1 Like