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

    • Amazon Alexa - ioBroker Skill läuft aus ?

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    GoodWe Wechselrichter und ioBroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • 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
                      • U
                        unicornch last edited by

                        Hallo zusammen,

                        für alle, bei denen das Script seit einigen Tagen keine Daten mehr liefert:

                        In der Datei:
                        ~/pygoodwe-main/pygoodwe/__init__.py

                        bei Zeile 290 folgendes einfügen:

                                    # APIs return "success", "Success", "Successful" in the 'msg'
                                    # seen "Successful" in ExportPowerStationPac
                                    # logging.error("Msg result %s - %s", self.base_url + url, data.get('msg', ''))
                                    if (
                                        data.get("msg", "").lower()
                                        in (
                                            "success",
                                            "successful",
                                            "操作成功",
                                        )
                        

                        Das API scheint plötzlich auf chinesisch zu antworten.

                        Gruss,
                        Peter

                        Rap acho KevinL214 2 Replies Last reply Reply Quote 0
                        • Rap acho
                          Rap acho @unicornch last edited by Samson71

                          @unicornch
                          vielen dank dafür allerdings habe ich auch seit genau montag das problem es kommen keine daten mehr an. obwohl ich seit monaten nichts veränder habe.

                          die daten sind in der config richtig hinterlegt aber das allinoy funktioniert nicht. es kommt folgendes:

                          python3 /home/matheus/pygoodwe-main/allinone.py
                          ERROR:root:Failed to call GoodWe API url='https://eu.semsportal.com/api/v2/Power                                                         Station/GetMonitorDetailByPowerstationId'
                          ERROR:root:no inverter data, try 1, trying again in 30 seconds
                          ERROR:root:Failed to call GoodWe API url='https://eu.semsportal.com/api/v2/Power                                                         Station/GetMonitorDetailByPowerstationId'
                          

                          das habe ich als fehler im putty

                          MOD-EDIT
                          Bitte Code-Tags </> benutzen

                          1 Reply Last reply Reply Quote 0
                          • KevinL214
                            KevinL214 @unicornch last edited by

                            @unicornch Danke dir. Erspart mir viel Arbeit 😳

                            @Rap-acho Bei mir kam die selbe Meldung. Nach der Änderung laut @unicornch ging es bei mir wieder.
                            aktiviere mal den Log und schau mal was er dir meldet:

                            # logging.error("Msg result %s - %s", self.base_url + url, data.get('msg', ''))
                            

                            Liebe Grüße

                            Rap acho 1 Reply Last reply Reply Quote 0
                            • Rap acho
                              Rap acho @KevinL214 last edited by

                              was mir aufegefallen ist... als ich das eingefügt habe "操作成功", und gespeichert habe. und die datei wieder geöffnet habe wurden statt der zeichen nur ????? angezeigt. also musste ich noch die passenden fonts installlieren.

                              sudo apt update
                              sudo apt install fonts-noto-cjk
                              

                              und dann noch

                              sudo apt install fonts-arphic-uming fonts-arphic-ukai
                              

                              installiert und danach neugestartet

                              danach die datei nochmal bearbeitet und das hinzugefügt "操作成功"

                              danach hat er aus so angenommen und das script läuft wieder. danke

                              1 Reply Last reply Reply Quote 1
                              • T
                                Tomapyrinz @Chr.Hu last edited by

                                @chr-hu said in GoodWe Wechselrichter und ioBroker:

                                Der eigentliche Fehler ist offenbar:
                                ERROR:root:Failed to call GoodWe API url='https://eu.semsportal.com/api/v2/PowerS
                                tation/GetMonitorDetailByPowerstationId'

                                Wenn ich dies url eingebe dann stoße ich auf ein Script.

                                Falls hier jemand Erfahrungen hat....

                                MfG

                                Chris

                                Hallo Chris,
                                an diesem Fehler hänge ich auch seit geraumer Zeit. Leider weiß ich nicht wo ich ansetzen soll, um den Fehler zu beheben.
                                Ich betreibe einen Raspy, keine Synology. Aber vielleicht kannst du mir trotzdem weiterhelfen bei der Fehlersuche. Was hat das Problem bei dir gelöst?
                                Grüße
                                Michael

                                C 1 Reply Last reply Reply Quote 0
                                • C
                                  Chr.Hu @Tomapyrinz last edited by

                                  @tomapyrinz

                                  Hallo,

                                  das weiß ich leider nicht mehr im Detail, an was es da gehakt hat.

                                  Generell hatte ich mir notiert https://forum.iobroker.net/topic/34626/goodwe-wechselrichter-und-iobroker

                                  Vielleicht kommst du das weiter.

                                  Gruß

                                  Chris

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

                                    @chr-hu

                                    Mit der Chinesen-Übersetzung von "success" funktioniert der Zugriff wieder, vielen Dank @unicornch. Geht wohl auf den Zoll-Streit zurück, dass Goodwe nicht mehr auf Englisch antwortet 🙂

                                    Den Schriftsatz musste ich nicht installieren.

                                    Chris

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

                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    877
                                    Online

                                    32.3k
                                    Users

                                    81.1k
                                    Topics

                                    1.3m
                                    Posts

                                    19
                                    94
                                    20865
                                    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