Are you on a single phase supply? And no PV or other on-site generation?
If so, you (or somebody, unknown to you) has either reversed the c.t. on its cable, reversed the a.c. adapter in its connector (if you don’t have the polarised U.K. adapter) or put a minus sign in the maths somewhere. Those are the only 3 possibilities that I can think of. Of course, if you have PV, then you should record negative values when exporting.
If you’re on a 3-phase supply, bear in mind that the emonPi is designed only for a single-phase UK-like supply system, and thus it will only measure accurately if the a.c. adapter and c.t’s are all on the same phase. With voltage and current on different phases, you could easily have readings that swing positive and negative depending on the power factor of your loads.
Can you explain what that is and how it’s connected?
AFAIA there is no “official one” for New Zealand (location from your profile) so I’m guessing you are possibly using either a UK or EU AC adapter and a converter to NZ spec? If I understand correctly, NZ is 230v like the EU (not 240v like the UK) so it could well be an EU 2pin AC adapter you’re using? IF that is the case, changing the orientation of the EU 2pin adapter in the EU to NZ converter would effectively reverse the polarity of all connected CT’s as the reference AC signal is inverted. This can be a common issue for 2pin AC adapter setups.
If you are using a fixed polarized AC adapter then yes, it’s a bit of a mystery!
I think that’s an absolute certainty, given that you have no on-site generation.
There has to be a rational explanation, but nobody - me included - seems to be able to find it. Something has clearly changed, either you’re discounting it or you’re simply not aware of it, but between us I think we’ve covered all the possibilities that we can think of.
Let’s go back to basics. The direction of power flow is given by the relative phase of current and voltage. (The full explanation, if you need it, is in ‘Learn’.) You can change that by reversing the c.t. on its cable, by moving it from line to neutral (while still facing the same way) or by swapping the leads inside the jack plug, or by doing similar things with the a.c. adapter: swapping line and neutral on the mains side or swapping the wires on the low voltage side. Once the voltage and current get into the emonPi’s front end, the power comes out of the maths as positive or negative depending on the phase relationship, so from then on it’s a case of a minus sign in the wrong place. So if you have a negative calibration constant in emonHub, or a minus sign in emonCMS’s processing, either of those will give a negative power too.
It has to be one of these things - somewhere. Or an odd number of them. An even number will cancel.
It can’t be something the electricity supplier has done upstream of you.