How to connect influxdb with a docker-installed HA installation on a raspberry pi 3?

Hello,

I have installed HA in a docker container on my Pi 3 and want to store the data in influxdb and visualize them with grafana. Since i was not able to make influxdb and grafana work in a docker container (grafana web ui was not available), I tried the following guide to set them up over the raspberry pi 3:

http://blog.centurio.net/2018/10/28/howto-install-influxdb-and-grafana-on-a-raspberry-pi-3/

I am now able to access grafana and to add influxdb as a data source, but I can’t manage to connect influxdb with home-assistant. I have made the following steps to connect them:

  • Creating a database in influxdb:
CREATE DATABASE home_assistant
  • Adding Influxdb to the HA configuration.yaml:
influxdb:
      host: IPadressofPi

To check if HA and influxdb are connected, I typed the following lines into the Pi Terminal:

pi@raspberrypi:~ $ influx
Connected to http://localhost:8086 version 1.7.7
InfluxDB shell version: 1.7.7
> USE home_assistant
Using database home_assistant
> SHOW MEASUREMENTS

…but it just showed nothing. I’ve been working on this for 2 days now, reading even the tutorials on the fifth google page, but couldn’t find a solution to make this work. I do not understand very much of this topic since I’m new, so sorry if I’ve made any major mistakes, but could you please help me? Also I am not quite sure which additional information you need, so just ask me:)

Thank you!

You should figure out why. influx and grafana work just fine in Docker.

I don’t even have a “host” defined on my influxdb in configuration.yaml