Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. GoodWe Wechselrichter und ioBroker

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    GoodWe Wechselrichter und ioBroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Chr.Hu @Max 0 last edited by

      Nun gut, ich habe keinen Raspi sondern Synology. Egal, python3 hast du auch am Laufen wenn pip3 gelaufen ist.

      Dann schau mal dass du die pygoodwe-main/alinone.py zum laufen kriegst. In den Python-Dateien musst du vorher mit nem Editor /v1/ gegen /v2/ austauschen, dann bekommst du die letzten Werte testweise auf den Schirm. Dann geht es bei meinem obigen Post weiter und du bekommst diese Werte in den iobroker. Dann brauchst du noch die influxdb, die die Einzelwerte als Datenreihe abspeichert.

      Mühsam ernährt sich das Eichhörnchen und springt von Ast zu Ast und sammelt Nüsse für den Winter...

      1 Reply Last reply Reply Quote 0
      • Max 0
        Max 0 last edited by Max 0

        @chr-hu
        Es tut mir leid das ich dich hiermit nerfe, aber wie bekomme ich pyoodwe-main/alinone.py zum laufen?
        Und wie soll ich die Datei editieren weil ich habe die ja nur auf meinem raspi und nicht auf dem PC?

        1 Reply Last reply Reply Quote 0
        • V
          V8Turbo last edited by

          Hallo, habe mich heut mal wieder dran versucht und alles gemacht wie hier im Thread... In der Console holt er alle Daten wenn ich allinone.py starte...

          Aber iobroker meint :

          javascript.0 (553) script.js.pv-1: Fehler Python: undefined
          

          Mein Script sieht so aus....

          exec('/opt/pygoodsems/pygoodwe-main1/allinone.py', function (error, stdout, stderr) {
          
             if(error) log('Fehler Python: ' + stderr, 'warn');
          
             else if(stdout) {
          
                let arr = stdout.split('\n');
          
             setState('0_userdata.0.Bauer_PV_1.PV-Power', arr[0], true); 
          
             setState('0_userdata.0.Bauer_PV_1.PV_Haus_Last', arr[3], true);
          
             setState('0_userdata.0.Bauer_PV_1.PV_Strom_zu_Stadtwerken', arr[4], true);
          
             setState('0_userdata.0.Bauer_PV_1.PV_Strom_Heute', arr[5], true);
          
             setState('0_userdata.0.Bauer_PV_1.PV_Strom_Gesamt', arr[6], true);
          
             }
          
          }); 
          
          V 1 Reply Last reply Reply Quote 0
          • V
            V8Turbo @V8Turbo last edited by

            @v8turbo
            Ah ok exec in der Instanz war Deaktiviert... Nun kommt....

            	javascript.0 (3826) script.js.pv-1: Fehler Python: /opt/pygoodsems/pygoodwe-main1/allinone.py: 3: import: not found /opt/pygoodsems/pygoodwe-main1/allinone.py: 4: from: not found /opt/pygoodsems/pygoodwe-main1/allinone.py: 5: from: not found /opt/pygoodsems/pygoodwe-main1/allinone.py: 8: Syntax error: "(" unexpected 
            
            1 Reply Last reply Reply Quote 0
            • C
              Chr.Hu last edited by Chr.Hu

              in der allinone.py Zeile 3-5

              import json
              from config import args
              from pygoodwe import SingleInverter, API

              Pyhton erkennt den import-Befehl nicht. Da gibt es sicher Spezialisten im Forum, ich bin da jetzt nicht tiefer drin.

              Frage ins Blaue: in meiner allinone.py steht in der ersten Zeile das Shebang: #!/usr/bin/env python3 . Hast du das auch drin?

              Chris

              V 1 Reply Last reply Reply Quote 0
              • V
                V8Turbo @Chr.Hu last edited by V8Turbo

                @chr-hu
                Danke, es war zwar drin aber vor dem # war ein leerzeichen ^^

                1 Reply Last reply Reply Quote 0
                • V
                  V8Turbo last edited by

                  Jetzt wäre nur noch mein Problem... Ich habe 2 WR einen GW30K-ET und einen GW30K-MT. Der ET ist klar, der MT hat einiges nicht was ausgelesen werden kann. z.b. Strom gesamt und Strom heute, da kommt als Wert {"ack":true} was bedeutet das ?

                  V 1 Reply Last reply Reply Quote 0
                  • V
                    V8Turbo @V8Turbo last edited by

                    @v8turbo

                    So nachdem ich nun alle 3min den Cron laufen lasse kommt

                    javascript.0
                    	2024-03-06 09:15:37.993	warn	script.js.pv-1: Fehler Python: ERROR:root:Failed to call GoodWe API url='https://eu.semsportal.com/api/v2/PowerStation/GetMonitorDetailByPowerstationId' ERROR:root:no inverter data, try 1, trying again in 30 seconds Traceback (most recent call last): File "/opt/pygoodsems/pygoodwe-main1/allinone.py", line 8, in <module> gw = SingleInverter( File "/usr/local/lib/python3.9/dist-packages/pygoodwe/__init__.py", line 432, in __init__ super().__init__( File "/usr/local/lib/python3.9/dist-packages/pygoodwe/__init__.py", line 75, in __init__ self.getCurrentReadings(raw=True) File "/usr/local/lib/python3.9/dist-packages/pygoodwe/__init__.py", line 457, in get_current_readings self.data["inverter"] = self.data["inverter"][0] KeyError: 0
                    javascript.0
                    	2024-03-06 09:15:36.967	info	State value to set for "0_userdata.0.Bauer_PV_2.PV_Strom_Gesamt" has to be type "string" but received type "object"
                    javascript.0
                    	2024-03-06 09:15:36.966	info	State value to set for "0_userdata.0.Bauer_PV_2.PV_Strom_Heute" has to be type "string" but received type "object" 
                    
                    C 1 Reply Last reply Reply Quote 0
                    • C
                      Chr.Hu @V8Turbo last edited by

                      @v8turbo

                      Lass ihn alle 15 oder 30min laufen. Wahrscheinlich stolpert er...

                      Chris

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Mr.Flexible @Chr.Hu last edited by

                        Hallo. Ich bekomme diesen Fehler und schaffe es nicht, die Ursache zu finden.

                        script.js.common.GoodWe: Fehler Python: python3: can't open file '/home/admin/pygoodwe-main/allinone.py': [Errno 13] Permission denied

                        Das Script allinone.py läuft im Terminal einwandfrei und zeigt die abgeholten Werte an. Nur das Script innerhalb von ioBroker läuft nicht.

                        const exec = require('child_process').exec;

                        exec('/usr/bin/python3 /home/admin/pygoodwe-main/allinone.py', function(error, stdout, stderr) {
                        if (error) {
                        console.log('Fehler Python: ' + stderr);
                        return;
                        }
                        if (stdout) {
                        let arr = stdout.split('\n');
                        setState('Datenpunkte.0.PV-Anlage.PV-Power', arr[0], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Batterie_Status', arr[1], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Batterie_Ladung', arr[2], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Haus_Last', arr[3], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Strom_zu_Stadtwerken', arr[4], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Strom_Heute', arr[5], true);
                        setState('Datenpunkte.0.PV-Anlage.PV_Strom_Gesamt', arr[6], true);
                        }
                        });

                        Ich habe bereits folgendes probiert:

                        sudo chmod +x /home/admin/pygoodwe-main/allinone.py
                        sudo chmod 755 /home/admin/pygoodwe-main
                        sudo chown -R admin:admin /home/admin/pygoodwe-main

                        Unter Instanzen habe ich dem Modul Javascript die <exec>-Rechte gewährt.

                        Wer hat noch eine zielführende Idee?

                        Vielen Dank!
                        MrF

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          Mr.Flexible @Mr.Flexible last edited by

                          @mr-flexible Gelöst! Siehe https://forum.iobroker.net/topic/74824/gelöst-permission-denied-fehler-goodwe-script

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          1.1k
                          Online

                          31.7k
                          Users

                          79.7k
                          Topics

                          1.3m
                          Posts

                          15
                          87
                          16052
                          Loading More Posts
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes
                          Reply
                          • Reply as topic
                          Log in to reply
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          The ioBroker Community 2014-2023
                          logo