Identify when the inverter is pumping energy back into the grid
If you only know the inverter's voltage and current, then you can't deduce whether it's feeding power to the grid, or drawing power. For this, you need their relative phase. When they're in phase, the power flow is one way, in the opposite phase and the power flows the other way. 

An inverter that's designed for grid tie injection will usually have a facility to read power flow. A metering system designed to allow you to claim payment for the power will always be able to read power flow.