Ok, so I wanted to put some effort in my ever growing influxdb which is now around 40Gb in size :-).
But like any other “tasks” in HA it’s not so simple.
I read about influxdb and I use the addon. I Assume I have v1 (not 2).
I have and exclude list now in recorder and in influxbd, mostly the same.
I tried to search how to cleanup influx, not found any helpful sources.
Then I tried to find out how to get “wanted” entities in influx:
only certain integrations (cannot find how to do this).
All these tasks… I end up in dead ends…
Thus I wanted to ask, just as a starter, can anyone who has an “include” list for influx please share it below?
Additionally - is it a good moment to start influxdb v2 ? Can 1 and 2 run in parallel?
This is my current config and added “include” config.
I am struggling to understand the rules of InfluxDB - Home Assistant
I expect that:
the include will be included, then nothing else will be included.
the exclude will all be extra excluded on top of the nothing else will be included.
I meanwhile stopped forwarding data to influx( I never really had a good case for analysing older data), thus my configuration might no longer work. also never had Influx2 running
I created template sensors for all entities I wanted to have in influx, all template sensors had a time based attribute to force updates every 5 minutes and all template sensors had a “_db” at the end of the entity name ( and a few where HA added the “_2” suffix…
Additionally, because I didn’t like that by default the measurement in influx was created by the unit of the entity ( measurements like “°C” or “%”), I overwrote the measurements in the influx configuration:
I am sorry. I asked for maybe a reason I would need it as well.
I started another home assistant to “test”…
This is so true! Even if I specify specific entities (two) though everything is written in the DB…
According to the documentation this should not happen but it does…
With that in mind it’s not even feasible to start changing the config in my production setup…
I do not understand these filters.
Why is everything included by default?
I only want to track a couple of dedicated entities and nothing else but I am not able to configure this. The influxdb is always tracking tons of useless information and start growing very fast.
It would be great if some one could provide a example that allows to pick only a few entities and remove the rest.
I was searching something else and found this post. It’s a matter of fact that HA writes the sensor data every 30? seconds independent if value changed or not. This blows up the database, not limited to influxdb, same for logger-db.
A question if somebody has an idea how to delete sequent updates whithout value update what are more or less duplicates.
How could be functional “<<<< duplicate” removed from database or even prevent to be written? When temp wasn’t changed there is no benefit to write or keep such entries.
No it is not a fact at all. The data is only written when the state changes. This actually annoys a lot of people. See: InfluxDB to store data in intervals
Is that Influxdb or the recorder database?
If it is the recorder, maybe it is because one of the entity’s attributes changes every 30 seconds.
Ok, when data is only stored when it’s unique it’s the behaviour I would appriciate. Probably there are some special situations where this is not the case. I think it’s what you meant in your last sentence … if one of the attributes changed … e. g. climate has many attributes so it’s likely that there was any change. Out of the discussion I assume I can create / use sensors with single state and then there should be no duplicates.
Data posted was simplified to show the relevant part. I extracted a measurement from my Influxdb and there are duplicates (same values in a sequence) still. See below.