Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @bahnuhr last edited by

      @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

      Für Rainer mach ich alles.

      DANKE!
      Dann ist das wenigstens hier mit im Thread!

      Schade dass du nicht in Solingen warst.

      bahnuhr 1 Reply Last reply Reply Quote 0
      • bahnuhr
        bahnuhr Forum Testing Most Active @Homoran last edited by

        @homoran sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

        Schade dass du nicht in Solingen warst.

        Ja, stimmt.
        War mir zu weit; nach Ffm wäre ich gekommen.
        Soll ja gut gewesen sein.

        Homoran 1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @bahnuhr last edited by

          @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

          War mir zu weit; nach Ffm wäre ich gekommen.

          dafür hatte ich nur 50km 😁

          @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

          Soll ja gut gewesen sein.

          War es!

          [/OT]

          1 Reply Last reply Reply Quote 0
          • I
            io2345 @bahnuhr last edited by io2345

            @bahnuhr
            Danke für das angepasste Script. Habe ich so bei mir reinkopiert und nur die drei Variablen mit "Anlage" im Namen korrigiert. Aber jede Minute kommt nun die Meldung

            *javascript.0	15:53:05.603	error	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:60:25)*
            

            In Zeile 60 ist das Zeichen 25 das Leerzeichen zwischen & und pwr.

            *...if (Zeit1 && pwr == 0...*
            

            Kapier ich nicht, was da das Problem sein soll.

            bahnuhr 2 Replies Last reply Reply Quote 0
            • bahnuhr
              bahnuhr Forum Testing Most Active @io2345 last edited by

              @io2345 sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

              Kapier ich nicht, was da das Problem sein soll.

              Ich auch nicht.
              Bei mir läuft es einwandfrei.

              1 Reply Last reply Reply Quote 0
              • bahnuhr
                bahnuhr Forum Testing Most Active @io2345 last edited by

                @io2345 sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                In Zeile 60

                Zeile 60 ist aber auch ne andere !
                (zumindest lt. meinem Script)

                Warum änderst du dein bestehendes Script nicht einfach ab.
                Wolltest doch "nur" httpget haben

                Homoran 1 Reply Last reply Reply Quote 1
                • Homoran
                  Homoran Global Moderator Administrators @bahnuhr last edited by

                  @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                  Zeile 60 ist aber auch ne andere !

                  du hast oben noch ne Leerzrile drin. 😁

                  bahnuhr 1 Reply Last reply Reply Quote 0
                  • bahnuhr
                    bahnuhr Forum Testing Most Active @Homoran last edited by

                    @homoran sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                    @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                    Zeile 60 ist aber auch ne andere !

                    du hast oben noch ne Leerzrile drin. 😁

                    lt. oben wäre doch dies Zeile 60:
                    fb1c0f78-eea2-4400-ba2f-1f26ac06cd53-image.png

                    Homoran 1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @bahnuhr last edited by

                      @bahnuhr

                      Screenshot_20241115-164537_Firefox.jpg

                      lass die mal weg!

                      bahnuhr 1 Reply Last reply Reply Quote 0
                      • bahnuhr
                        bahnuhr Forum Testing Most Active @Homoran last edited by

                        @homoran sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                        lass die mal weg!

                        Ich mach gar nix; da ich ja auch kein Problem habe.

                        Und der, der das Problem hat zeigt ja nicht einmal sein Script.

                        Für mich jetzt Ende hier.

                        Homoran 1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @bahnuhr last edited by Homoran

                          @bahnuhr sagte in Wie Kostal Piko 3.6 Wechselrichter Visualisieren ?:

                          Ich mach gar nix; da ich ja auch kein Problem habe.

                          wenn du (man) beim kopieren diese Leerzeile weglässt, verschiebt dich die Zeilennummerierung um 1.
                          dann ist Zeile 61 bei dir die 60.

                          und davon gehe ich aus, dass @io2345 diese unnötige Leerzeile weggelassen hat.

                          Damit stimmt wieder alles

                          I 1 Reply Last reply Reply Quote 0
                          • I
                            io2345 @Homoran last edited by io2345

                            @homoran Ah, sorry, gestern war Kindergeburtstag.
                            Ja, genau, die obere Leerzeile habe ich natürlich weggelassen. Ansonsten Script komplett kopiert und nur die drei Werte Name, Passwort und IP befüllt.
                            Das Script startet, nach 37 Sekunden kommt die Meldung das erste Mal, dann jede Minute.

                            16.11.2024, 08:22:28.236	[info ]: javascript.0 (1210) Start JavaScript script.js.common.Kostal_Piko_55_WR_auslesen_neu (Javascript/js)
                            16.11.2024, 08:22:28.248	[info ]: javascript.0 (1210) script.js.common.Kostal_Piko_55_WR_auslesen_neu: registered 0 subscriptions, 1 schedule, 0 messages, 0 logs and 0 file subscriptions
                            16.11.2024, 08:23:05.336	[error]: javascript.0 (1210)     at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:60:25)
                            16.11.2024, 08:24:05.544	[error]: javascript.0 (1210)     at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:60:25)
                            16.11.2024, 08:25:05.544	[error]: javascript.0 (1210)     at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:60:25)
                            

                            ...und natürlich hatte ich als Erstes versucht, nur den Block "function Piko()" auszutauschen. Da kommt dann ein anderer Fehler.

                            bahnuhr 1 Reply Last reply Reply Quote 0
                            • bahnuhr
                              bahnuhr Forum Testing Most Active @io2345 last edited by

                              @io2345

                              nehm dies raus:
                              2d9db5cd-7c30-4680-ab6e-7fafbe4076d0-image.png

                              Dann läuft es.

                              I 1 Reply Last reply Reply Quote 0
                              • I
                                io2345 @bahnuhr last edited by

                                @bahnuhr
                                Danke für Info.
                                Das musste auch noch raus, sonst kommt minütlich eine Warnung:

                                //       if (logging) log("aktuell -> Leistung aktuell= " + pwr + " W // Tagesleistung= " + day + " kWh // Leistung alt gesamt= " + all + " kWh // Leistung Strang 1= " + p1 + " W // Leistung Strang 2= " + p2 + " W");
                                 
                                 //       setState(idaktuell, parseFloat(pwr));
                                 //       setState(idTag, parseFloat(day));
                                 //       setState(idall, parseFloat(all));
                                 //       setState(idP1, parseFloat(p1));
                                 //       setState(idP2, parseFloat(p2));
                                
                                bahnuhr 1 Reply Last reply Reply Quote 0
                                • bahnuhr
                                  bahnuhr Forum Testing Most Active @io2345 last edited by bahnuhr

                                  @io2345
                                  Das ist keine Warnung, das ist eine Info.

                                  Aber wie schon erwähnt, könntest ja mal dein jetziges Script zeigen.
                                  Hast du ja (bewusst) bisher nicht gemacht; oder hab ich was übersehn.

                                  Nachtrag:
                                  Wenn du alle setstate rausnimmst wird auch nix mehr gespeichert !!!

                                  I 1 Reply Last reply Reply Quote 0
                                  • I
                                    io2345 @bahnuhr last edited by io2345

                                    @bahnuhr
                                    Na, da gibt's halt nicht viel zu zeigen. Ist dein komplettes Script ohne die beiden besprochenen Blöcke:

                                    // Photovoltaik: Piko 5.5 Anlage (alte Firmware)
                                    // Danke an homoran für den regex
                                    // @bahnuhr; 03/2019 Dieter Müller
                                    
                                    //Variaben
                                       var idaktuell = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_alt_aktuell';
                                       var idTag = 'javascript.0.Geräte.Photovoltaik.2012_Tagesleistung';
                                       var idall = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_alt_gesamt';
                                       var idP1 = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_Strang1';
                                       var idP2 = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_Strang2';
                                    
                                       var NameAnlage = 'pvserver';        // Nutzername der Photovoltaik-Anlage
                                       var PassAnlage = 'pvwr';         // Password der Photovoltaik-Anlage
                                       var IPAnlage = '192.168.0.20';    // IP der Photovoltaik-Anlage
                                    
                                       var logging = false;
                                    
                                    
                                    function Piko() {
                                      // log("Piko 5.5 auslesen");
                                       var results = [];
                                       httpGet('http://' + NameAnlage + ':' + PassAnlage +'@' + IPAnlage, { timeout: 10000, responseType: 'document' }, (err, response) => { 
                                       if (err) { 
                                           if (err.indexOf("size of -1") != -1) {
                                               log (err,"info");
                                           } else {
                                               console.error(err); 
                                           }
                                       } else { 
                                           var d = (response.data).toString();
                                           if (logging) log (d);
                                           var reg = /#FFFFFF">[^\d]+([^<]+)/g
                                           var z = reg.exec(d);
                                    
                                           while(z != null) {
                                               if (isNaN(z[1])) {
                                                   if (logging) log("keine Zahl= "+ z[1]);
                                                   z[1] = 0;
                                               } else {
                                                   if (logging) log("Zahl= "+ z[1]);
                                                   parseFloat(z[1]);
                                               }
                                               results[results.length] = z[1];
                                               z = reg.exec(d);
                                           }
                                           if (logging) log("results= "+ results);
                                    
                                       // Werte zuordnen
                                           var pwr = results[0];           // Energie aktuell in W
                                           var day = results[2];           // Tagesenergie in kWh
                                           var all = results[1];           // Gesamtenergie in kWh
                                           var v1 = results[3];            // PV Generator Nr. 1 - Spannung in V
                                           var i1 = results[5];            // PV Generator Nr. 1 - Strom in A
                                           var p1 = parseInt(v1 * i1);
                                           var v2 = results[7];            // PV Generator Nr. 2 - Spannung in V
                                           var i2 = results[9];            // PV Generator Nr. 2 - Strom in A
                                           var p2 = parseInt(v2 * i2);
                                          
                                           // geändert: in pwr wird die aktuelle Energie angezeigt; dies passt aber nicht mit p1 + p2 überein.
                                           // vermutlich wird die W des Wechselrichters abgezogen. neu habe ich nun pwr = p1 + p2
                                               pwr = p1 + p2;
                                    
                                    //       if (logging) log("aktuell -> Leistung aktuell= " + pwr + " W // Tagesleistung= " + day + " kWh // Leistung alt gesamt= " + all + " kWh // Leistung Strang 1= " + p1 + " W // Leistung Strang 2= " + p2 + " W");
                                    
                                    //       setState(idaktuell, parseFloat(pwr));
                                    //       setState(idTag, parseFloat(day));
                                    //       setState(idall, parseFloat(all));
                                    //       setState(idP1, parseFloat(p1));
                                    //       setState(idP2, parseFloat(p2));
                                       } });
                                    }
                                    
                                    
                                    schedule('5 * * * * *', function () {
                                       //log ("Auslöser: Schedule");
                                       Piko();
                                    });
                                    
                                    /*
                                    schedule("3 0 * * *", function () {     // Variablen löschen um 00:03 Uhr   
                                       setState('javascript.0.Geräte.Photovoltaik.2012_Tagesleistung', 0);
                                    });
                                    */
                                    
                                    //Piko();
                                    

                                    Und wenn der Text im Script-Log gelb ist und davor "warn" steht (die fünf unteren Zeilen), ist es keine Info - oder irre ich?

                                    javascript.0	17:37:15.385	info	Start JavaScript script.js.common.Kostal_Piko_55_WR_auslesen_neu (Javascript/js)
                                    javascript.0	17:37:15.394	info	script.js.common.Kostal_Piko_55_WR_auslesen_neu: registered 0 subscriptions, 1 schedule, 0 messages, 0 logs and 0 file subscriptions
                                    javascript.0	17:38:05.539	warn	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:66:9)
                                    javascript.0	17:38:05.540	warn	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:67:9)
                                    javascript.0	17:38:05.541	warn	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:68:9)
                                    javascript.0	17:38:05.541	warn	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:69:9)
                                    javascript.0	17:38:05.541	warn	at Object.<anonymous> (script.js.common.Kostal_Piko_55_WR_auslesen_neu:70:9)
                                    
                                    bahnuhr 4 Replies Last reply Reply Quote 0
                                    • bahnuhr
                                      bahnuhr Forum Testing Most Active @io2345 last edited by

                                      @io2345

                                      wie gesagt:
                                      Wenn man alle setstate rausnimmt bekommst du die Werte nirgends gespeichert.
                                      So funktioniert es nicht.

                                      1 Reply Last reply Reply Quote 1
                                      • bahnuhr
                                        bahnuhr Forum Testing Most Active @io2345 last edited by

                                        @io2345
                                        Hast du die DP angelegt ?

                                           var idaktuell = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_alt_aktuell';
                                           var idTag = 'javascript.0.Geräte.Photovoltaik.2012_Tagesleistung';
                                           var idall = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_alt_gesamt';
                                           var idP1 = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_Strang1';
                                           var idP2 = 'javascript.0.Geräte.Photovoltaik.2012_Leistung_Strang2';
                                        
                                        

                                        Bei dir stimmt etwas nicht.

                                        1 Reply Last reply Reply Quote 0
                                        • bahnuhr
                                          bahnuhr Forum Testing Most Active @io2345 last edited by

                                          @io2345
                                          Noch ein Nachtrag.
                                          Deine Warnhinweise im log können nicht ! von dem Script kommen was darüber steht.
                                          Denn dort hast du diese Zeilen ja mit // raus genommen.

                                          I 1 Reply Last reply Reply Quote 0
                                          • bahnuhr
                                            bahnuhr Forum Testing Most Active @io2345 last edited by

                                            Habe dein Script mal bei mir eingefügt.

                                            Es funktioniert einwandfrei !

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            572
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            8
                                            94
                                            6441
                                            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