Homeassistant OS - Failing to get data into InfluxDB Database - InfluxDB Add-On

Hi all,
Having started my Homeassistant Journey already a year or so ago, I am now struggling to get InfluxDB running to enjoy the data Homeassistant collects for longer than 10 days.

I am running Homeassistant OS on a Raspberry 4 8gb. I moved the data from the SD-card to an external SSD just yesterday and it seems to be working fine. Everything is updated to the latest version.

Having managed to get the data of the sd-card I thought its time to get influxDB running. I read the docs but being a non technical guy it is difficult for me to make sense out of them. I found some similar topics and followed some youtube tutorials but no success.

I installed the influxDB add-on, created a database “homeassistant”, created a user “homeassistant” with a password and read/write permission.

This is my configuration.yaml entry:

  host: a0d7b954-influxdb #copied from InfluxDB documentation within the add-on
  #host: localhost
  port: 8086
  database: homeassistant
  username: homeassistant
  password: "Password" #tried with "" and without
  max_retries: 3
  default_measurement: state
  #  domains:
  #    - sensor
  #    - binary_sensor
  #    - sun

This is my InfluxDB configuration:

auth: true
reporting: true
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
    value: "true"

I switched SSL off when no data showed up. If possible I would like to switch in on again. Probably the better option.

I have restarted and rebooted homeassistant several times. This is what the influxdb protocoll (on the homeassistant Add-On level) says every minute or so:

[httpd] - kapacitor [18/Oct/2023:17:08:57 +0200] "GET /ping HTTP/1.1" 204 0 "-" "KapacitorInfluxDBClient" 42b21ce5-6dc8-11ee-8d10-0242ac1e2101 95
[httpd] - kapacitor [18/Oct/2023:17:08:57 +0200] "POST /query?db=&q=SHOW+DATABASES HTTP/1.1 " 200 121 "-" "KapacitorInfluxDBClient" 42b27e3a-6dc8-11ee-8d11-0242ac1e2101 1657
[httpd] - kapacitor [18/Oct/2023:17:08:57 +0200] "POST /query?db=&q=SHOW+RETENTION+POLICIES+ON+_internal HTTP/1.1 " 200 153 "-" "KapacitorInfluxDBClient" 42b2ffd6-6dc8-11ee-8d12-0242ac1e2101 1543
[httpd] - kapacitor [18/Oct/2023:17:08:57 +0200] "POST /query?db=&q=SHOW+RETENTION+POLICIES+ON+homeassistant HTTP/1.1 " 200 149 "-" "KapacitorInfluxDBClient" 42b37763-6dc8-11ee-8d13-0242ac1e2101 889
[httpd] - kapacitor [18/Oct/2023:17:08:57 +0200] "POST /query?db=&q=SHOW+SUBSCRIPTIONS HTTP/1.1 " 200 224 "-" "KapacitorInfluxDBClient" 42b3d389-6dc8-11ee-8d14-0242ac1e2101 1088
[httpd] - homeassistant [18/Oct/2023:17:08:59 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 43ea92b0-6dc8-11ee-8d15-0242ac1e2101 8454
[httpd] - homeassistant [18/Oct/2023:17:09:02 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 45b70f45-6dc8-11ee-8d16-0242ac1e2101 8811
[httpd] - homeassistant [18/Oct/2023:17:09:04 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 46ebe9c3-6dc8-11ee-8d17-0242ac1e2101 9274
[httpd] - homeassistant [18/Oct/2023:17:09:06 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 47f99ae6-6dc8-11ee-8d18-0242ac1e2101 5231
[httpd] - homeassistant [18/Oct/2023:17:09:11 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 4af48fcc-6dc8-11ee-8d19-0242ac1e2101 8546
[httpd] - homeassistant [18/Oct/2023:17:09:22 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 5179cb4e-6dc8-11ee-8d1a-0242ac1e2101 10800
[httpd] - homeassistant [18/Oct/2023:17:09:26 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 53e5645f-6dc8-11ee-8d1b-0242ac1e2101 9225
[httpd] - homeassistant [18/Oct/2023:17:09:33 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 58177e18-6dc8-11ee-8d1c-0242ac1e2101 11297
[httpd] - homeassistant [18/Oct/2023:17:09:34 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 58d190bf-6dc8-11ee-8d1d-0242ac1e2101 14285
[httpd] - homeassistant [18/Oct/2023:17:09:38 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 5b0d0ba2-6dc8-11ee-8d1e-0242ac1e2101 10107
[httpd] - homeassistant [18/Oct/2023:17:09:40 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 5c4f5dbb-6dc8-11ee-8d1f-0242ac1e2101 4797
[httpd] - homeassistant [18/Oct/2023:17:09:44 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 5ee62da8-6dc8-11ee-8d20-0242ac1e2101 3980
[httpd] - homeassistant [18/Oct/2023:17:09:47 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 60351449-6dc8-11ee-8d21-0242ac1e2101 9209
[httpd] - homeassistant [18/Oct/2023:17:09:49 +0200] "POST /write?db=homeassistant HTTP/1.1 " 204 0 "-" "python-requests/2.31.0" 6199cf6b-6dc8-11ee-8d22-0242ac1e2101 14013

The Log and Explore tabs in the InfluxDB UI remains empty.

I also read about two different versions of InfluxDB, I seem to be using API 1 at the moment (username and password). Should I try to set up version API 2 instead or is it fine to continue like this? Is that a different Add-On?

Pleased to hear if anything else is required to get this running.

I want to get all homeassistant data into influxdb, storage should not be an issue. I may limit it lateron in case I do not need parts of it.

It would be great if someone could help me understanding what doesn’t work in my setup.


Here is my working config (apart from my includes and excludes!)

  port: 8086
  database: home_assistant
  username: home_assistant
  password: redacted # does not use ""
  ssl: false
  verify_ssl: false
  max_retries: 3
  default_measurement: state
    instance: prod
    source: hass

My “host” is the IP of my HA (running HAOS)

That did the trick for me. Thank you! No Idea what was wrong in the first place but now it works. Very good video, easy to follow.

1 Like

The only thing that wasn’t covered, I highly recommend you use the include option to only import data you need.

Thanks, stole the tags from you. I think the problem was somewhere else. But anyway, thanks, much appreciated.

Good tip, already realised in Grafana that there are many sources already awailable. Will try to find our how to specify which data is important for me and which not. Difficult to decide for a newbie like me.

Is there a non-video version of this? I think I’ve got my InfluxDB 2 and Home Assistant talking (both in Docker containers of the same Compose file, using the same Docker network), but I don’t see any data showing up in the Influx Bucket.

Alright. Now I see in the HA log it’s timing out connecting to the host on my network running Influx. I’ll work this out.