David00 / rpi-power-monitor

Power Monitor (for Raspberry Pi)
https://david00.github.io/rpi-power-monitor/
GNU General Public License v3.0
1k stars 103 forks source link

"two_pole" configuration incorrectly doubles current #106

Closed cgleggett closed 7 months ago

cgleggett commented 1 year ago

When a CT is marked as "two_pole" in the configuration file, ie the CT is metering one leg of a two pole breaker, both the power and current values are doubled. I don't think this is correct - it should be just the power that's doubled.

David00 commented 1 year ago

Hi @cgleggett, thanks for opening this issue for discussion.

The two_pole setting is essentially saying: If you had a sensor on each leg of a North American 240V circuit, what would the total power and the total current look like?

The two_pole setting assumes that the device connected to the 240V circuit distributes the amperage evenly over both legs, which is why the amperage is doubled. This is usually the case for solar inverters and EV chargers.

There may be an opportunity here to improve the docs surrounding the two_pole setting.

cgleggett commented 1 year ago

Right, but if you've say, 20A running through one leg of a 240V circuit with no neutral, like an inverter, you have 20A running through the other. And while the power would be 2 x 120 x 20, the current is still 20A. If you're looking at the current of the circuit in say the grafana plot, the value will be twice what you would expect, though the power is correct.

David00 commented 1 year ago

I see what you mean now! Thanks for explaining further. I'll have to look into how I can fix this in a way that makes sense for all types of grids.

David00 commented 7 months ago

This has been resolved now - thanks for reporting the issue!