Community
OpenEnergyMonitor

Community

Trimming feeds - Is there a way to do this globally?


(ian) #1

Hi

I have used the feed trimming on a few really old feeds and it has worked without problem. I have a great many feeds and to do them all would be time consuming. Is there anyway Trim could be applied to all feeds? I backup on a regular basis but I have so much old data that I do not really need it can now take an hour or so even on a Pi3.

Oh Oh, I just spoke to soon. I just trimmed a feed and the latest readings after the trim are incorrect. Maybe a bug in Trim. Good job I had backed up!


(Paul) #2

I do not think currently there is a way to automate this or apply it globally.

But it is available via an api call

so you could automate this with an external script, either working on a specific feed list supplied by you or a queried feed list if you want it totally global.

This could be introduced as a part of your back up regime where you backup then trim the unwanted stuff or trim 1st and then backup, both have pluses and pitfalls, probably end up backing up twice, once before and again after, that may not shorten the time taken after all?

edit - I think this feature request issue was closed prematurely as there would be significant value to storing just the last 24 months (for example) data, especially on a emonSD/Pi device, particularly if the backup routine becomes part of the update routine discussed else where.