-
Notifications
You must be signed in to change notification settings - Fork 52
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
case IAC: { | ||
float curCurrent = atof(varValue); | ||
Serial.print(F("Current: ")); | ||
Serial.println(curCurrent); | ||
//currentCurrent[0] = curCurrent * 1000; | ||
|
||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
case UAC: { | ||
float curVoltage = atof(varValue); | ||
Serial.print(F("Voltage: ")); | ||
Serial.println(curVoltage); | ||
//currentVoltage[0] = curVoltage * 100; | ||
|
||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
strcpy(buf, "GET /solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID="); | ||
strcat(buf, idBuf); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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"
case PAC: { | ||
float curPower = atof(varValue); | ||
Serial.print(F("Current power: ")); | ||
Serial.println(curPower); | ||
currentPower = curPower * 100000; | ||
|
||
break; | ||
} |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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{}, |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Please comment if you plan to address above comments. |
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).