Did a quick fix;
//emontx.P1 = EmonLibCM_getRealPower(0);
emontx.P1 = EmonLibCM_getApparentPower(0);
emontx.E1 = EmonLibCM_getWattHour(0);
//emontx.P2 = EmonLibCM_getRealPower(1);
emontx.P2 = EmonLibCM_getApparentPower(1);
emontx.E2 = EmonLibCM_getWattHour(1);
and to emonlibCM:
Irms_CT[i] *= currentCal[i];
if (!acPresent) Vrms = 230;
VA = Irms_CT[i] * Vrms;
Now CT1 shows correctly but at least CT3 is not showing a correct value. Maybe it has something related to a lack of AC trigger pulse ? Need to investigate more or find a library that works without AC or to find a suitable din rail transformer to include AC. The din rail transformer would be the way to go if easily obtainable.
Adding a note: My CT:s are connected to different phases, so therefore I suspect timing being an issue. Anyhow ordered a 8/10/12V din rail transformer so should be able to use 3 phase script instead…
This ‘fix’ will in general produce inaccurate and misleading results and should not be copied. For the reasons, please refer to the 2nd post above.
Chartered Electrical Engineer & Moderator