Pulse count with conditions

Hi all,

I have pv and battery storage so when the house load is supported by the solar or battery very little power is exported / imported so the error of the CT sensors can get quite large.

I thought I could use the pulse count but sadly my main electricity meter flashes on both import and export so here is my question.

I have the grid CT clamp spilt into two feeds with allow positive and allow negative (this get converted to a positive number with x-1)

Is there a way for me to use both the feeds and the count the pulses.

If CT grid import feed is >0 then count pulses and add to a new feed grid import pulse.
&
If CT grid export feed is >0 then count pulses and add to a new feed grid export pulse.

Do you mean the accumulated energy error can get quite large?

I think I’ve seen something like this - I can’t remember how long ago though. Worse still, I can’t think of a set of key words to search for.

I suspect it involved the “conditional” processes in emonCMS, which are only available in your local version, not in emoncms.org.

[Edit]
It might have been this that I remembered:

This is all being done locally on the pi, will have a look at the conditional unsure how to get a condition based upon another feed if that makes sense but will have a play around.

Sorry for posting in the wrong section.

Been thinking about this I’m not sure this will work, I have a emonTH with the optical sensor attached as i dont have useable power by my meter. The emonTH stores the pulses and then send them every 60 seconds to save battery life so my condition will be potentially incorrect as when the pulses get sent the current grid import or export could have changed.

Will have to tune my CT sensors the old way…

Ah, you didn’t mention the data wasn’t anywhere close to synchronous.

As you say, it’s the old way - a calendar, a pen and the individual registers on the meter.

You could tweak the emonTH sketch to send the pulse count much more frequently, but at the cost of battery life. If you say just under every 10 s, you should still get a few months from a set, which is probably enough to get a fairly close calibration on one set of batteries. (Then change it back to just under a minute.)