Measuring phase angle and power

Hello Perfo

Quoting : As far as I know the only way I can detect if I'm importing or exporting is by measuring the phase angle between the voltage and current of the supply.

I am not absolutely sure your premise is correct about phase.
I recall theoretically for AC mains power the Voltage and Current should be in absolute phase to each other. The phase can be changed by the inductive/capacitive loading on the network. One reason AC motors may have a capacitor is too eliminate the phase difference created by the motor so that when measuring power usage; there is no power factor issue. The capacitance cancels out the inductance of the motor, so that the effective load still appears to be resistive.
Older watt-meters work with windings, so if you reverse the current through it, the meter runs backwards.

I leave my statements open to question, as I am not an expert, and quoting 30 year ago College electronics course ;^)