Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Kostal Wechselrichter mit Firmware 3.71

    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

    Kostal Wechselrichter mit Firmware 3.71

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

      @dbox83 sagte in Kostal Wechselrichter mit Firmware 3.71:

      Aktuell nutze ich dieses Script:

      und das musst du aufbohren mit den Variablen für den 3. String

      D 1 Reply Last reply Reply Quote 0
      • D
        dbox83 @Homoran last edited by

        @homoran

        Nach dem Post von SirTiGer
        am 31 Dec 2022, 14:06 hatte ich gehofft, dass er einfach nochmal seinen Code hier einstellt.....

        Hier der Quelltext von meinem Wechselrichter:

        <!DOCtype HTML PUBLIC "-//W3C//Dtd HTML 4.0 Transitional//EN">
        <html>
        <head>
        <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
        <meta name="Generator" CONTENT="ChrisB">
        <title>PV Webserver</title>
        </head>
        <body nof="(MB=(DefaultMasterborder, 65, 60, 150, 10), L=(HomeLayout, 700, 600))" bgcolor="#EAF7F7" text="#000000" link="#0033CC" vlink="#990099" alink="#FF0000" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
        <form method="post" action="">
        <table cellspacing="0" cellpadding="0" width="770" nof="ly">
        <tr><td height="5"></td></tr>
        <tr><td width="190" height="55"></td>
        <td width="400">
        <font face="Arial,Helvetica,Geneva,Sans-serif,sans-serif" size="+3">
        PIKO 10.1
        <br><font size="+1">                 
        Friedrich  (255)
        </font>
        </font>
        </td>
        <td><img alt="Logo" height="42" width="130" src="KSE.gif"></td>
        </tr>
        </table>
        
        <font face="Arial,Helvetica,Geneva,Sans-serif,sans-serif">
        <table Border="0" width="100%"><tr>
        <td width="150"></td>
        <td> <hr> </td>
        </tr></table>
        <table cellspacing="0" cellpadding="0" width="770">
        <tr><td></td></tr>
        <tr>
        <td width="190"></td>
        <td colspan="2">
        <b>AC-Leistung</b></td>
        <td>&nbsp</td>
        <td>
        <b>Energie</b></td></tr>
        <tr><td height="10"></td></tr>
        
        <tr>
        <td width="190"></td>
        <td width="100">
        aktuell</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp W</td>
        <td width="100">
        Gesamtenergie</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        69360</td>
        <td width="50">&nbsp kWh</td>
        <td>&nbsp</td></tr>
        <tr height="2"><td></td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        &nbsp</td>
        <td width="70" align="right">
        &nbsp</td>
        <td width="140">&nbsp</td>
        <td width="100">
        Tagesenergie</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        29.41</td>
        <td width="50">&nbsp kWh</td>
        <td>&nbsp</td></tr>
        <tr height="5"><td></td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        Status</td>
        <td colspan="4">
        Aus</td>
        <td>&nbsp</td></tr>
        <tr height="8"><td></td></tr>
        <tr><td colspan="7">
        <table align="top" width="100%"><tr>
        <td width="182"></td>
        <td><hr size="1"></font></td></tr>
        <tr><td height="5"></td></tr></table>
        </td></tr>
        <tr>
        <td width="190"></td>
        <td colspan="2">
        <b>PV-Generator</b></td>
        <td width="140">&nbsp</td>
        <td colspan="2">
        <b>Ausgangsleistung</b></td>
        <td width="30">&nbsp</td>
        <td>&nbsp</td></tr>
        <tr><td height="10"></td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        <u>String 1</u></td>
        <td width="70">&nbsp</td>
        <td width="140">&nbsp</td>
        <td width="95">
        <u>L1</u></td>
        <td width="70">&nbsp</td>
        <td width="30">&nbsp</td>
        <td>&nbsp</td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp V</td>
        <td width="100">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp V</td>
        <td>&nbsp</td></tr>
        <tr height="2"><td></td></tr>
        <tr valign="top" align="left">
        <td width="190">&nbsp</td>
        <td width="100">
        Strom</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp A</td>
        <td width="100">
        Leistung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp W</td>
        <td>&nbsp</td></tr>
        <tr height="22"><td></td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        <u>String 2</u></td>
        <td width="70">&nbsp</td>
        <td width="140">&nbsp</td>
        <td width="100">
        <u>L2</u></td>
        <td width="70">&nbsp</td>
        <td width="30">&nbsp</td>
        <td>&nbsp</td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp V</td>
        <td width="100">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp V</td>
        <td>&nbsp</td></tr>
        <tr height="2"><td></td></tr>
        <tr valign="top" align="left">
        <td width="190">&nbsp</td>
        <td width="100">
        Strom</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp A</td>
        <td width="100">
        Leistung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp W</td>
        <td>&nbsp</td></tr>
        <tr height="22"><td></td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        <u>String 3</u></td>
        <td width="70">&nbsp</td>
        <td width="140">&nbsp</td>
        <td width="100">
        <u>L3</u></td>
        <td width="70">&nbsp</td>
        <td width="30">&nbsp</td>
        <td>&nbsp</td></tr>
        <tr>
        <td width="190"></td>
        <td width="100">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp
        V</td>
        <td width="95">
        Spannung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp V</td>
        <td>&nbsp</td></tr>
        <tr height="2"><td></td></tr>
        <tr valign="top" align="left">
        <td width="190">&nbsp</td>
        <td width="95">
        Strom</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="140">&nbsp
        A</td>
        <td width="95">
        Leistung</td>
        <td width="70" align="right" bgcolor="#FFFFFF">
        x x x&nbsp</td>
        <td width="30">&nbsp W</td>
        <td>&nbsp</td></tr>
        
        <tr><td height="15"></td></tr>
        <tr><td colspan="7">
        <table align="top" width="100%">
        <tr><td width="182"></td>
        <td><hr size="1"></font></td>
        </tr><tr><td height="5"></td></tr></table>
        </td></tr></table>
        <table cellspacing="0" cellpadding="0" width="770">
        <tr><td width="190"></td>
        <td><font face="Arial,Helvetica,Geneva,Sans-serif">
        <b>RS485 Kommunikation</b></td></tr>
        <tr><td height="8"></td></tr>
        <tr><td width="190"></td>
        <td><font face="Arial,Helvetica,Geneva,Sans-serif">
        Wechselrichter&nbsp
        <INPUT TYPE="Text" NAME="edWrNr" VALUE="255" SIZE="3" MAXLENGTH="3">
        <input type="submit" value="Anzeigen/Aktualisieren">
        </td></tr><tr><td height="10"></td></tr>
        </table>
        </td></tr></table></font>
        
        <hr>
        <table cellspacing="0" cellpadding="0" width="770">
        <tr><td height="5"></td></tr>
        <tr><td width="190"></td>
        <td width="440">
        <font face="Arial,Helvetica,Geneva,Sans-serif,sans-serif">
        <a href="LogDaten.dat">Historie</a>
        &nbsp &nbsp
        <a href="Info.fhtml">Infoseite</a>
        &nbsp &nbsp
        <a href="BA.fhtml"></a>
        &nbsp &nbsp
        <a href="igak.fhtml"></a>
        </font></td>
        <td align="right">
        <font face="Arial,Helvetica,Geneva,Sans-serif,sans-serif">
        <a href="Solar2.fhtml">Einstellungen</a></font></td>
        <td width="50"></td>
        </tr></table></font>
        </form>
        </body>
        </html>
        
        
        D Homoran 2 Replies Last reply Reply Quote 0
        • D
          dbox83 @dbox83 last edited by

          Hier nochmal das bisherige Script in Code-Tags:

          
           
           
          // 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.Photovoltaik.Leistung_aktuell';
               var idTag = 'javascript.0.Photovoltaik.Tagesleistung';
               var idall = 'javascript.0.Photovoltaik.Leistung_gesamt';
               var idP1 = 'javascript.0.Photovoltaik.Leistung_Strang1';
               var idP2 = 'javascript.0.Photovoltaik.Leistung_Strang2';
            
               var NameAnlage = 'pvserver';        // Nutzername der Photovoltaik-Anlage
               var PassAnlage = 'pvwr';         // Password der Photovoltaik-Anlage
               var IPAnlage = '192.168.176.211';    // IP der Photovoltaik-Anlage
            
               var logging = false;
               var request = require('request');
            
            
            function Piko() {
               log("Piko 10.1 auslesen");
               var results = [];
               request('http://' + NameAnlage + ':' + PassAnlage +'@' + IPAnlage, function (error, response, body) {
                   var d = body.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);
                       log (z[1]);
                   }
                   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);
            
                   if (logging) log("Leistung aktuell= " + pwr + " W");
                   if (logging) log("Tagesleistung= " + day + " kWh");
                   if (logging) log("Leistung gesamt= " + all + " kWh");
           	     if (logging) log("Leistung Strang 1= " + p1 + " W");
               	 if (logging) log("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("2,7,12,17,22,27,32,37,42,47,52,57 * * * *", function () {
               log ("Auslöser: Schedule");
           	Piko();
           });
            
           schedule("3 0 * * *", function () {     // Variablen löschen um 00:03 Uhr   
               setState('javascript.0.Photovoltaik.Tagesleistung', 0);
           });
            
           
          
          
          
          1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @dbox83 last edited by

            @dbox83 ok!
            mal sehen ob @bahnuhr hier nochmal reinsieht.
            ich muss das nämlich alles trocken am Handy machen und habe von js keine Ahnung.

            D 1 Reply Last reply Reply Quote 0
            • D
              dbox83 @Homoran last edited by

              @homoran

              Danke Dir schonmal.

              Lass das aber erstmal. Es eilt mir nicht.

              Ich hoffe einfach dass @bahnuhr nochmal reinschaut und seinen code postet.

              Viele Grüße

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

                @dbox83
                @Homoran

                Na klar, ich lese hier fleißig mit:

                Im Script befindet sich folgendes:

                         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);
                

                Wenn dies funktioniert, dann vielleicht wie folgt erweitern:

                         var v3 = results[11];            // PV Generator Nr. 3 - Spannung in V
                         var i3 = results[13];            // PV Generator Nr. 3 - Strom in A
                         var p3 = parseInt(v3 * i3);
                

                Habs nicht getestet (weil bei mir nicht notwendig).
                Und weiter unten dann logisch noch log und setstate erweitern.

                Bitte probieren.

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

                  @dbox83 im prinzip musst du die Variablen p1,p2 um p3 erweitern das Array hat bei dir weitete Einträge.
                  leider kann ich dir die Zahlen nicht zuordnen, da ichbzwar den quelltext, aber ichtvdie zugehörige Maske mit den Werten sehe.

                  im prinzip sind v1, i1 das 3. und 5. Element, v2,i2 das 7. und 9. Elemrnt, dann müssten v3 und i3 das 11. und 13. Element sein.

                  warum @Bahnuhr rechnet obwohl W auch in der Ausgabe vorkommt, weiß ich nicht mehr. kann sein, dass es DC Werte sind undcer AC rechnet.

                  mein problem ist, dass unter regex101.com dauernd der Zwischenspeicher gelöscht wird, wenn ich hier schreibe

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

                    @bahnuhr danke, passt zu meiner Theorie

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      dbox83 @Homoran last edited by

                      Ich habe jetzt mal so erweitert:

                      
                       
                       
                      // 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.Photovoltaik.Leistung_aktuell';
                           var idTag = 'javascript.0.Photovoltaik.Tagesleistung';
                           var idall = 'javascript.0.Photovoltaik.Leistung_gesamt';
                           var idP1 = 'javascript.0.Photovoltaik.Leistung_Strang1';
                           var idP2 = 'javascript.0.Photovoltaik.Leistung_Strang2';
                        
                           var NameAnlage = 'pvserver';        // Nutzername der Photovoltaik-Anlage
                           var PassAnlage = 'pvwr';         // Password der Photovoltaik-Anlage
                           var IPAnlage = '192.168.176.211';    // IP der Photovoltaik-Anlage
                        
                           var logging = false;
                           var request = require('request');
                        
                        
                        function Piko() {
                           log("Piko 10.1 auslesen");
                           var results = [];
                           request('http://' + NameAnlage + ':' + PassAnlage +'@' + IPAnlage, function (error, response, body) {
                               var d = body.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);
                                   log (z[1]);
                               }
                               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);
                               var v3 = results[11];            // PV Generator Nr. 3 - Spannung in V
                               var i3 = results[12];            // PV Generator Nr. 3 - Strom in A
                               var p3 = parseInt(v3 * i3);
                      
                               if (logging) log("Leistung aktuell= " + pwr + " W");
                               if (logging) log("Tagesleistung= " + day + " kWh");
                               if (logging) log("Leistung gesamt= " + all + " kWh");
                       	     if (logging) log("Leistung Strang 1= " + p1 + " W");
                           	 if (logging) log("Leistung Strang 2= " + p2 + " W");
                               if (logging) log("Leistung Strang 3= " + p3 + " W");
                               setState(idaktuell, parseFloat(pwr));
                               setState(idTag, parseFloat(day));
                               setState(idall, parseFloat(all));
                               setState(idP1, parseFloat(p1));
                               setState(idP2, parseFloat(p2));
                               setState(idP3, parseFloat(p3));
                           });
                       }
                        
                        
                       schedule("2,7,12,17,22,27,32,37,42,47,52,57 * * * *", function () {
                           log ("Auslöser: Schedule");
                       	Piko();
                       });
                        
                       schedule("3 0 * * *", function () {     // Variablen löschen um 00:03 Uhr   
                           setState('javascript.0.Photovoltaik.Tagesleistung', 0);
                       });
                        
                       
                      
                      
                      bahnuhr 2 Replies Last reply Reply Quote 0
                      • bahnuhr
                        bahnuhr Forum Testing Most Active @Homoran last edited by

                        @homoran sagte in Kostal Wechselrichter mit Firmware 3.71:

                        warum @Bahnuhr rechnet obwohl W auch in der Ausgabe vorkommt, weiß ich nicht mehr. kann sein, dass es DC Werte sind undcer AC rechnet.

                        Weil ich W haben will.
                        Und kostal liefern V und A.

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

                          @dbox83 sagte in Kostal Wechselrichter mit Firmware 3.71:

                               var i3 = results[12];            // PV Generator Nr. 3 - Strom in A
                          

                          hier muss 13 hin.
                          Hatte vorne einen Schreibfehler, ist aber schon berichtigt.

                          log uns setstate passt.
                          Die Variable müssen aber auch angelegt sein !

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

                            @dbox83 sagte in Kostal Wechselrichter mit Firmware 3.71:

                            var idP2 = 'javascript.0.Photovoltaik.Leistung_Strang2';

                            und oben musst du idP3 ergänzen.

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

                              @bahnuhr sagte in Kostal Wechselrichter mit Firmware 3.71:

                              Weil ich W haben will.

                              Leistung</td>
                              
                              <td width="70" align="right" bgcolor="#FFFFFF">
                              
                              x x x&nbsp</td>
                              
                              <td width="30">&nbsp W</td>
                              

                              gibbet doch

                              bahnuhr 1 Reply Last reply Reply Quote 0
                              • D
                                dbox83 @bahnuhr last edited by

                                in etwa so?

                                
                                 
                                 
                                // 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.Photovoltaik.Leistung_aktuell';
                                     var idTag = 'javascript.0.Photovoltaik.Tagesleistung';
                                     var idall = 'javascript.0.Photovoltaik.Leistung_gesamt';
                                     var idP1 = 'javascript.0.Photovoltaik.Leistung_Strang1';
                                     var idP2 = 'javascript.0.Photovoltaik.Leistung_Strang2';
                                     var idP3 = 'javascript.0.Photovoltaik.Leistung_Strang3';
                                  
                                     var NameAnlage = 'pvserver';        // Nutzername der Photovoltaik-Anlage
                                     var PassAnlage = 'pvwr';         // Password der Photovoltaik-Anlage
                                     var IPAnlage = '192.168.176.211';    // IP der Photovoltaik-Anlage
                                  
                                     var logging = false;
                                     var request = require('request');
                                  
                                  
                                  function Piko() {
                                     log("Piko 10.1 auslesen");
                                     var results = [];
                                     request('http://' + NameAnlage + ':' + PassAnlage +'@' + IPAnlage, function (error, response, body) {
                                         var d = body.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);
                                             log (z[1]);
                                         }
                                         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);
                                         var v3 = results[11];            // PV Generator Nr. 3 - Spannung in V
                                         var i3 = results[13];            // PV Generator Nr. 3 - Strom in A
                                         var p3 = parseInt(v3 * i3);
                                
                                         if (logging) log("Leistung aktuell= " + pwr + " W");
                                         if (logging) log("Tagesleistung= " + day + " kWh");
                                         if (logging) log("Leistung gesamt= " + all + " kWh");
                                 	     if (logging) log("Leistung Strang 1= " + p1 + " W");
                                     	 if (logging) log("Leistung Strang 2= " + p2 + " W");
                                         if (logging) log("Leistung Strang 3= " + p3 + " W");
                                         setState(idaktuell, parseFloat(pwr));
                                         setState(idTag, parseFloat(day));
                                         setState(idall, parseFloat(all));
                                         setState(idP1, parseFloat(p1));
                                         setState(idP2, parseFloat(p2));
                                         setState(idP3, parseFloat(p3));
                                     });
                                 }
                                  
                                  
                                 schedule("2,7,12,17,22,27,32,37,42,47,52,57 * * * *", function () {
                                     log ("Auslöser: Schedule");
                                 	Piko();
                                 });
                                  
                                 schedule("3 0 * * *", function () {     // Variablen löschen um 00:03 Uhr   
                                     setState('javascript.0.Photovoltaik.Tagesleistung', 0);
                                 });
                                  
                                 
                                
                                
                                bahnuhr 1 Reply Last reply Reply Quote 0
                                • bahnuhr
                                  bahnuhr Forum Testing Most Active @Homoran last edited by

                                  @homoran
                                  ccb07ff2-5f62-4f8c-87dd-f2c0726abb11-image.png
                                  Diese beide lese ich aus und rechne halt selber 😉

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

                                    @bahnuhr alles gut! die W sind anscheinend für die drei Phasen

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

                                      @dbox83 sagte in Kostal Wechselrichter mit Firmware 3.71:

                                      in etwa so?

                                      sieht doch gut aus.
                                      Gib mal Bescheid ob es auch klappt.

                                      D Homoran 2 Replies Last reply Reply Quote 0
                                      • D
                                        dbox83 @bahnuhr last edited by

                                        Ich habe jetzt auch nochmal das Script, das die Variablen erzeugt wie folgt angepasst.

                                        // Photovoltaik -------------------------------------------------------------------------------------------------------------
                                        createState('javascript.0.Photovoltaik.Leistung_aktuell', 0, {type: 'number',name: 'Leistung aktuell',min: 0,role: 'per Script'});
                                        createState('javascript.0.Photovoltaik.Tagesleistung', 0, {type: 'number',name: 'Tagesleistung',min: 0,role: 'per Script'});
                                        createState('javascript.0.Photovoltaik.Leistung_gesamt', 0, {type: 'number',name: 'Leistung gesamt',min: 0,role: 'per Script'});
                                        createState('javascript.0.Photovoltaik.Leistung_Strang1', 0, {type: 'number',name: 'Leistung Strang 1',min: 0,role: 'per Script'});
                                        createState('javascript.0.Photovoltaik.Leistung_Strang2', 0, {type: 'number',name: 'Leistung Strang 2',min: 0,role: 'value'});
                                        createState('javascript.0.Photovoltaik.Leistung_Strang3', 0, {type: 'number',name: 'Leistung Strang 3',min: 0,role: 'value'});
                                        

                                        Die Variablen (Objekte) sind nun auch vorhanden.
                                        Aber alle haben den Wert "0".

                                        Ich werde morgen weiterschauen... Muss für heute Schluss machen.

                                        Vielen Dank schonmal für die tatkräftige Unterstützung!😊

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

                                          @dbox83 sagte in Kostal Wechselrichter mit Firmware 3.71:

                                          Aber alle haben den Wert "0".

                                          Na klar, ist ja auch dunkel!

                                          Wie sieht die Webseite aktuell aus?
                                          Müsste doch überall (fast) 0 oder xxx stehen.

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

                                            @bahnuhr sagte in Kostal Wechselrichter mit Firmware 3.71:

                                            Gib mal Bescheid ob es auch klappt.

                                            dann müsste @dbox83 aber Lunarmodule am 3. String haben.

                                            interessiert mich aber auch

                                            wenn's dann läuft, dann kommt hier das Skript rein!

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            919
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            parsen wechselrichter
                                            5
                                            64
                                            4367
                                            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