pixcept / ioBroker.plenticore

ioBroker Adapter for the KOSTAL Plenticore
MIT License
25 stars 16 forks source link

EnergyFlow.Yield #16

Closed NielsWL closed 3 years ago

NielsWL commented 4 years ago

Hey...

The data EnergyFlow.Yield is not the complete yield of the PV-Plant. The energy that is used for charching the battery is missing. Can you add data fields (day, month, year, total) so that all the yield of the plant can be logged?

StrathCole commented 4 years ago

The data EnergyFlow.Yield is not the complete yield of the PV-Plant.

Yes, but that is the way KOSTAL fills the yield field (consistend with KOSTAL and PIKO portal).

The fields for year, day etc. are available, e. g. plenticore.0.scb.statistic.EnergyFlow.YieldDay

NielsWL commented 4 years ago

i know...

but can you add it? I can get the data by a blookly script, but maybe you can add it in the adapter directly.

In the Kostal Portal there ist the total yield, and the energy for the battery charge is included.

var PV_Ertrag1, PV_Ertrag2;
schedule("* * * * * *", function () {
  PV_Ertrag1 = getState("plenticore.0.scb.statistic.EnergyFlow.YieldDay").val;
  PV_Ertrag2 = (typeof PV_Ertrag2 == 'number' ? PV_Ertrag2 : 0) + getState("plenticore.0.devices.local.battery.Charge_P").val / 3600;
  setState("plenticore.0.scb.statistic.EnergyFlow.PVErtrag"/*PVErtrag*/, (PV_Ertrag1 + PV_Ertrag2), true);
  console.log((PV_Ertrag1 + PV_Ertrag2));
});
StrathCole commented 4 years ago

The problem is that this value is not available from the inverter. I would have to calculate the value myself and it would be more inaccurate the higher the set polling interval in the instance config is.

NielsWL commented 4 years ago

ok. then i calculate it with the blockly script. thanks.