Keeping Energy Data

I want to keep my Energy data for a year.

But right now the only thing I know is
purge_keep_days: 366.

But that is keeping all data for a year.

Is their a way I could keep Energy data for a year but have everything else at the default 10?


Use energy

Hi Sandalman:

I am using that functionality.

My question is about how long that data remains in the system. I don’t want it to be lost in 30 days.

How do I set the system up to keep all the Energy data for a year?

It stays there for ever.

1 Like

Oh ok so that isn’t connected to the recorder purge_keep_days variables!

It is a bit. It works like this:

State data is deleted when it is purge_keep_days old.

Long term statistics (LTS) generated from the state data are never deleted. However…

LTS are initially saved as 5 minute max/min/average values. When this data is purge_keep_days old it is down-sampled to hourly max/min/average values. This keeps the database a lot smaller as it is only three values for each hour of the day (3x24 = 72 values, instead of 3x24x60/5 = 864 values for five minute stats).