schenlap / venus_kostal_pico

plugin for victron venusos for kostal pico
GNU General Public License v3.0
9 stars 3 forks source link

For inverter v1: todays PV kWh only in integer values? #9

Open tuxedo0801 opened 1 year ago

tuxedo0801 commented 1 year ago

VRM portal shows generated PV kWh only in integer values, means: no decimal value. While inverter Webinterface shows f.i. 1,4kWh generated, VRM only shows 1kWh.

I'm not a python crack, and not a VRM/Venus OS crack. Will try to modify this by myself. But would be gerat if someone can confirm this issue.

best regards, Alex

[Findings so far]

tuxedo0801 commented 1 year ago

Some more findings/guesswork:

I assume, that VRM is calciulating the generated kWh for PV based on the kWh counter. The piko v1 has these values on the webinterface:

image

Gesamtenergie = total energy generated so far Tagesenergie = energy generated today so far

The script uses the first value, which is an integer value. VRM seems to compare the last hour kWh to "now" and shows the delta as the energy created in this hour.

As the number the script uses is integer and not a float, VRM will only show changes if the counter has at least 1kWh increment. With the todays bad weather, this is no really given... It increments only by 0.5kWh or so per hour.

My current running test: I changed the implementation on this line: https://github.com/schenlap/venus_kostal_pico/blob/master/kostal.py#L230

to this:

            if (linenumber == 65):
                data['EFAT'] = float((re.findall('[0-9]+[.][0-9]+', line))[0]);
                energy = data['EFAT'];              

Now I will see if the values regarding kWh generated by PV increments in 0.1kWh steps instead of 1kWh steps.

The downside: The PV meter in the remote console now shows the todays energy and no longer the total energy. No idea if this works (have to wait to get some more data/kWh) of this has some more negative side effects. Will report back soon...

[update] Changed this https://github.com/schenlap/venus_kostal_pico/blob/master/kostal.py#L147 as well. Added a ", 2" parameter, to let the kostal inverter class know that the value has to be rounded to 2 decimal places. Wihtout, it's alwas 0 decimal places.

Will report back what happens.

tuxedo0801 commented 1 year ago

Now I can see PV generated kWh invcreasing in 0,01kWh steps instead of 1kWh steps. Looks great so far. Will test until next day to be sure it works as expected. Then I can file a PR for this change.

schenlap commented 1 year ago

Please open an PR for this. Thank you.