Newbie - 3 phase system - summing only the positive values

Hello all. Hope someone can help. (Also hope I’m not being too thick here.)

I’ve recently setup a new monitoring system for our 3 phase supplied domestic property here in the UK.

I bought the emonTX and emonBase with three CT sensors, loaded up the 3 phase sketch and everything looks to be working as expected.

However, having soon become immune to the initial immense excitement of seeing a spike when the kettle went on, I wanted to begin to log some more meaningful data.

We have PVs and thus can often see negative values to show flow back to the grid.

That’s great, but what I wanted to do was see what we are actually drawing from the grid. I therefore thought I’d use the ‘allow positive’ and sum all three phases. I’d hoped/assumed this would only log positive values. However, I’ve clearly either misunderstood or configured incorrectly.

If someone could take a look at the commented screengrab and point me in the right direction I’d be very grateful.

Cheers, Tom.

Is the your local emonCMS or (Because they work slightly differently - your local has more features then the OEM one.)

What do you want - the nett import or the sum of the import of the three phases?
If you’re exporting on two phases and importing on the third, or vice versa, those are different. Your supplier’s meter should show the nett import, but it might not.
From what you have done so far, it looks as if you want the sum of the imports.

I think (I’m not an emonCMS expert) that lines 2, 3 & 4 are redundant.
When you come to line 6, it looks as if you have the import value of Phase 1 and you’re adding Phase 2 - but all of it, NOT just the positive part. So if phase 2 is exporting, that reduces the number at this point. And I don’t think that’s what you want.
What I think you need to do is write the positive phase 1 to a second feed, reset to zero, get Phase 2, allow positive, add the positive feed, write it back, do the same again with phase 3.

Try it, but remember I haven’t, and I’m open to correction.