If I understand correctly, you have an incoming mains supply feeding your house.
Is it single or three phases? As you say you have a 9 V ac adapter, I assume it is single phase.
Somewhere, there’s a connection to your inverter/battery charger.
The inverter also has a feed from solar panels.
You’re going to measure power and energy imported from the grid, and nett power and energy on the a.c. side from your inverter.
As I see it, you cannot measure the power output from the solar panels only. Because you have the a.c. adapter, you can measure the direction of power flow, hence you will know the nett energy flowing in or out of the inverter. But, forgetting the solar panels for the moment, there’s the efficiency of the battery and the battery charger/inverter to take into account, so you’ll never get out what you put in. Therefore, when you measure the nett output from the inverter with the solar panels working, some of their output will disappear because it has gone to make up the losses in the inverter and the battery.
I think this is what you mean by “approx. power from solar panels.”
Does your inverter have a data output of any sort, and can it tell you exactly what it is doing - the proportion it is taking from the mains and from the panels to charge the battery and the proportion it is exporting to your house? If it can do that, then you can calculate the true output of the solar panels.
If it can’t, then you need to consider whether you want to and can measure the solar panels’ voltage and current directly on the d.c. side. Even then, I’m not sure how helpful it would be because you’d still be wrong since the inverter efficiency (but this time, only one way) would need to come off that value in order to know the useful energy you got.
It looks to me as if you will have to accept that the solar panels’ output will show as being lower than it really is, because of the battery and inverter losses.
If you don’t have one, while you’re ordering and paying shipping & currency conversion charges, I recommend you order a programmer.
(For our information, why can you not export energy. Is it prohibited, or are you penalised, or what?)