i have been poking around with my monitoring system since 2nd March, and i have recently made some changes to the CT clamps which i am now happy with as the system (whilst not calibrated) seems to be collecting data in line with our usage and solar output.
Irrespective of how long has passed since i started setting this up, i now think i am at a stage where i would like to clear down, purge or delete all historic data, and start collecting again from now.
I have looked around the forums and after some searching and i cannot find a definitive answer as to if this is possible or how to make this happen.
Is there a way of purging all historic data? i dont want it back as i want to start again, if there is no reliable way or purging this data i assume that flattening the PI and reinstalling the image from scratch and configuring it all again is the only answer, any thoughts before i flatten the solution and rebuild it?
You should be able to do a factory reset, see How to factory reset emonPi - #2 by glyn.hudson. That is a couple of steps short of “flattening” your pi, but I agree a “reset data only” function would be useful, many users experiment and then want to start with fresh empty feeds, a factory reset also looses all their settings and processing that they have been experimenting with and finally got the way they wanted, it would be useful to keep that.
Agreed, if emoncms could simply edit the meta file start time (in the case of phpfina), delete the data file and recreate a new empty file it could be triggered from a reset feed button (or api call).
This function could then be expanded to query the last 12mths or 2years data before doing the above and saving that queried data (and calculated start time) as the new feed file. If this was done regularly (eg by cron each midnight or weekend) this would provide a way to have a rolling feed that never really grows in size and can reduce the disk space used. These “rolling fixed length” feeds have been requested several times in the past.