HA recorder tutorial?

Hi all,

I would like to use HA recorder (very simple application – I just want to add up the mm of rain in a rolling seven day window). I have been to https://www.home-assistant.io/components/recorder/ and have googled around a bit, but the topics that come up are about dealing with crashes, enormous databases, etc.

I just want to store a few bytes of data each day. :slight_smile:

Does anyone have a link that explains the basics of recorder: how to put data in, and how to get it out?


i would try this

That would be perfect for Sean’s application - if it worked. By all means have a go at it and if you find you are not getting the results you expect you might want to add your voice to this:



Thanks, both of you. I’ll take a look.

You might get some use out of this, there’s an example in it for 30 days which is easily changed to the last 7:

Thanks, Bit

QQ @Bit-River:
If I want to run stats over the last 30 days, do I need to have my history/recorder set to 30 days as well or does the statistics sensor take care of that?

Your history will have to cover that time period.

You could also run with a different database, e.g. InfluxDB, and make your queries from that. It’s a bit more work though.

Thanks, @Bit-River - I’m having trouble with a 3-day history on my RPi3 already because as soon as it gets to a database larger than 3GB it’s not working reliably any more.
Probably need to look at the history/recorder settings to find out what causes the huge db size in the first place.