Seite 1 von 2

Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 9:38 am
von andlem
Hallo zusammen,
ich habe eine brandneue openWB mit SW Version: 1.9.262. Außerdem einen Kostal Piko 3.6 MP. Das ist ein alter einphasiger Wechselrichter, der baugleich mit StecaGrid 3600 zu sein scheint. Ich kann den WR meines Wissens ausschließlich über html abfragen, Adresse ist bei mir: http://inv006202240015/page.measurements.html. Unter der Adresse gibt der Webserver des WR u. a. eine Tabelle mit den aktuellen Messwerten aus. Ich habe schon alle in Frage kommenden Module der openWB durchprobiert: Kostal Piko, Kostal Piko alt, Kostal Plenticore, Kostal Piko MP und Steca Grid Coolcept. Mit keinem bekomme ich die Werte in die openWB.
Mit Python kam ich selbst so am einfachsten an die Werte: Abfrage http://inv006202240015/gen.measurements.table.js. Der zurückgelieferte Java-Script-Code:
document.write("<table class='invisible'><tr class='invisible'><th class='invisible'><h3>Inverter</h3></th><th class='invisible'><h3></h3></th></tr><tr class='invisible'><td class='invisible' valign='top' align='center'><table><tr><th>Name</th><th>Value</th><th>Unit</th></tr><tr><td>P DC</td><td align='right'>2891.79</td><td>W</td></tr><tr><td>U DC</td><td align='right'> 454.97</td><td>V</td></tr><tr><td>I DC</td><td align='right'> 6.35</td><td>A</td></tr><tr><td>U AC</td><td align='right'> 237.17</td><td>V</td></tr><tr><td>I AC</td><td align='right'> 12.90</td><td>A</td></tr><tr><td>F AC</td><td align='right'> 50.00</td><td>Hz</td></tr><tr><td>P AC</td><td align='right'>2872.44</td><td>W</td></tr></table></td><td class='invisible' valign='top' align='center'></table></td></tr></table>");
Hier stehen die Messwerte drin.
Hat irgendjemand diesen WR schon mit der openWB ausgelesen bekommen? Wie?
Mit freundlichen Grüßen

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 9:50 am
von derNeueDet
Unter WR2 gibt es einen Kostalsteca evtl. Mal mit dem probieren.

VG
Det

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 9:53 am
von derNeueDet
Versuche mal dem WR mit

http://deineip/measurements.xml
http://deineip/yields.xml

Daten zu entlocken. Wenn das geht, könnte es auch mit dem Modul gehen.

VG
Det

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 10:55 am
von andlem
In der Tat bekomme ich von http://192.168.0.119/measurements.xml

Code: Alles auswählen

<root>
<Device Name="PIKO 3.6 MP" Type="Inverter" Serial="755810BL006202240015" BusAddress="1" NetBiosName="INV006202240015" IpAddress="192.168.0.119" DateTime="2022-06-29T12:03:58">
<Measurements>
<Measurement Value="232.840" Unit="V" Type="AC_Voltage"/>
<Measurement Value="4.066" Unit="A" Type="AC_Current"/>
<Measurement Value="935.550" Unit="W" Type="AC_Power"/>
<Measurement Value="50.002" Unit="Hz" Type="AC_Frequency"/>
<Measurement Value="403.770" Unit="V" Type="DC_Voltage"/>
<Measurement Value="2.308" Unit="A" Type="DC_Current"/>
<Measurement Value="933.390" Unit="W" Type="DC_Power"/>
<Measurement Value="42.000" Unit="°C" Type="Temp"/>
<Measurement Value="nan" Unit="W" Type="Consumption PV"/>
<Measurement Value="nan" Unit="W" Type="Consumption Grid"/>
<Measurement Value="nan" Unit="W" Type="GridPower"/>
<Measurement Value="100.0" Unit="%" Type="Dearting"/>
</Measurements>
</Device>
</root>
Aber im Debug Log beklagt sich die openWB:

Code: Alles auswählen

AttributeError: 'NoneType' object has no attribute 'get'
power_kostal_piko_MP = ET.fromstring(response).find("Measurement[@Type='AC_Power']").get("Value")
File "/var/www/html/openWB/modules/wr2_kostalsteca/kostal_steca.py", line 27, 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 63, 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):
2022-06-29 12:52:32: PID: 2511: legacy run server: Unhandled exception
Was tun?

Mit freundlichen Grüßen

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 11:13 am
von derNeueDet
Zeig mal einen Screenshot der Konfiguration, die du gemacht hast

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 11:35 am
von derNeueDet
Und stelle bitte mal den Debug Level auf 2 und kopieren einen ganzen Regelzyklus hier rein.

VG
Det

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 12:10 pm
von andlem
Die Konfiguration:
Bildschirmfoto 2022-06-29 um 14.08.53.png
Das ist das erweiterte Debug-Log:

Code: Alles auswählen

2022-06-29 14:05:16: PID: 15546: **** Regulation loop needs 5 seconds (LV2) at 55 cleanup /var/www/html/openWB/regel.sh
2022-06-29 14:05:15: PID: 15546: uberschuss 799 wattbezug -799 ladestatus 1 llsoll 0 pvwatt 0 mindestuberschussphasen 1500 wattkombiniert 799 schaltschwelle 230 (LV2) at 575 main /var/www/html/openWB/regel.sh
2022-06-29 14:05:15: PID: 15546: anzahlphasen 1 (LV1) at 574 main /var/www/html/openWB/regel.sh
2022-06-29 14:05:15: PID: 15546: Timing Umschaltung: 780 / 180 (LV1) at 15 u1p3pswitch u1p3p.sh
2022-06-29 14:05:15: PID: 15546: automatische Umschaltung aktiv (LV1) at 14 u1p3pswitch u1p3p.sh
2022-06-29 14:05:14: PID: 15546: Zeit zum abfragen aller Werte 2 Sekunden (LV1) at 176 main /var/www/html/openWB/regel.sh
2022-06-29 14:05:14: PID: 15546: chargestatlp1 0	chargestatlp2 0	chargestatlp3 0 (LV1) at 1302 loadvars loadvars.sh
2022-06-29 14:05:14: PID: 15546: plugstatlp1 0	plugstatlp2 0	plugstatlp3 0 (LV1) at 1301 loadvars loadvars.sh
2022-06-29 14:05:14: PID: 15546: lp1enabled 0	lp2enabled 1	lp3enabled 1 (LV1) at 1300 loadvars loadvars.sh
2022-06-29 14:05:14: PID: 15546: EVU 1:V/0A 2: V/0A 3: V/0A (LV1) at 1299 loadvars loadvars.sh
2022-06-29 14:05:13: PID: 15546: lla3 0	llv3 232.7	llas13  llas23  soclp1 0 soclp2 (LV1) at 1298 loadvars loadvars.sh
2022-06-29 14:05:13: PID: 15546: lla2 0	llv2 229.9	llas12  llas22  sofortll 32 hausverbrauch 0 wattbezug -799 uberschuss 799 (LV1) at 1297 loadvars loadvars.sh
2022-06-29 14:05:13: PID: 15546: lla1 0	llv1 232.4	llas11  llas21  mindestuberschuss 1500 abschaltuberschuss 5 lademodus 2 (LV1) at 1296 loadvars loadvars.sh
2022-06-29 14:05:13: PID: 15546: pv1watt 0 pv2watt 0 pvwatt 0 ladeleistung 0 llalt 0 nachtladen 0 nachtladen 0 minimalA 6 maximalA 32 (LV1) at 1295 loadvars loadvars.sh
AttributeError: 'NoneType' object has no attribute 'get'
power_kostal_piko_MP = ET.fromstring(response).find("Measurement[@Type='AC_Power']").get("Value")
2022-06-29 14:05:12: PID: 15690: RET: 0 (LV2) at 24 main modules/wr2_kostalsteca/main.sh
File "/var/www/html/openWB/modules/wr2_kostalsteca/kostal_steca.py", line 27, 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 63, 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):
2022-06-29 14:05:12: PID: 2511: legacy run server: Unhandled exception
2022-06-29 14:05:12: PID: 2511: KostalSteca WR: MEASURE: <?xml version='1.0' encoding='UTF-8'?><root><Device Name='PIKO 3.6 MP' Type='Inverter' Serial='755810BL006202240015' BusAddress='1' NetBiosName='INV006202240015' IpAddress='192.168.0.119' DateTime='2022-06-29T14:05:08'><Measurements><Measurement Value='232.707' Unit='V' Type='AC_Voltage'/><Measurement Value='5.041' Unit='A' Type='AC_Current'/><Measurement Value='1168.510' Unit='W' Type='AC_Power'/><Measurement Value='49.993' Unit='Hz' Type='AC_Frequency'/><Measurement Value='411.207' Unit='V' Type='DC_Voltage'/><Measurement Value='2.820' Unit='A' Type='DC_Current'/><Measurement Value='1161.940' Unit='W' Type='DC_Power'/><Measurement Value='43.000' Unit='&#176;C' Type='Temp'/><Measurement Value='nan' Unit='W' Type='Consumption PV'/><Measurement Value='nan' Unit='W' Type='Consumption Grid'/><Measurement Value='nan' Unit='W' Type='GridPower'/><Measurement Value='100.0' Unit='%' Type='Dearting'/></Measurements></Device></root>
2022-06-29 14:05:12: PID: 2511: requests.packages.urllib3.connectionpool: http://192.168.0.119:80 "GET /measurements.xml HTTP/1.1" 200 None
2022-06-29 14:05:12: PID: 2511: requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.119:80
2022-06-29 14:05:12: PID: 2511: KostalSteca WR: PV Kostal Steca IP:192.168.0.119
2022-06-29 14:05:12: PID: 2511: legacy run server: Received command ["wr2_kostalsteca.kostal_steca","192.168.0.119"]
2022-06-29 14:05:12: PID: 15690: PV IP: 192.168.0.119 (LV2) at 19 main modules/wr2_kostalsteca/main.sh
2022-06-29 14:05:11: PID: 15546: **** Regulation loop start **** (LV1) at 70 main /var/www/html/openWB/regel.sh

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 12:17 pm
von derNeueDet
Mach mal einen Update auf die aktuelle Stable. Ich sehe gerade im Github, dass das Modul in der Zwischenzeit aktualisiert wurde.

VG
Det

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 12:32 pm
von andlem
Update gemacht.

Jetzt sieht es im Debug-Log so aus:

Code: Alles auswählen

2022-06-29 14:26:26: PID: 1098: **** Regulation loop needs 5 seconds (LV2) at 55 cleanup /var/www/html/openWB/regel.sh
2022-06-29 14:26:26: PID: 1098: Überschuss 1001; mindestens 1500 (LV1) at 104 nurpvlademodus nurpv.sh
2022-06-29 14:26:25: PID: 1098: uberschuss 1001 wattbezug -1001 ladestatus 0 llsoll 0 pvwatt 0 mindestuberschussphasen 1500 wattkombiniert 1001 schaltschwelle 230 (LV2) at 576 main /var/www/html/openWB/regel.sh
2022-06-29 14:26:25: PID: 1098: anzahlphasen 1 (LV1) at 575 main /var/www/html/openWB/regel.sh
2022-06-29 14:26:25: PID: 1098: Timing Umschaltung: 780 / 180 (LV1) at 15 u1p3pswitch u1p3p.sh
2022-06-29 14:26:25: PID: 1098: automatische Umschaltung aktiv (LV1) at 14 u1p3pswitch u1p3p.sh
2022-06-29 14:26:25: PID: 1098: Zeit zum abfragen aller Werte 3 Sekunden (LV1) at 176 main /var/www/html/openWB/regel.sh
2022-06-29 14:26:24: PID: 1098: chargestatlp1 0	chargestatlp2 0	chargestatlp3 0 (LV1) at 1305 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: plugstatlp1 0	plugstatlp2 0	plugstatlp3 0 (LV1) at 1304 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: lp1enabled 0	lp2enabled 1	lp3enabled 1 (LV1) at 1303 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: EVU 1:V/0A 2: V/0A 3: V/0A (LV1) at 1302 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: lla3 0	llv3 233.5	llas13  llas23  soclp1 0 soclp2 (LV1) at 1301 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: lla2 0	llv2 230.9	llas12  llas22  sofortll 32 hausverbrauch 0 wattbezug -1001 uberschuss 1001 (LV1) at 1300 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: lla1 0	llv1 233.8	llas11  llas21  mindestuberschuss 1500 abschaltuberschuss 5 lademodus 2 (LV1) at 1299 loadvars loadvars.sh
2022-06-29 14:26:24: PID: 1098: pv1watt 0 pv2watt 0 pvwatt 0 ladeleistung 0 llalt 0 nachtladen 0 nachtladen 0 minimalA 6 maximalA 32 (LV1) at 1298 loadvars loadvars.sh
AttributeError: 'NoneType' object has no attribute 'get'
pvkwh_kostal_piko_MP = int(float(ET.fromstring(yields).find(".//Yield[@Type='Produced']/YieldValue").get("Value")))
File "/var/www/html/openWB/modules/wr2_kostalsteca/kostal_steca.py", line 39, 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 56, 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):
2022-06-29 14:26:22: PID: 2594: legacy run server: Unhandled exception
2022-06-29 14:26:22: PID: 2594: KostalSteca WR: YIELD: <?xml version='1.0' encoding='UTF-8'?><root><Device Name='PIKO 3.6 MP' Type='Inverter' Serial='755810BL006202240015' BusAddress='1' NetBiosName='INV006202240015' IpAddress='192.168.0.119' DateTime='2022-06-29T14:26:18'><Yields></Yields></Device></root>
2022-06-29 14:26:22: PID: 2594: requests.packages.urllib3.connectionpool: http://192.168.0.119:80 "GET /yields.xml HTTP/1.1" 200 None
2022-06-29 14:26:22: PID: 2594: requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.119:80
2022-06-29 14:26:22: PID: 2594: KostalSteca WR: PVWatt: -1240
2022-06-29 14:26:22: PID: 1243: RET: 0 (LV2) at 19 main modules/wr2_kostalsteca/main.sh
2022-06-29 14:26:22: PID: 2594: KostalSteca WR: measurements: <?xml version='1.0' encoding='UTF-8'?><root><Device Name='PIKO 3.6 MP' Type='Inverter' Serial='755810BL006202240015' BusAddress='1' NetBiosName='INV006202240015' IpAddress='192.168.0.119' DateTime='2022-06-29T14:26:18'><Measurements><Measurement Value='234.205' Unit='V' Type='AC_Voltage'/><Measurement Value='5.366' Unit='A' Type='AC_Current'/><Measurement Value='1240.010' Unit='W' Type='AC_Power'/><Measurement Value='49.987' Unit='Hz' Type='AC_Frequency'/><Measurement Value='429.118' Unit='V' Type='DC_Voltage'/><Measurement Value='2.874' Unit='A' Type='DC_Current'/><Measurement Value='1234.230' Unit='W' Type='DC_Power'/><Measurement Value='43.800' Unit='&#176;C' Type='Temp'/><Measurement Value='nan' Unit='W' Type='Consumption PV'/><Measurement Value='nan' Unit='W' Type='Consumption Grid'/><Measurement Value='nan' Unit='W' Type='GridPower'/><Measurement Value='100.0' Unit='%' Type='Dearting'/></Measurements></Device></root>
2022-06-29 14:26:22: PID: 2594: requests.packages.urllib3.connectionpool: http://192.168.0.119:80 "GET /measurements.xml HTTP/1.1" 200 None
2022-06-29 14:26:22: PID: 2594: requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.119:80
2022-06-29 14:26:22: PID: 2594: KostalSteca WR: PV Kostal Steca IP: 192.168.0.119
2022-06-29 14:26:22: PID: 2594: legacy run server: Received command ["wr2_kostalsteca.kostal_steca","192.168.0.119"]
2022-06-29 14:26:22: PID: 1243: PV IP: 192.168.0.119 (LV2) at 14 main modules/wr2_kostalsteca/main.sh
2022-06-29 14:26:21: PID: 1098: **** Regulation loop start **** (LV1) at 70 main /var/www/html/openWB/regel.sh
Die Antwort meines WR auf http://192.168.0.119/yields.xml ist:

Code: Alles auswählen

<root>
<Device Name="PIKO 3.6 MP" Type="Inverter" Serial="755810BL006202240015" BusAddress="1" NetBiosName="INV006202240015" IpAddress="192.168.0.119" DateTime="2022-06-29T14:27:27">
<Yields/>
</Device>
</root>
Mir scheint, das Modul sucht etwas im Yields-XML, das es bei meinem WR nicht gibt.

Re: Welches Modul for Kostal Piko 3.6 MP?

Verfasst: Mi Jun 29, 2022 2:02 pm
von andlem
Ich habe https://github.com/snaptec/openWB/issues/2268 erstellt. Kann ich sonst noch etwas tun, um das Problem zu lösen?