Is a Raspberry Pi really so bad?

Right. Recorder is where ALL the data collected by HA is stored. Very inefficiently, IMHO. But it’s quite functional as long as you make the effort to use it carefully. Here are a couple of links which should be required reading for beginners:

To summarize, there are three important things to know:

  • Be sure to either exclude unwanted data, or include only the data you want to keep.
  • Set your purge_days to as low a number as you can live with.
  • Use Recorder: Purge and Recorder: Purge Entities services to prune the live database.

You probably want to exclude a somewhat long list of entities from being recorded. You will find entities whose states change every second, which you’ll never want to go back and look at. If you create templates, you don’t need both the original data and the data from the template. In fact, you can make templates to save just the data you want from an otherwise verbose or chatty entity, then exclude the original. Many entities only change state rarely (think, a light switch) so those don’t contribute much database I/O and can be safely ignored.

HA does a good job of purging the database of data older than the purge_days value you set.

You can also manually purge the live database using Developer Tools / Services. There’s a service to purge the data older than X days. and (optionally) repack the database to reclaim space. There’s another to purge individual entities, to get rid of the old data from that entity after you’ve decided to exclude them.

Tip: The History page in the UI is a good place to get a feel for which entities generate a lot of changes. Be sure to select a long enough time span that you can easily spot the worst offenders.

3 Likes