update aggregator on sodistormax and salimax
This commit is contained in:
parent
c1674f352c
commit
615c1939a2
|
|
@ -142,9 +142,9 @@ public static class Aggregator
|
||||||
{
|
{
|
||||||
batterySoc.Add((double)jsonObject["Battery"]["Soc"]);
|
batterySoc.Add((double)jsonObject["Battery"]["Soc"]);
|
||||||
}
|
}
|
||||||
if (jsonObject["PvOnDc"] != null && jsonObject["PvOnDc"]["DcWh"] != null)
|
if (jsonObject["PvOnDc"] != null && jsonObject["PvOnDc"]["1"]["DcWh"] != null) // todo update to all pv
|
||||||
{
|
{
|
||||||
pvPowerSum.Add((double)jsonObject["PvOnDc"]["DcWh"]);
|
pvPowerSum.Add((double)jsonObject["PvOnDc"]["1"]["DcWh"]);
|
||||||
}
|
}
|
||||||
if (jsonObject["Battery"] != null && jsonObject["Battery"]["Dc"]["Power"] != null)
|
if (jsonObject["Battery"] != null && jsonObject["Battery"]["Dc"]["Power"] != null)
|
||||||
{
|
{
|
||||||
|
|
@ -316,7 +316,7 @@ public static class Aggregator
|
||||||
ChargingBatteryPower = batteryChargePower.Any() ? batteryChargePower.Average() : 0.0,
|
ChargingBatteryPower = batteryChargePower.Any() ? batteryChargePower.Average() : 0.0,
|
||||||
GridExportPower = gridPowerExport.Any() ? gridPowerExport.Sum() : 0.0,
|
GridExportPower = gridPowerExport.Any() ? gridPowerExport.Sum() : 0.0,
|
||||||
GridImportPower = gridPowerImport.Any() ? gridPowerImport.Sum() : 0.0,
|
GridImportPower = gridPowerImport.Any() ? gridPowerImport.Sum() : 0.0,
|
||||||
PvPower = pvPower.Any() ? pvPower.Last() : 0.0,
|
PvPower = pvPower.Any() ? pvPower.Max() : 0.0,
|
||||||
HeatingPower = heatingPowerAvg.Any() ? heatingPowerAvg.Average() : 0.0,
|
HeatingPower = heatingPowerAvg.Any() ? heatingPowerAvg.Average() : 0.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ public static class Aggregator
|
||||||
{
|
{
|
||||||
batterySoc.Add((double)jsonObject["Battery"]["Soc"]);
|
batterySoc.Add((double)jsonObject["Battery"]["Soc"]);
|
||||||
}
|
}
|
||||||
if (jsonObject["PvOnDc"] != null && jsonObject["PvOnDc"]["1"]["DcWh"] != null)
|
if (jsonObject["PvOnDc"] != null && jsonObject["PvOnDc"]["1"]["DcWh"] != null) // todo update to all pv
|
||||||
{
|
{
|
||||||
pvPowerSum.Add((double)jsonObject["PvOnDc"]["1"]["DcWh"]);
|
pvPowerSum.Add((double)jsonObject["PvOnDc"]["1"]["DcWh"]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue