Feature: use VE.Direct "network total DC power"
1. makes the DPL use the power generated by all connected charge controllers for calculations based on solar passthrough. 2. makes the network total DC power appear as "MPPT Total Power" in the live view at the top. 3. shows the network total DC power in the VE.Direct live data card.
This commit is contained in:
parent
6b8c93d2e6
commit
21cdc69625
@ -140,6 +140,17 @@ int32_t VictronMpptClass::getPowerOutputWatts() const
|
|||||||
|
|
||||||
for (const auto& upController : _controllers) {
|
for (const auto& upController : _controllers) {
|
||||||
if (!upController->isDataValid()) { continue; }
|
if (!upController->isDataValid()) { continue; }
|
||||||
|
|
||||||
|
// if any charge controller is part of a VE.Smart network, and if the
|
||||||
|
// charge controller is connected in a way that allows to send
|
||||||
|
// requests, we should have the "network total DC input power"
|
||||||
|
// available. if so, to estimate the output power, we multiply by
|
||||||
|
// the calculated efficiency of the connected charge controller.
|
||||||
|
auto networkPower = upController->getData().NetworkTotalDcInputPowerMilliWatts;
|
||||||
|
if (networkPower.first > 0) {
|
||||||
|
return static_cast<int32_t>(networkPower.second / 1000.0 * upController->getData().E / 100);
|
||||||
|
}
|
||||||
|
|
||||||
sum += upController->getData().P;
|
sum += upController->getData().P;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,6 +163,15 @@ int32_t VictronMpptClass::getPanelPowerWatts() const
|
|||||||
|
|
||||||
for (const auto& upController : _controllers) {
|
for (const auto& upController : _controllers) {
|
||||||
if (!upController->isDataValid()) { continue; }
|
if (!upController->isDataValid()) { continue; }
|
||||||
|
|
||||||
|
// if any charge controller is part of a VE.Smart network, and if the
|
||||||
|
// charge controller is connected in a way that allows to send
|
||||||
|
// requests, we should have the "network total DC input power" available.
|
||||||
|
auto networkPower = upController->getData().NetworkTotalDcInputPowerMilliWatts;
|
||||||
|
if (networkPower.first > 0) {
|
||||||
|
return static_cast<int32_t>(networkPower.second / 1000.0);
|
||||||
|
}
|
||||||
|
|
||||||
sum += upController->getData().PPV;
|
sum += upController->getData().PPV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -180,6 +180,11 @@ void WebApiWsVedirectLiveClass::populateJson(const JsonObject &root, const VeDir
|
|||||||
output["E"]["d"] = 1;
|
output["E"]["d"] = 1;
|
||||||
|
|
||||||
const JsonObject &input = values.createNestedObject("input");
|
const JsonObject &input = values.createNestedObject("input");
|
||||||
|
if (mpptData.NetworkTotalDcInputPowerMilliWatts.first > 0) {
|
||||||
|
input["NetworkPower"]["v"] = mpptData.NetworkTotalDcInputPowerMilliWatts.second / 1000.0;
|
||||||
|
input["NetworkPower"]["u"] = "W";
|
||||||
|
input["NetworkPower"]["d"] = "0";
|
||||||
|
}
|
||||||
input["PPV"]["v"] = mpptData.PPV;
|
input["PPV"]["v"] = mpptData.PPV;
|
||||||
input["PPV"]["u"] = "W";
|
input["PPV"]["u"] = "W";
|
||||||
input["PPV"]["d"] = 0;
|
input["PPV"]["d"] = 0;
|
||||||
|
|||||||
@ -175,6 +175,7 @@
|
|||||||
},
|
},
|
||||||
"section_input": "Eingang (Solarpanele)",
|
"section_input": "Eingang (Solarpanele)",
|
||||||
"input": {
|
"input": {
|
||||||
|
"NetworkPower": "VE.Smart Netzwerk Gesamtleistung",
|
||||||
"PPV": "Leistung",
|
"PPV": "Leistung",
|
||||||
"VPV": "Spannung",
|
"VPV": "Spannung",
|
||||||
"IPV": "Strom (berechnet)",
|
"IPV": "Strom (berechnet)",
|
||||||
|
|||||||
@ -175,6 +175,7 @@
|
|||||||
},
|
},
|
||||||
"section_input": "Input (Solar Panels)",
|
"section_input": "Input (Solar Panels)",
|
||||||
"input": {
|
"input": {
|
||||||
|
"NetworkPower": "VE.Smart network total power",
|
||||||
"PPV": "Power",
|
"PPV": "Power",
|
||||||
"VPV": "Voltage",
|
"VPV": "Voltage",
|
||||||
"IPV": "Current (calculated)",
|
"IPV": "Current (calculated)",
|
||||||
|
|||||||
@ -175,6 +175,7 @@
|
|||||||
},
|
},
|
||||||
"section_input": "Input (Solar Panels)",
|
"section_input": "Input (Solar Panels)",
|
||||||
"input": {
|
"input": {
|
||||||
|
"NetworkPower": "VE.Smart network total power",
|
||||||
"PPV": "Power",
|
"PPV": "Power",
|
||||||
"VPV": "Voltage",
|
"VPV": "Voltage",
|
||||||
"IPV": "Current (calculated)",
|
"IPV": "Current (calculated)",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user