# OpenEVSE Correct power calculation for both single and 3-phase

**URL:** <https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587>\
**Category:** OpenEVSE\
**Created:** [23 January 2023 19:57 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587 "2023-01-23T19:57:15Z")\
**Posts on this page:** 8\
**Page:** 3

<div class="post-metadata">

**Author:** ![nick1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@nick1](https://community.openenergymonitor.org/u/nick1)\
**Post date:** [28 May 2026 16:00 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/41 "2026-05-28T16:00:40Z")

</div>

Thanks for the reply.

No, it was actually the second contactor I wanted to do. My Skoda can accept single / 3 phase changes while charging. I get the rapi confirmations, both in the GUI and via MQTT ok but nothing happens to the state of the relay output.

even changing;

uint8\_t relay2Enable = 1; //default to both relays enabled

to

uint8\_t relay2Enable = 0; //default to both relays disabled

didn’t turn it off.

I tried adapting energyMeter.ccp to

```auto
#ifdef THREEPHASE
      // Multiply calculation by 3 to get 3-phase energy.
      // Typically you'd multiply by sqrt(3), but because voltage is measured to
      // ground (230V) rather than between phases (400 V), 3 is the correct multiple.
      if (relay2Enable){mws *= 3;}
      else {mws *= 1;}      
#endif // THREEPHASE

but the reading in the GUI doesn't change.

I'm somewhat baffled.

```

---

<div class="post-metadata">

**Author:** ![alandpearson](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@alandpearson](https://community.openenergymonitor.org/u/alandpearson)\
**Post date:** [28 May 2026 16:26 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/42 "2026-05-28T16:26:27Z")

</div>

I’ll take a look at the code again. I assume you replaced the contactor to 3 individual ones, and used /rewired the GPIO on the board to drive the 2/3rd phase contactors ? I’ll have to dig out my test board which is still running this code to see what I did to try to guide you in detail as it’s been a long time and I can’t remember how I did it. If I recall I took the GPIOs through a dual relay board to drive the contactors.

---

<div class="post-metadata">

**Author:** ![nick1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@nick1](https://community.openenergymonitor.org/u/nick1)\
**Post date:** [28 May 2026 16:48 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/43 "2026-05-28T16:48:03Z")

</div>

Thank you.

I’ve not actually got to the stage of adding contactors, just trying to get the code working. I still have the single 4 pole one as I’m using the charger. I have put an SSR on the 2nd DC relay output as that has an LED which lights when energised so I can see if the code works.

What I was thinking of doing was to leave the 4 phase contactor in as normal and then take either one phase or two phases from that output and run those through an SSR. That way the stuck contact checks would still work.

My car has to be either single phase or 3 phase you can’t use just 2 phases but I don’t know what happens if you only switch 1 phase off, room is tight in the housing, so a single single phase SSR would be an easier fit.

---

<div class="post-metadata">

**Author:** ![nick1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@nick1](https://community.openenergymonitor.org/u/nick1)\
**Post date:** [1 June 2026 20:35 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/44 "2026-06-01T20:35:24Z")

</div>

Unsure what was wrong, but now working including changing relay states while actually charging.

I realised why altering energyMeter.ccp didn’t work- it’s now calculated within the WiFi firmware! Will now have to figure a way to get the right calculation depending on which relays are energised. I guess I could do it within energyMeter.ccp by #def THREEPHASE but then the UI three phase switch is redundant (wrong). EDIT- is that file in the evse controller firmware used now though?

How can I get the state of relay2Enable into the wifi file energyMeter.ccp ?

---

<div class="post-metadata">

**Author:** ![nick1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@nick1](https://community.openenergymonitor.org/u/nick1)\
**Post date:** [5 June 2026 12:44 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/45 "2026-06-05T12:44:44Z")

</div>

> [@nick1](#):
>
> My car has to be either single phase or 3 phase you can’t use just 2 phases but I don’t know what happens if you only switch 1 phase off, room is tight in the housing, so a single single phase SSR would be an easier fit.

Well, actually, I’ve found that if you only have 2 phases connected the car will actually use those 2 phases. So if you set the openEVSE at the minimum 6A you will actually get about 2.9kW charging. So depending on the relay settings, using both DC1 and DC2 you can actually have 1.4, 2.8 or 4.2kW at a 6A setting.

Car doesn’t like the SSR- probably because of the leakage current so may have to put a load resistor in or use contactors. It works ok if charging is turned on initially with the SSR off. Then if you turn the SSR on it’s ok, but it then doesn’t like it being turned off.

I have found a way to get the GUI to show the correct current- it’s a bit of a work round as my coding skills aren’t good enough, but will do for now.

---

<div class="post-metadata">

**Author:** ![alandpearson](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@alandpearson](https://community.openenergymonitor.org/u/alandpearson)\
**Post date:** [22 July 2026 10:54 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/46 "2026-07-22T10:54:40Z")

</div>

Glad you got it working.

That is where I came a little unstuck - I did not know how to hook the GUI to set/change the relay2Enable flag, and no-one stepped up to help with this, as they possibly think it’s a niche feature (especially as it requires h/w mods)

If you ever figure it out, let me know.

I would definitely use contactors… I _think_ they are much safer due to the higher make/break currents… and failure modes.

I found contactors that are DIN rail mounted and 3 individual ones were able to replace the existing single 3-phase one in the emonEVSE case without modification

---

<div class="post-metadata">

**Author:** ![nick1](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@nick1](https://community.openenergymonitor.org/u/nick1)\
**Post date:** [22 July 2026 11:45 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/47 "2026-07-22T11:45:00Z")

</div>

Yes it’s working well.

I’ve used 3 contactors. A 4 pole that everything goes through that is controlled by the AC relay output. I then have 2 of that outputs phases go through the other 2 contactors one controlled by DC relay1 and the other by DC relay2. An SSR with a leak resistor didn’t work.

I control the switching of those by sending commands through MQTT

e.g. openevse/209/rapi/in/$SR 2 0 (relay 2 off)

openevse/209/rapi/in/$SR 1 1 (relay 1 on)

openEVSE are doing a lot of work on their firmware and have a really nice new GUI. They have introduced some relay controls but it isn’t controlled by the GUI other than sending RAPI comands under the developer tools tab. It also just applies them at boot!

> **[Tinbum1 - Repositories](https://github.com/Tinbum1?tab=repositories)**
>
> Tinbum1 has 4 repositories available. Follow their code on GitHub.

---

<div class="post-metadata">

**Author:** ![alandpearson](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@alandpearson](https://community.openenergymonitor.org/u/alandpearson)\
**Post date:** [22 July 2026 13:16 UTC](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587/48 "2026-07-22T13:16:06Z")

</div>

Interesting .. thanks.. I hope it matures to the point where it is more usable. I’m scared to update the firmware on mine, as it ‘just works’ for me now, especially the solar divert and modulation which took a while to get matured.

I like the MQTT approach, that is very smart workaround, and ultimately more useful for dynamic changes.

[Previous page](https://community.openenergymonitor.org/t/openevse-correct-power-calculation-for-both-single-and-3-phase/22587.md?page=2)
