HA and influxDB on docker

Hi,

after some time of trying, I managed to get InfluxDB and Grafana to play together in my Docker environment, and then I had a look into my InfluxDB bucket. By all the things I can see it doesn’t look that HA is actually writing anything to that bucket.

Going through the UI of InfluxDB I see there are buckets and sources, etc. and I wonder if I have to somehow add HA there as a source.

On the other side I have my configuration.yaml in my HA and there it looks like this

influxdb:
  host: 192.168.1.110
  port: !secret influx_port
  database: home_assistant
  username: !secret influx_username
  password: !secret influx_password

Any way on how I can figure out if HA is actually writing to the bucket, or can you already tell that I do not write anything because I am missing an essential part?

In the standard HomeAssistant installation there is an entity called Sun, with an entity id sun.sun. I would expect this entity to be logged in the database, but I cant find it there.

The HomeAssistant logs show the following error:

InfluxDB database is not accessible due to ‘401: {“code”:“unauthorized”,“message”:“Unauthorized”}’. Please check that the database, username and password are correct and that the specified user has the correct permissions set.

The name of the database is correct, the username and password are the one I use to login to InfluxDB

When I look for directory rights on the influxdb docker container, then they belong to a DSM user, who is in the user group.

Changing the information in my secrets.yaml for the credentials of the DSM user leads to the same error message I received before.

I am running Home Assistant 2023.1.7 Frontend 20230110.0 - latest and InfluxDB v2.6.1