Help EmonPI Questions

Would an upgrade have reset my emonhub.conf

Why when I calibrate here:

Do I do 110v VS 120v?

Maybe @Robert.Wall can recall where the full explanation is. The short version, don’t pay any attention to the number, it’s just a poorly chosen string to set a flag for “USA” mode, which is 120 IF you have no AC adapter in use, with the AC adapter in play a default USA calibration factor is used that is right for a 120v adapter.

My private crib file says: https://community.openenergymonitor.org/t/emonhub-usa/7964/2?u=pb66

I do not have access to that link?:

So the reason I ask, is I have an emonPI that I have noticed as of late was recording more electric use then it should, at least I think.

I have a US split phase system, and I thought I already set this variable. When I change it, all my readings seem to sync up.

I have an amp meter/probe, and when I do the watt to amp conversion, it all seems to be right.

Can someone explain to me what this changes in the formula, so if I do go back to some old kwh readings, I can convert?

Sorry, I didn’t notice the “PM” flag at the top. Here it is:

The setting in emonhub is nothing more than an option of 2 strings “240V” and “110V”, they have no numerical value, the strings could have been “UK” and “US” or the setting could have been usamode “True” or “False”.

github.com

openenergymonitor/emonhub/blob/emon-pi/src/interfacers/EmonHubJeeInterfacer.py#L180-L183

    setting = self._jee_settings[key]# convert bools to intsif str.capitalize(str(setting)) in ['True', 'False']:    setting = int(setting == "True")

As you can see above, those 2 strings simply get converted to 2 other strings “1p” and “2p”.

Those commands get sent via serial just like the baseid, group, frequency and quietmode as documented in the serial output (that never gets seen by the user).

github.com

openenergymonitor/emonpi/blob/master/firmware/src/src.ino#L173

long unsigned int start_press=0;                                 // Record time emonPi shutdown push switch is pressed
bool quiet_mode = true;
const char helpText1[ ] PROGMEM =                                 // Available Serial Commands"\n"
"Available commands:\n"
"  <nn> i     - set node IDs (standard node ids are 1..30)\n"
"  <n> b      - set MHz band (4 = 433, 8 = 868, 9 = 915)\n"
"  <nnn> g    - set network group (RFM12 only allows 212, 0 = any)\n"
"  <n> c      - set collect mode (advanced, normally 0)\n"
"  ...,<nn> a - send data packet to node <nn>, request ack\n"
"  ...,<nn> s - send data packet to node <nn>, no ack\n"
"  ...,<n> p  - Set AC Adapter Vcal 1p = UK, 2p = USA\n"
"  v          - Show firmware version\n"
"  <n> q      - set quiet mode (1 = don't report bad packets)\n";
//-------------------------------------------------------------------------------------------------------------------------------------------
// SETUP ********************************************************************************************
//-------------------------------------------------------------------------------------------------------------------------------------------
void setup()

Once in the emonpi firmware those command strings set the “USA” boolean.

github.com

openenergymonitor/emonpi/blob/master/firmware/src/rf.ino#L110-L115

case 'p': // set Vcc Cal 1=UK/EU 2=USA 
if (value)
{    
     if (value==1) USA=false;    
     if (value==2) USA=true;  
}  
break;

that boolean get used both in the setup()

github.com

openenergymonitor/emonpi/blob/master/firmware/src/src.ino#L186-L195

delay(100);
if (USA)
{  
    Vcal = Vcal_USA;                                                       // Assume USA AC/AC adatper is being used, set calibration accordingly  
    Vrms = Vrms_USA;
}
else 
{  
    Vcal = Vcal_EU;

and again the main() loop

github.com

openenergymonitor/emonpi/blob/master/firmware/src/src.ino#L234-L243

now = millis();
if (USA)
{  
    Vcal = Vcal_USA;                                                       // Assume USA AC/AC adatper is being used, set calibration accordingly  
    Vrms = Vrms_USA;
}
else
{  
    Vcal = Vcal_EU;

to simply select one of 2 pairs of pre-determined Vcal and Vrms values

github.com

openenergymonitor/emonpi/blob/master/firmware/src/src.ino#L81-L82

const unsigned long BAUD_RATE=    38400;

github.com

openenergymonitor/emonpi/blob/master/firmware/src/src.ino#L91-L92

const float Ical1=                90.9;                             // (2000 turns / 22 Ohm burden) = 90.9
const float Ical2=                90.9;

If the intention was to make this as long, complex and obscure as humanly possible it’s a fantastic piece of code, otherwise it’s not so hot.

In short, when you set “110V” in emonhub, (I think) you will get either a Vrms of 120 or a Vcal of 130 depending on whether the AC adapter is present, what you don’t get is 110V, unless the FW is pre-December 2017 (v2.8.4) when Vrms_USA got changed from 110 to 120.

github.com/openenergymonitor/emonpi

glynhudson

V2.8.4: correct USA voltage 120V

by glynhudson on 03:57PM - 21 Dec 17 UTC

changed 1 files with 2 additions and 2 deletions .

Thanks!