Seite 1 von 1

1.9.295: PV WR2 Kostal Piko MP no Value exception - github?

Verfasst: Mo Aug 21, 2023 7:33 pm
von MichaelT
Ein neu hinzugefügter Kostal Piko MP 4.6_2 plus liefert als WR2 folgende Werte bei Sonneneinstrahlung:

<root>
<Device Name="PIKO 4.6-2 MP plus" Type="Inverter" Platform="Net16" HmiPlatform="HMI17" NominalPower="4600" UserPowerLimit="nan" CountryPowerLimit="nan" Serial="767689HL0088########" OEMSerial="1035####" BusAddress="1" NetBiosName="INV0088########" WebPortal="PIKO Solar Portal" ManufacturerURL="kostal-solar-electric.com" IpAddress="192.168.178.40" DateTime="2023-08-19T11:55:21" MilliSeconds="493">
<Measurements>
<Measurement Value="232.3" Unit="V" Type="AC_Voltage"/>
<Measurement Value="8.218" Unit="A" Type="AC_Current"/>
<Measurement Value="1909.2" Unit="W" Type="AC_Power"/>
<Measurement Value="1907.6" Unit="W" Type="AC_Power_fast"/>
<Measurement Value="50.019" Unit="Hz" Type="AC_Frequency"/>
<Measurement Value="313.2" Unit="V" Type="DC_Voltage1"/>
<Measurement Value="326.9" Unit="V" Type="DC_Voltage2"/>
<Measurement Value="3.128" Unit="A" Type="DC_Current1"/>
<Measurement Value="3.106" Unit="A" Type="DC_Current2"/>
<Measurement Value="355.6" Unit="V" Type="LINK_Voltage"/>
<Measurement Unit="W" Type="GridPower"/>
<Measurement Unit="W" Type="GridConsumedPower"/>
<Measurement Unit="W" Type="GridInjectedPower"/>
<Measurement Unit="W" Type="OwnConsumedPower"/>
<Measurement Value="100.0" Unit="%" Type="Derating"/>
</Measurements>
</Device>
</root>

jedoch ohne Sonne:
<root>
<Device Name="PIKO 4.6-2 MP plus" Type="Inverter" Platform="Net16" HmiPlatform="HMI17" NominalPower="4600" UserPowerLimit="nan" CountryPowerLimit="nan" Serial="767689HL00##########" OEMSerial="1035####" BusAddress="1" NetBiosName="INV0088########" WebPortal="PIKO Solar Portal" ManufacturerURL="kostal-solar-electric.com" IpAddress="192.168.178.40" DateTime="2023-08-21T21:07:31" MilliSeconds="772">
<Measurements>
<Measurement Value="229.2" Unit="V" Type="AC_Voltage"/>
<Measurement Unit="A" Type="AC_Current"/>
<Measurement Unit="W" Type="AC_Power"/>
<Measurement Unit="W" Type="AC_Power_fast"/>

<Measurement Value="49.978" Unit="Hz" Type="AC_Frequency"/>
<Measurement Value="19.6" Unit="V" Type="DC_Voltage1"/>
<Measurement Value="21.6" Unit="V" Type="DC_Voltage2"/>
<Measurement Unit="A" Type="DC_Current1"/>
<Measurement Unit="A" Type="DC_Current2"/>
<Measurement Value="16.2" Unit="V" Type="LINK_Voltage"/>
<Measurement Unit="W" Type="GridPower"/>
<Measurement Unit="W" Type="GridConsumedPower"/>
<Measurement Unit="W" Type="GridInjectedPower"/>
<Measurement Unit="W" Type="OwnConsumedPower"/>
<Measurement Value="100.0" Unit="%" Type="Derating"/>
</Measurements>
</Device>
</root>

d.h. ohne Value beim Measurement Type=AC_Power
Das führt bei Abfrage im Debuglog zu:

Code: Alles auswählen

2023-08-21 21:10:03: PID: 16741: RET: 0 (LV2) at 19 main modules/wr2_kostalsteca/main.sh
TypeError: float() argument must be a string or a number, not 'NoneType'
power_kostal_piko_MP = float(ET.fromstring(measurements).find(".//Measurement[@Type='AC_Power']").get("Value")) * -1
File "/var/www/html/openWB/modules/wr2_kostalsteca/kostal_steca.py", line 31, in update
parser.set_defaults(RUN=lambda args: function(*[getattr(args, argument_name) for argument_name in arg_spec.args]))
File "/var/www/html/openWB/packages/helpermodules/cli/_run_using_positional_cli_args.py", line 19, in <lambda>
args.RUN(args)
File "/var/www/html/openWB/packages/helpermodules/cli/_run_using_positional_cli_args.py", line 34, in run_using_positional_cli_args
run_using_positional_cli_args(update, argv)
File "/var/www/html/openWB/modules/wr2_kostalsteca/kostal_steca.py", line 74, in main
importlib.import_module(parsed[0]).main(parsed[1:])
File "/var/www/html/openWB/packages/legacy_run_server.py", line 109, in handle_message
self.__callback(read_all_bytes(connection))
File "/var/www/html/openWB/packages/legacy_run_server.py", line 87, in handle_connection
yield
File "/var/www/html/openWB/packages/legacy_run_server.py", line 48, in redirect_stdout_stderr_exceptions_to_log
Traceback (most recent call last):
2023-08-21 21:10:03: PID: 2772: legacy run server: Unhandled exception
2023-08-21 21:10:03: PID: 2772: KostalSteca WR: measurements: <?xml version='1.0' encoding='UTF-8'?><root><Device Name='PIKO 4.6-2 MP plus' Type='Inverter' Platform='Net16' HmiPlatform='HMI17' NominalPower='4600' UserPowerLimit='nan' CountryPowerLimit='nan' Serial='767689HL00##########' OEMSerial='1035####' BusAddress='1' NetBiosName='INV008#########' WebPortal='PIKO Solar Portal' ManufacturerURL='kostal-solar-electric.com' IpAddress='192.168.178.40' DateTime='2023-08-21T21:09:15' MilliSeconds='955'><Measurements><Measurement Value='229.8' Unit='V' Type='AC_Voltage'/><Measurement Unit='A' Type='AC_Current'/><Measurement Unit='W' Type='AC_Power'/><Measurement Unit='W' Type='AC_Power_fast'/><Measurement Value='49.975' Unit='Hz' Type='AC_Frequency'/><Measurement Value='17.3' Unit='V' Type='DC_Voltage1'/><Measurement Value='19.2' Unit='V' Type='DC_Voltage2'/><Measurement Unit='A' Type='DC_Current1'/><Measurement Unit='A' Type='DC_Current2'/><Measurement Value='13.8' Unit='V' Type='LINK_Voltage'/><Measurement Unit='W' Type='GridPower'/><Measurement Unit='W' Type='GridConsumedPower'/><Measurement Unit='W' Type='GridInjectedPower'/><Measurement Unit='W' Type='OwnConsumedPower'/><Measurement Value='100.0' Unit='%' Type='Derating'/></Measurements></Device></root>
2023-08-21 21:10:03: PID: 2772: requests.packages.urllib3.connectionpool: http://192.168.178.40:80 "GET /measurements.xml HTTP/1.1" 200 None
2023-08-21 21:10:03: PID: 2772: requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.178.40:80
2023-08-21 21:10:03: PID: 2772: KostalSteca WR: PV Kostal Steca Variant: 0
2023-08-21 21:10:03: PID: 2772: KostalSteca WR: PV Kostal Steca IP: 192.168.178.40
2023-08-21 21:10:03: PID: 2772: legacy run server: Received command ["wr2_kostalsteca.kostal_steca","192.168.178.40","0"]
2023-08-21 21:10:03: PID: 16741: PV IP: 192.168.178.40 (LV2) at 14 main modules/wr2_kostalsteca/main.sh
Ich wollte im github nachschauen, ob das Modul bis stable 1.9.303 updates erhalten hat, um mit diesem Format umzugehen.
WIe komme ich zum korrekten Branch / Tag für 1.9.295 ?

Re: 1.9.295: PV WR2 Kostal Piko MP no Value exception - github?

Verfasst: Do Aug 24, 2023 10:27 am
von LenaK
Das Problem ist in der Nightly behoben. Bitte vor dem Update ein Backup erstellen.
Danke für die Beispieldaten!

Re: 1.9.295: PV WR2 Kostal Piko MP no Value exception - github?

Verfasst: So Aug 27, 2023 8:54 pm
von MichaelT
Danke für die Behebung!

pull request und commit konnte ich in github sehen.
Gibt es eine Möglichkeit, ein update "nightly 1.9.304.0" z.B. anhand eines tags im github ausfindig zu machen?

Re: 1.9.295: PV WR2 Kostal Piko MP no Value exception - github?

Verfasst: Mo Aug 28, 2023 5:44 am
von LenaK
Tags gibt es ab software2.