An easy way is to use a known load ( for example "test load" of 220V 220ohms) in conjunction with an ammeter measuring total current to the house .
The test load should be connected for a few seconds only to "see" the ammeter.
If you connect test load and the current in ammeter arise, your house is in "load" mode. If you connect the test load and current decrease, your house is a source.
If you know whether your house is a load or a source, then you can calculate the power just measuring current with no test load connected.
I this idea you just need a contactor, a known resistance, a TC and a simple circuit that just need the current signal to calculate power as a source or load.