Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Fronius 3 phase inverter and Smart Meter 63A-3 #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sudoc
Copy link

@sudoc sudoc commented Jun 23, 2021

Support for Fronius 3 phase inverter and Fronius 3 phase Smart Meter
Proposed changes are tested on Fronius Symo *.0-3 M inverter (highest possible firmware) with Smart Meter 63A-3, but there is also possibility to use only one of them (for example only inverter without Smart Meter).

Fronius API does not gives all information divided to 3 phases, so such data is attached to first phase (anyway, sum counts correctly).

Copy link
Member

@klew klew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add in .h files short description in comments which devices are supported (or tested)

setCurrent(2, currentCurrent[2]);
setVoltage(2, currentVoltage[2]);
setPowerActive(2, currentCurrent[2] * currentVoltage[2]);
//setPowerActive(0, currentPower);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines +94 to +101
case IAC: {
float curCurrent = atof(varValue);
Serial.print(F("Current: "));
Serial.println(curCurrent);
//currentCurrent[0] = curCurrent * 1000;

break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines +110 to +116
case UAC: {
float curVoltage = atof(varValue);
Serial.print(F("Voltage: "));
Serial.println(curVoltage);
//currentVoltage[0] = curVoltage * 100;

break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Comment on lines +248 to +249
strcpy(buf, "GET /solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=");
strcat(buf, idBuf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can move it above "if" and remove it from second if section

strcpy(buf, "GET /solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=");
strcat(buf, idBuf);
strcat(buf, "&DataCollection=3PInverterData HTTP/1.1");
pvClient.println(buf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be moved below both "ifs"

Comment on lines +86 to +93
case PAC: {
float curPower = atof(varValue);
Serial.print(F("Current power: "));
Serial.println(curPower);
currentPower = curPower * 100000;

break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

port(port),
buf(),
totalGeneratedEnergy(0),
currentPower(0),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

int port;
char buf[80];
unsigned _supla_int64_t totalGeneratedEnergy;
_supla_int_t currentPower;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

buf(),
totalGeneratedEnergy(0),
currentPower(0),
currentActivePower{},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

char buf[80];
unsigned _supla_int64_t totalGeneratedEnergy;
_supla_int_t currentPower;
_supla_int_t currentActivePower[3];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@klew
Copy link
Member

klew commented Aug 28, 2021

Please comment if you plan to address above comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants