emonTx connecting to arduino IDE using programmer

Actually, it’s probably easier for me that you kept the same thread, but I wish you’d said “Now I want to do it with the RFM” (or something like that).

It’s still the same principle, but slightly more involved. I’m assuming you want both the individual values and the sum of the powers.

At the top, at line 49 for emonhub.conf, you’re going to want this:

    [[[rx]]]
        names = power1, power2, power3, power4, sumPower, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulsecount
        datacodes = h, h, h, h, h, h, h, h, h, h, h, h, L
        scales = 1,1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
        units =W,W,W,W,W,V,C,C,C,C,C,C,p

Line 306, add the extra power:

typedef struct { int power1, power2, power3, power4, sumPower, Vrms, temp[MAXONEWIRE] = {UNUSED_TEMPERATURE,UNUSED_TEMPERATURE,
                  UNUSED_TEMPERATURE,UNUSED_TEMPERATURE,UNUSED_TEMPERATURE,UNUSED_TEMPERATURE};
                  unsigned long pulseCount; } PayloadTx; 

At lines 842-3, where you have

  emontx.power4=(int)(realPower4+0.5);
  emontx.Vrms=(int)(Vrms*100+0.5);

you need to insert (before, after or in between, it doesn’t matter)

  emontx.sumPower=(int)(realPower1+realPower2+realPower3+realPower4+0.5);

(OK, you can leave off realPower4 if you don’t want it in the sum.)

Don’t be too alarmed if the individual powers don’t add to the sum - it’s rounding. The individual powers are rounded on their own, but summed before rounding and the sum is separately rounded.