What I’m trying to do is alert every, for example, 100L. A pause of zero-usage for, say 5 minutes, would reset the counter. This would indicate the kid(s) have finished showering, gives me an idea of how much watering has happened in the garden etc.
I could be over thinking it too. Sprinklers, hose, shower etc, all have a certain flow rate. Maybe just checking how long they have been on for will suffice.
I was playing around with that but was thinking there might be a better way. Would averaging it not lose accuracy?
If my measurements are every second and given as L/m, would taking each value, dividing it by 60 and then summing them for the hour, that would give me L/s * 3600 = litres in the last hour.
I could then persist that to another item as L/h
I could simplify the above if I changed the Arduino code to report L/s every second.
It’s a custom built one. As above, I could change the code to report in L/s which would make it simpler in OH to calc.