Hi Bill, I use an Epever solar controller that has an RS-485 interface which is connected to a Wemos D1 Mini via a 435 to TTL converter.
The Epever gives panel output in KWh and load in KWh.
My process isn’t very scientific - I just query these values every 5 seconds and display the results, plus accumulating them 8nto running totals for the day. The numbers don’t really mean anything, as they aren’t true KWh figures because they are 5 second snapshots and not then turned into hourly numbers, but they do give a really useful overview of power generated versus power used.
The Epever’s Panel output in KWh number is actually a representation of how much of the available power from the panel is being used to charge the battery. If the battery is at 100% and it’s bright sunshine the Panel Output number will be zero, or at least very low, because none of the available output power is being used by the battery or the load.
All of the load goes via the Epever’s Load output terminals, rather than directly from the battery, so that the controller can monitor the power used and report on it.
The RS-485 interface can also provide other metrics such as battery voltage, controller and battery temperature (with an external probe), battery State of Charge etc.
My setup is only used for garden lighting, so having proper metrics about exact wattage generated and used isn’t really important to me. I guess that if you were selling power back to the grid, or running an inverter for off-grid living then it would be a different issue. My goal was to understand the daily ‘balance sheet’ of power generated versus power used so that I can understand if I need to tweak the hours that the garden lights are on for each night - especially dieting northern hemisphere winters when the days are short and often cloudy and the nights are long.