Input Processing

Hi, Hope you can clarify something for me.

I need to add inputs of three phase supply (Mains Total) to derive the kWh/d and Histogram for complete building. Hoever I also want to process each phase indivually as they feed different parts of the building  - note each phase is used as single electrical supply not for any three phase load.

However in emoncms one input is used for first calculation  to derive Mains Total  and my understanding is that this cannot be used again for individual calaulation of kWh/d and Histogram for this phase.

See image of process of what I would like to do, my understanding is that this will this give a wrong output for Mains_Power (phase 1&2&3) for both kWh/d and Histogram

New functionality, can you please consider adding an option to duplicate inputs before processing.

 

Thanks Peter

P.S. Tried out new emontx multi sketch (four devices) and it worked great, thanks a mil.

 

 

 

PeterN's picture

Re: Input Processing

Duplicate inputs. First thought to duplicate json (duplicate input str.print  ) in nanoderf sketch however I'm using the new nanodrf mulimode and don't know if it is possible. Next thought to duplicate at source on emontx, any suggestions please???? Could it be as simple as adding second power1 value inthe emontx typedef struct e.g.  int power1, power1,  power2, power3, battery;

PeterN's picture

Re: Input Processing

Tested above and by simply adding  code below to emontx  it sends CT1 twice (power1 and power1a ) to emonbase and emoncms. Now I have two inputs in emoncms for CT1 for that node to use in processing which was my original aim.

Emontx sketch changes:

typedef struct { int power1,power1a, power2, power3, battery; } PayloadTX;  

 if (CT1) {
    emontx.power1 = ct1.calcIrms(1480) * 240.0;    //ct.calcIrms(number of wavelengths sample)*AC RMS voltage
    emontx.power1a=ct1.calcIrms(1480) * 240.0;    //ct.calcIrms(number of wavelengths sample)*AC RMS voltage
    Serial.print(emontx.power1);
    Serial.print(" ");  Serial.print(emontx.power1a);    

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.