External InfluxDB and later integration with HA

Hello all,
I’m new to HA and I’m evaluating the best scenario for me and how to use HA.

From what I understood, most of sensors implementation are using MQTT, HA will consume it and later can “record” it on a InfluxDB.

From what I learned, I tend to prefer that I my sensors send their data directly to a InfluxDB.
I learned that it is possible to create sensors on HA based on external InfluxDB queries (although, looks like HA may have some limitations)

But now the questions are:

  • How will HA perform doing its “business logic” and other features (eg alerts ) with this kind of “sensor based on InfluxDB” ?
  • How frequently does HA will query/polling the “InfluxDB sensor” ?
  • Instead of polling the InfluxDB for the latest state, is it possible to get notifications InfluxDB for updates on some change? (eg a switch sensor sends its state to InfluxDB, InfluxDB notifies HA that the state was changes/updated)

Hope you can help me to get it clarified!

Hi !
Not most sensors are using MQTT. Depends on what you setup :slight_smile:

  • I don’t get the point here sorry
  • HA queries influxDB every 10secs
  • Nope, design of the integration is HA polling your database.

Are that queries frequency configurable? can it be config for each “sensor” ?

I mean, (I still dont know all HA features but) if there is some kind of alarms I want to generate over that “sensor” value/state, I understand it will be based on latest polled value from database?
But as you mentioned, it will only evaluate this alarms/checks every 10s?

Maybe this is another questions but, should I get advantage to add NodeRED to do stuff with “InfluxDB data” and then publish things to HA or something other way?

The frequency is not tunable.

Yes, your alarm might be delayed of 10secs because of polling interval. There’s nothing you can do about it with HA. You could still use any other product capable to generate alarms from influxDB database like grafana for example…

But I think there’s no such case where 10sec “lag” is a big problem. :man_shrugging:

Why don’t you send the sensor data to InfluxDB and HA? With MQTT sensors both can subscribe to the same topic.