tobyweston / temperature-machine

Data logger for multiple DS18B20 temperature sensors on one or more machines
Apache License 2.0
67 stars 22 forks source link

Delete old data #31

Closed andrei2186 closed 6 years ago

andrei2186 commented 6 years ago

What time period can be saved on memory? How can I delete older data when the card is full?

tobyweston commented 6 years ago

The data is stored in a RRD (Round Robin Database), that means the underlying database never grows beyond a certain size. As the temperature-machine records a data point, it will aggregate and store that value and after the aggregation period has elapsed, it will start overriding old values.

The aggregation periods are 24 hours, 7 days and 30 days. So, to answer your question, those are the time periods that are stored.

If you do want to delete the data for some reason, delete the ~/.temperature folder. The .rrd file there is the database but remember it's fixed size so doesn't grow out of control.