Hi Folks, I’ve had an EmonPi for years, but things have recently gone wrong and I’m struggling to get it up and running again properly.

I’ve got a Solar array and the Pi setup in “Type 2”. I’ve got the Pi logging to a remote EmonCMS install of my own (not .org). This has worked fine over the last few years. Unfortunately I had a power cut last month which knackered my EmonCMS install, and I had to recover from backup, which all appeared fine.

But now, I’ve noticed that my Solar readings are being sum’d to my Grid usage. So when the sun is out, it looks like I’m using more power than I am, in fact, exactly the amount of solar I’m generating more:

I disconnected my solar and you can see my solar drop off to 20W (which is also odd in itself, as it never used to do this), and correspondingly my power usage drops by the same amount. When I reconnect the array, everything jumps up by the same amount.

Now maths, really, really isn’t my strong point, and I get confused with even basic arithmetic, so please bear with me. I’ve got CT1 recording what’s going in and out (positive is import, negative is export). And CT2 what the solar is producing. The instructions say that you add the “Power 1” input to the “Power 2” input to produce the “use” feed.

I’m really at a loss as to what is going on here, as I should expect to see my use remain static, just my import going up when the solar goes down. With the value on CT1 reducing when solar is active.

And that is correct for a “Type 2” system.

That too is correct for a Type 2 system. If both c.t’s read power going in to the house, the sum must represent the amount of power you are using. (Like filling a bath with both taps.)

Trying to avoid using the 5-letter “M” word, given our convention is power coming into the house is positive, both grid and solar:

Use = Grid + Solar       [Type 2]

or

Grid = Use - Solar       [Type 1]

In both cases, if Use is greater than Solar, Grid is positive (you’re pulling in power), and if Solar is greater than Use, Grid is negative (you’re shipping out power: 100 - 120 = -20).

This is not right. What should happen is as you say: when you turn off the solar input, and assuming the house usage remains the same, the house use should show as staying the same and the grid import should jump up by the same amount as the solar input fell. I believe what you’re seeing, so that means the inputs to My Solar have to be wrong, and if what’s going in is wrong, what comes out will be wrong.

What are the input processes for your two inputs? (Look on the Setup → Inputs page and click the spanner icon on the right of each to see.)
And which Feeds are you using for the inputs to My Solar? (Click on the spanner just above “SOLAR PV”

I did some more troubleshooting, and spent some time monitoring the inputs at the pi and ignoring the feeds and EmonCMS logging. I could reproduce the problem here, when I disconnected solar, the power1pluspower2 input would drop, despite no change in load in the house.

Whilst I rebooted the equipment previously, I hadn’t tried completely powering it down, which I did and left it for a moment before powering up again, and magically everything started reading more accurately. It’s now measuring exports correctly and at night the solar has a small negative value instead of a positive one.

So I assume this was a hardware glitch on the Pi. I’m glad it’s resolved, but it doesn’t fill me with the greatest confidence in my figures!

Hello @Dash I wonder if the emonPi booted without detecting the ACAC adapter which is used for voltage sensing allowing both measurement of direction of power flow and overall better accuracy. When you rebooted it would have looked again for the AC adapter and detected it, perhaps therefore restoring your results?

Trystan actually means “When you restarted it…” The “emon” part that does the voltage and current sensing is not rebooted when you reboot the Raspberry Pi, only when you do a full power-down and power up again.

Running without the a.c. adapter means it didn’t know the direction of power flow, therefore your Grid power was recorded as an import when both importing and exporting. Because of the way the calculations work, it also explains the high 20 W “zero power” from your PV - which was probably mainly circuit noise that wasn’t averaged out by the normal power calculation that’s done when the a.c. voltage is available.

Analysing the numbers as best I can from reading and estimating from the screenshot:

At the start at 10:34
Use = 2400 W, Solar = 1500 W, Implies Grid = 2400 - 1500 = 900 W import
If Grid was 900 W export, Use would have been 1500 - 900 = 600 W

Just before Solar is turned off @ 10:35
Use = 2000 W, Solar = 1300 W , Implies Grid = 2000 - 1300 = 700 W import
If Grid was 700 W export, Use would have been 1300 - 700 = 600 W

You said house use hadn’t changed - so are the two values of 600 W a coincidence? It doesn’t look very likely to me.

Just after Solar is turned off @ 10:35
Use = 800 W, Solar = 0, Implies Grid = 800 W import

Again, this is close enough to 600 W, given the numbers aren’t accurate to begin with. I think your a.c. adapter might have a dirty plug (mains side or low voltage side) or it was turned on just after the power to the emonPi was turned on, rather than before (or at exactly the same time by the same switch is OK), and Trystan’s suggestion is right.

Thanks for the explanation, I went back and checked the vrms monitoring (not something I tend to look at) and sure enough it was reading a flat 230V across the board - so I think that explains that.

Naturally being powered down isn’t something that often happens, so I’ll be sure to check that in that scenario in the future.

Thanks folks.