Measuring Oil flow to home heating boiler

Hello Tom, came across this post and used it to create my own setup
All working BUT have a couple of problems

  1. Logging time seems to not stop when boiler watts are low. Counts non burning time as well as when boiler is active
  2. How did you to the last bit, calc oil usage and coundown of tank capacity?

Did not want to reinvent the wheel so though worth asking;-)
great idea using Shelly power monitor
All best,
Nick