Difference between recorder and external database

What is the difference between the recorder component and utilising an external database.

I’ve recently setup InfluxDB which now takes all of the state data, but I also saw that the recorder element can be used to send data externally as well (but does not support InfluxDB as far as I can see?).

What is the difference between them? If you have InfluxDB setup is the data still being recorded in the internal SQLite database as well?

Yes, they are completely independent systems. The recorder component is used for the history: component, and some others. The default sqlite can be replaced with a MySQL db, but it is doing the same thing.

Influxdb is something I use for long term data storage to see trends with grafana. You could use something like this with sqlite, but I find I have to delete the HA db too frequently for that to be useful.

Ah okay, thanks for the info!

Do the purge days parameters for the recorder component keep the size down effectively or does it still need deleting occasionally? I’m guessing moving it to a MySQL db gives you the persistence of that data anyway, even if it is just caching a weeks worth or so?

Yes. I have it set to 3 days, and it stays at around 40Mbytes.

I have had to delete it 3 or 4 times in the 18 months I’ve been running HA, but because of some corruption, not because its too large.

I have found that having such a short purge time means that some input_booleans I have that don’t switch very often do not get restored on restart. There is an appdaemon app that can handle that if necessary.

Using a MySQL db does not change the persistence - the data is still deleted after purge days. But it is supposed to give a much better performance with a large amount of data. I have never used it.


Awesome, thanks for clearing that up!