Predicting Battery Usage

I am trying to do something that should be easy, clearly I am to ‘thick’ to own a computer! I am trying to work out the size of panels and particularly battery size that I require. I have two sensors that should give me all the information I need to do this.

  1. Overall power consumption in watts by minute.
  2. Predicted solar energy produced in Kwh by hour.

I installed the InfluxDB and Grafana extension that does give me the information kind of with charts and gauges of the consumption, production over time and I can calclulate the net production obviously to calculate the difference. This of course does not emulate a battery where I want to increment the difference between in and out showing a maximum battery discharge and then stopping charging when the battery reached full. Is there either a more cunning way to achieve this (so cunning you can pin a tail on it and call it a weasel) or a plugin that will achieve it. I just cant see how to do this in Grafana/Influx. Part of that is that Influx is ‘sort’ of SQL but not quite, or I could just do it in a query.

Help