Configuration.yaml, influxdb and multiple databases

Hi all,

I have an influxdb and Home Assistant has exporting its data to just fine. This Influx handles multiple things in my environment and therefore there are multiple DBs in Influx. How can I pull in these various databases as sensors in HA so that I can action upon its data (let’s say temperature of a device exporting to Influx)

I searched around and there are plenty of examples but not if you are also exporting Home Assistant data at the same time.

Below is the configuration section I currently have in the configuration.yaml

  host: influxdb
  port: 8086
  database: homeassistant
  username: xxx
  password: xxx
  max_retries: 3
  default_measurement: state
      override_measurement: lt
      override_measurement: humidity
      override_measurement: temperature

Thanks for any pointers

I would appreciate any pointers that someone can offer

Am I asking this question in the wrong forum? If this isn’t the correct place, I would appreciate someone letting me know so I can direct this question appropriately

It’s basically very unclear what you want to achieve, and also where you get the impression that there are multiple DBs in your influx, and also very unclear what you mean by

PS: your yaml config shows 1 DB

Thanks for responding

I have InfluxDB. Multiple components that are NOT in HA, are logging to their own database in influx.

So there is a Garmin database, a Telegraf database and so on.

This is in addition to the database that home assistant uses.

What I would like to be able to do is make a sensor out of the Telegraf database that is in Influx because it has some temperature data for something i cannot directly connect to HA.

I’d like to be able to trigger some action (turning on a fan) based on a temperature threshold being tracked by Telegraf → Influx

So I don’t know how to make a sensor out of InfluxDB while maintaining the ability of HA to write to its own HA database

Hopefully that is more clear?

ok, yes , i’ve been having the same ideas, and haven’t found a solution yet, before i went over to influx i tried to create another table in HA’s default DB ,to import from CSV … that didn’t turn out to be a good idea :slight_smile: , so i tried to install influx as well as Grafana, < but that’s from influx db, even did a DB in influx for CSV-import been stucked there since … New to HA, so i haven’t been “bored” yet setting up everything, so i really didn’t put any effort in finding out further … might switch to external MariaDB, as im really not “comfortable” with influx, Grafana is ok
But maybe below is the way, not sure how i should interpret this, and havent tried yet

EDIT: this i mend

Or use a rest sensor , if possible

i really not sure, as influx is a time-serie DB, but maybe “threshold” can be “picked out” as a trigger
thou if above works as i interpret, it should be possible to “add” the threshold in HA custom-graph-card, and use that as trigger

I have the exact same use case and I also struggle with it. stratus-ss - did you find a solution?

The use case is:
Normal HA setup.

  • All sensor data is saved to a standard influx db. Lets call it homeassistant_db
  • Telegraf nodes are set up that also publish to the same influx service but a different db. Lets call it telegraf_db

The objective is to keep HA publish data to its regular homeassistant_db and utilize data published to telegraf_db to drive automations.

Bonus feature will be to stop HA publish telegraf_db data to homeassistant_db once the sensor is setup.