My experience setting up InfluxDB on Hass.io (actually HASSOS but still.....)

I was attempting to setup the InfluxDB Add-on today and was having some difficulty. You see, I’m what you would call somewhat new to this game…but I know enough to be real dangerous. Being new means…research, research, research. But even then, sometimes things just stay a mystery.

Today, however, was one of those days where perseverance and patience paid off…I finally got the Add-on to work.

Essentially, I added this repository to my system at the Hass.io Panel/Add-On Store (https://github.com/hassio-addons/repository), and then installed the InfluxDB add on. By perusing the component document, I knew I had to have a database named “home_assistant” created in InfluxDB first. The document eluded to the fact that a CLI was needed to perform this task, but that is not the case. A new database can be created by browsing to your HA’s ip address with the port number 8888 appended. Keep in mind that you may have to open that port if you’re accessing HA from outside of your network. When the GUI loads, head to the Data Explorer icon on the right (looks like a trend) and in the top of that page, is field to enter queries or whatnot. To the lower right of this field is a pull down menu with the option to “Create Database”. choose this and the field will be pre-populated with the correct command. You just have to enter home_assistant between the double quotes and hit enter. Note that in my example, the database name was actually home_assistant.autogen. I just dropped the .autogen part and it worked correctly.

From here, I returned to the component document and found that all of the other items for the component were optional. In my case, this was not correct. I ended up having to create an admin username and password back at the InfluxDB GUI using the same field, at the Data Explorer section, and pull down menu (Create Admin User). Also non-pro tip, enter your username and password inside the provided double and single quotes. I also entered my host ip, port number (that defaults to 8086 by the way), and database name. It’s entirely possible that those could have been left off, but I was so giddy with excitement when it actually started working that I just left it alone.

In the end, my configuration.yaml looked like this:

influxdb:
host: 127.0.0.1
port: 8086
database: home_assistant
username: my_admin_username
password: my_admin_password

I’m sure this is probably trivial for most users, but when you have no idea how to do what you want to do…just try, try, try…until something sticks to the wall.

I decided to post this here in case anyone else runs into any issues…criticism welcomed.

Thanks for your post, I’m trying to enable InfluxDB on my hass.io 140, Home Assistant
0.74.2, addon seems to install correctly, but when launching the web ui for InfluxDB, it is asking for user/password. where do you set this credentials? I can’t login

It’s your home assistant user name and password.

Thanks @bwze, this was very helpful. Tonight I’ve gone through some tutorials but they all seem to explain about 70% of what’s needed. Very frustrating but this post helped.

1 Like

It was working until now but it doesn’t anymore.
Any idea how to do some investigation of why the login/password of homeassistant doesn’t work to connect to the UI of the addon ?