Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Status vom Kostal Wechselrichter auslesen?

    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

    Status vom Kostal Wechselrichter auslesen?

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MartyBr @MartyBr last edited by

      @Homoran
      Hier mal die Seite mit den Strings:

      
      <!DOCTYPE html>
      <html ng-app="kbApp" ng-controller="kbAppCtrl">
      <head>
         <link rel="icon" href="/assets/favicon.ico">
         <title ng-bind="inverterTypeName + ' <> ' + inverterName"></title>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
         <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
         <!--Deaktivate Chaching to avoid problems-->
         <meta http-equiv="cache-control: private, max-age=0, no-cache" content="no-store" />
         <meta http-equiv="expires" content="0" />
         <meta http-equiv="pragma" content="no-cache" />
      
         <!-- compiled CSS -->
         <link rel="stylesheet" type="text/css" href="assets/kbApp-1.1.6.css"/>
         
      </head>
      <body>
      <!-- Loading -->
      <div kb-Hide-After-Init class = "loader" style="z-index: 3000">
         <div class="loader-inner-big">
            <i class="icon-spinner animate-spin"></i>
            <div id="errorMsg"></div>
         </div>
      </div>
      <!-- Page -->
      <div class="kbContainer">
         <div class="kbBanner">
            <div class="kbLogoPrim"></div>
            <div class="kbLogoSec"></div>
            <div class="kbLanguageSelectBar" ng-controller="languageSelCtrl">
               <div ng-repeat="language in languages">
                  <div kb-language-select-item></div>
               </div>
            </div>
         </div>
         <div class="kbPage">
            <div class="kbDivider"></div>
            <div class="kbNav" ng-controller="navigationCtrl">
               <kb-navigation nodes="menu"></kb-navigation>
               <div class="kbLogoSlogan"></div>
            </div>
            <div class="kbContent">
               <div class="kbContentHeading">
                  <div class="kbInfo">
                     <div class="kbInverter">
                        <span class="inverterType"> {{inverterTypeName}}</span>
                        <span class="inverterName"> ({{inverterName}})</span>
                     </div>
                     <div class="kbUserAndDate">
                        <div><i class="icon-calendar"><span>{{appDate | date:'short'}}</span></i></div>
                        <div><i class="icon-user"><span>{{appUserTranslationId | translate}}</span></i></div>
                     </div>
                  </div>
                  <div class="kbNavTitle" ng-controller="navigationCtrl">
                     <kb-navigation-breadcrumb breadcrumbs="breadcrumbs"></kb-navigation-breadcrumb>
                  </div>
               </div>
               <div class="kbContentView">
                  <div ng-show="appPageInfo.loadingInProgress" ng-cloak class = "loader" style="z-index: 2000">
                     <div class="loader-inner">
                        <i class="icon-spinner animate-spin"></i>
                     </div>
                  </div>
                  <div ng-show="appPageInfo.loadingFailed" ng-cloak class = "loader" style="z-index: 2000">
                     <div class="loader-inner">
                        <i class="icon-error"></i>
                     </div>
                  </div>
                  <div ng-show="appPageInfo.submitInProgress" ng-cloak class = "loader-transparent" style="z-index: 2000">
                     <div class="loader-inner">
                        <i class="icon-spinner animate-spin"></i>
                     </div>
                  </div>
                  <div class="kbView" ng-view></div>
                  <div class="kbViewInfo" ng-show="appPageInfo.submitSuccessful || appPageInfo.submitFailed">
                     <div ng-show="appPageInfo.submitSuccessful">
                        <i class="icon-ok info-ok">{{appPageInfo.displayMsgId | translate}}</i>
                     </div>
                     <div ng-show="appPageInfo.submitFailed">
                        <i class="icon-error info-error">{{appPageInfo.displayMsgId | translate}}</i>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <div class="kbFooter">
            <div class="kbWebversion">v1.1.6</div>
         </div>
      </div>
      
      <!-- compiled JavaScript -->
      <script type="text/javascript" src="assets/kbApp-1.1.6.js"></script>
      
      </body>
      </html>
      
      
      
      
      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @MartyBr last edited by

        @martybr nee, taugt alles nichts.

        ich galube das ist hier auch der falsche Thread.
        bin aber auch nicht mehr sicher, weil es immer drüber und drunter geht.

        Zumindest anfangs ging es um die FW <5.3

        @martybr sagte in Status vom Kostal Wechselrichter auslesen?:

        Die Firmware vom Piko ist die 6.11.

        sollte damit nicht funktionieren.

        welches Script nutzst du denn genau?

        M 2 Replies Last reply Reply Quote 0
        • M
          MartyBr @Homoran last edited by

          @homoran
          das hier:

          Alle Werte kommen bis auf die Werte vom String 3:

          
          // Ausleseskript Wechselrichter Kostal Piko ab Firmware v05.31 (12.10.2015)
          
          //Variable
          
          var url = '192.168.178.77'; // IP der Photovoltaik-Anlage eintragen
          var IPAnlage = url + '/api/dxs.json'; 
          
          //Leistungswerte
             ID_DCEingangGesamt = 33556736;         // in W
             ID_Ausgangsleistung = 67109120;        // in W
             ID_Eigenverbrauch = 83888128;          // in W
             
             //Status
             ID_Status = 16780032;                  // 0:Off
             
             //Statistik - Tag
             ID_Ertrag_d = 251658754;               // in Wh
             ID_Hausverbrauch_d = 251659010;        // in Wh
             ID_Eigenverbrauch_d = 251659266;       // in Wh
             ID_Eigenverbrauchsquote_d = 251659278; // in %
             ID_Autarkiegrad_d = 251659279;         // in %
             
             //Statistik - Gesamt
             ID_Ertrag_G = 251658753;               // in kWh
             ID_Hausverbrauch_G = 251659009;        // in kWh
             ID_Eigenverbrauch_G = 251659265;       // in kWh
             ID_Eigenverbrauchsquote_G = 251659280; // in %
             ID_Autarkiegrad_G = 251659281;         // in %
             ID_Betriebszeit = 251658496;           // in h
             
             //Momentanwerte - PV Generator
             ID_DC1Spannung = 33555202;             // in V
             ID_DC1Strom = 33555201;                // in A
             ID_DC1Leistung = 33555203;             // in W
             ID_DC2Spannung = 33555458;             // in V
             ID_DC2Strom = 33555457;                // in A
             ID_DC2Leistung = 33555459;             // in W
             
             //Momentanwerte Haus
             ID_HausverbrauchSolar = 83886336;      // in W
             ID_HausverbrauchBatterie = 83886592;   // in W
             ID_HausverbrauchNetz = 83886848;       // in W
             ID_HausverbrauchPhase1 = 83887106;     // in W
             ID_HausverbrauchPhase2 = 83887362;     // in W
             ID_HausverbrauchPhase3 = 83887618;     // in W
             
             //Netz Netzparameter
             ID_NetzAusgangLeistung = 67109120;     // in W
             ID_NetzFrequenz = 67110400;            // in Hz
             ID_NetzCosPhi = 67110656;
             
             //Netz Phase 1
             ID_P1Spannung = 67109378;              // in V
             ID_P1Strom = 67109377;                 // in A
             ID_P1Leistung = 67109379;              // in W
             
             //Netz Phase 2
             ID_P2Spannung = 67109634;              // in V
             ID_P2Strom = 67109633;                 // in A
             ID_P2Leistung = 67109635;              // in W
             
             //Netz Phase 3
             ID_P3Spannung = 67109890;              // in V
             ID_P3Strom = 67109889;                 // in A
             ID_P3Leistung = 67109891;              // in W
          
          
          
          
          
          
          
          createState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', 0);
          createState('Solaranlage.Summenwerte.Autarkiegrad_d',0);
          createState('Solaranlage.Summenwerte.Autarkiegrad_G',0);
          createState('Solaranlage.Summenwerte.Betriebszeit',0);
          createState('Solaranlage.Momentanwerte.Status','aus');
          createState('Solaranlage.Momentanwerte.Leistung_DC_aktuell',0);
          createState('Solaranlage.Momentanwerte.Eigenverbrauch',0);
          createState('Solaranlage.Summenwerte.Eigenverbrauch_d');
          createState('Solaranlage.Summenwerte.Eigenverbrauch_G', 0);
          createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', 0);
          createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', 0);
          createState('Solaranlage.Summenwerte.Tagesertrag', 0);
          createState('Solaranlage.Summenwerte.Gesamtertrag', 0);
          createState('Solaranlage.Summenwerte.Hausverbrauch_d', 0);
          createState('Solaranlage.Summenwerte.Hausverbrauch_G', 0);
          createState('Solaranlage.Momentanwerte.P1Spannung');
          createState('Solaranlage.Momentanwerte.P2Spannung');
          createState('Solaranlage.Momentanwerte.P1Strom');
          createState('Solaranlage.Momentanwerte.P2Strom');
          createState('Solaranlage.Momentanwerte.P1Leistung');
          createState('Solaranlage.Momentanwerte.P2Leistung');
          createState('Solaranlage.Momentanwerte.Leistung_String1');
          createState('Solaranlage.Momentanwerte.Leistung_String2');
          
          
          var logging = false;
          var request = require('request');
          
          function Piko() {
             if (logging) log("Piko 5.5 auslesen");
             request('http://' + IPAnlage + 
             '?dxsEntries=' + ID_DCEingangGesamt +
             '&dxsEntries=' + ID_Ausgangsleistung +
             '&dxsEntries=' + ID_Eigenverbrauch +
             '&dxsEntries=' + ID_Eigenverbrauch_d +
             '&dxsEntries=' + ID_Eigenverbrauch_G +
             '&dxsEntries=' + ID_Eigenverbrauchsquote_d +
             '&dxsEntries=' + ID_Eigenverbrauchsquote_G +
             '&dxsEntries=' + ID_Ertrag_d +
             '&dxsEntries=' + ID_Ertrag_G +
             '&dxsEntries=' + ID_Hausverbrauch_d +
             '&dxsEntries=' + ID_Hausverbrauch_G +
             '&dxsEntries=' + ID_Autarkiegrad_G +
             '&dxsEntries=' + ID_Autarkiegrad_d +
             '&dxsEntries=' + ID_Betriebszeit +
             '&dxsEntries=' + ID_P1Spannung +
             '&dxsEntries=' + ID_P2Spannung +
             '&dxsEntries=' + ID_P1Strom +
             '&dxsEntries=' + ID_P2Strom +
             '&dxsEntries=' + ID_P1Leistung +
             '&dxsEntries=' + ID_P2Leistung +
             '&dxsEntries=' + ID_Status +
             '&dxsEntries=' + ID_DC1Leistung +
             '&dxsEntries=' + ID_DC2Leistung,
             
             function (error, response, body) {
                 if(!error && response.statusCode ==200) {
                     if(logging) log(body);
                     var result = JSON.parse(body).dxsEntries;
             		
             		var Zustand = 'aus';
          
             		if (result[20].val == 0) {
                     Zustand = 'aus';
                     } else if (result[20].value== 1) {
                     Zustand = 'Leerlauf';
                     } else if (result[20].value == 2) {
                     Zustand = 'Anfahren';
                     } else if (result[20].value == 3) {
                     Zustand = 'Einspeisen MPP';
                     } else if (result[20].value == 4) {
                     Zustand = 'Einspeisen abgeregelt';
                     } else if (result[20].value == 7) {
                     Zustand = 'Isolationsmessung';
                     } else {
                     Zustand = (String('Code ') + String('' + result[20].value));
                     }
                 
             		
             		
                     setState('Solaranlage.Momentanwerte.Leistung_DC_aktuell', result[0].value || 0, true);
                     setState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', result[1].value || 0, true);
                     setState('Solaranlage.Momentanwerte.Eigenverbrauch', result[2].value || 0, true);
                     setState('Solaranlage.Summenwerte.Eigenverbrauch_d', result[3].value || 0, true);
                     setState('Solaranlage.Summenwerte.Eigenverbrauch_G', result[4].value || 0, true);
                     setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', result[5].value || 0, true);
                     setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', result[6].value || 0, true);
                     setState('Solaranlage.Summenwerte.Tagesertrag', result[7].value || 0, true);
                     setState('Solaranlage.Summenwerte.Gesamtertrag', result[8].value || 0, true);
                     setState('Solaranlage.Summenwerte.Hausverbrauch_d', result[9].value || 0, true);
                     setState('Solaranlage.Summenwerte.Hausverbrauch_G', result[10].value || 0, true);
                     setState('Solaranlage.Summenwerte.Autarkiegrad_G', result[11].value || 0, true);
                     setState('Solaranlage.Summenwerte.Autarkiegrad_d', result[12].value || 0, true);
                     setState('Solaranlage.Summenwerte.Betriebszeit', result[13].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P1Spannung', result[14].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P2Spannung', result[15].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P1Strom', result[16].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P2Strom', result[17].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P1Leistung', result[18].value || 0, true);
                     setState('Solaranlage.Momentanwerte.P2Leistung', result[19].value || 0, true);
                     setState('Solaranlage.Momentanwerte.Status', Zustand || 0, true);
                     setState('Solaranlage.Momentanwerte.Leistung_String1', result[21].value || 0, true);
                     setState('Solaranlage.Momentanwerte.Leistung_String2', result[22].value || 0, true);
                 } else {
                     log("Fehler: " + error + " bei Abfrage von: " + url, "warn");
                 }
             });
          }
          
          schedule("*/11 * 5-23 * * *", Piko);
          //on('smartmeter.0.1-0:16_7_0__255.value', Piko); // triggert bei Wertänderung;
          
          
          Homoran 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @MartyBr last edited by

            @martybr sagte in Status vom Kostal Wechselrichter auslesen?:

            das hier:

            das gehört aber hier "eigentlich" nicht rein

            @martybr sagte in Status vom Kostal Wechselrichter auslesen?:

            Alle Werte kommen bis auf die Werte vom String 3:

            den hat mein WR ja auch nicht geliefert.

            dazu brauche ich, was das Skript aus deinem WR abruft

            M 1 Reply Last reply Reply Quote 0
            • M
              MartyBr @Homoran last edited by

              @homoran

              Ich habe in diesem "Test-Script" die Werte für den String 3 ergänzt. Es kommen da leider Errors, meine angepasste Version läuft nicht:

              
              // Ausleseskript Wechselrichter Kostal Piko ab Firmware v05.31 (12.10.2015)
              
              //Variable
              
              var url = '192.168.178.77'; // IP der Photovoltaik-Anlage eintragen
              var IPAnlage = url + '/api/dxs.json'; 
              
              //Leistungswerte
                 ID_DCEingangGesamt = 33556736;         // in W
                 ID_Ausgangsleistung = 67109120;        // in W
                 ID_Eigenverbrauch = 83888128;          // in W
                 
                 //Status
                 ID_Status = 16780032;                  // 0:Off
                 
                 //Statistik - Tag
                 ID_Ertrag_d = 251658754;               // in Wh
                 ID_Hausverbrauch_d = 251659010;        // in Wh
                 ID_Eigenverbrauch_d = 251659266;       // in Wh
                 ID_Eigenverbrauchsquote_d = 251659278; // in %
                 ID_Autarkiegrad_d = 251659279;         // in %
                 
                 //Statistik - Gesamt
                 ID_Ertrag_G = 251658753;               // in kWh
                 ID_Hausverbrauch_G = 251659009;        // in kWh
                 ID_Eigenverbrauch_G = 251659265;       // in kWh
                 ID_Eigenverbrauchsquote_G = 251659280; // in %
                 ID_Autarkiegrad_G = 251659281;         // in %
                 ID_Betriebszeit = 251658496;           // in h
                 
                 //Momentanwerte - PV Generator
                 ID_DC1Spannung = 33555202;             // in V
                 ID_DC1Strom = 33555201;                // in A
                 ID_DC1Leistung = 33555203;             // in W
                 ID_DC2Spannung = 33555458;             // in V
                 ID_DC2Strom = 33555457;                // in A
                 ID_DC2Leistung = 33555459;             // in W
                 
                 //Momentanwerte Haus
                 ID_HausverbrauchSolar = 83886336;      // in W
                 ID_HausverbrauchBatterie = 83886592;   // in W
                 ID_HausverbrauchNetz = 83886848;       // in W
                 ID_HausverbrauchPhase1 = 83887106;     // in W
                 ID_HausverbrauchPhase2 = 83887362;     // in W
                 ID_HausverbrauchPhase3 = 83887618;     // in W
                 
                 //Netz Netzparameter
                 ID_NetzAusgangLeistung = 67109120;     // in W
                 ID_NetzFrequenz = 67110400;            // in Hz
                 ID_NetzCosPhi = 67110656;
                 
                 //Netz Phase 1
                 ID_P1Spannung = 67109378;              // in V
                 ID_P1Strom = 67109377;                 // in A
                 ID_P1Leistung = 67109379;              // in W
                 
                 //Netz Phase 2
                 ID_P2Spannung = 67109634;              // in V
                 ID_P2Strom = 67109633;                 // in A
                 ID_P2Leistung = 67109635;              // in W
                 
                 //Netz Phase 3
                 ID_P3Spannung = 67109890;              // in V
                 ID_P3Strom = 67109889;                 // in A
                 ID_P3Leistung = 67109891;              // in W
              
              
              
              
              
              
              
              createState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', 0);
              createState('Solaranlage.Summenwerte.Autarkiegrad_d',0);
              createState('Solaranlage.Summenwerte.Autarkiegrad_G',0);
              createState('Solaranlage.Summenwerte.Betriebszeit',0);
              createState('Solaranlage.Momentanwerte.Status','aus');
              createState('Solaranlage.Momentanwerte.Leistung_DC_aktuell',0);
              createState('Solaranlage.Momentanwerte.Eigenverbrauch',0);
              createState('Solaranlage.Summenwerte.Eigenverbrauch_d');
              createState('Solaranlage.Summenwerte.Eigenverbrauch_G', 0);
              createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', 0);
              createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', 0);
              createState('Solaranlage.Summenwerte.Tagesertrag', 0);
              createState('Solaranlage.Summenwerte.Gesamtertrag', 0);
              createState('Solaranlage.Summenwerte.Hausverbrauch_d', 0);
              createState('Solaranlage.Summenwerte.Hausverbrauch_G', 0);
              createState('Solaranlage.Momentanwerte.P1Spannung');
              createState('Solaranlage.Momentanwerte.P2Spannung');
              createState('Solaranlage.Momentanwerte.P3Spannung');
              createState('Solaranlage.Momentanwerte.P1Strom');
              createState('Solaranlage.Momentanwerte.P2Strom');
              createState('Solaranlage.Momentanwerte.P3Strom');
              createState('Solaranlage.Momentanwerte.P1Leistung');
              createState('Solaranlage.Momentanwerte.P2Leistung');
              createState('Solaranlage.Momentanwerte.P3Leistung');
              createState('Solaranlage.Momentanwerte.Leistung_String1');
              createState('Solaranlage.Momentanwerte.Leistung_String2');
              createState('Solaranlage.Momentanwerte.Leistung_String3');
              
              
              var logging = false;
              var request = require('request');
              
              function Piko() {
                 if (logging) log("Piko 5.5 auslesen");
                 request('http://' + IPAnlage + 
                 '?dxsEntries=' + ID_DCEingangGesamt +
                 '&dxsEntries=' + ID_Ausgangsleistung +
                 '&dxsEntries=' + ID_Eigenverbrauch +
                 '&dxsEntries=' + ID_Eigenverbrauch_d +
                 '&dxsEntries=' + ID_Eigenverbrauch_G +
                 '&dxsEntries=' + ID_Eigenverbrauchsquote_d +
                 '&dxsEntries=' + ID_Eigenverbrauchsquote_G +
                 '&dxsEntries=' + ID_Ertrag_d +
                 '&dxsEntries=' + ID_Ertrag_G +
                 '&dxsEntries=' + ID_Hausverbrauch_d +
                 '&dxsEntries=' + ID_Hausverbrauch_G +
                 '&dxsEntries=' + ID_Autarkiegrad_G +
                 '&dxsEntries=' + ID_Autarkiegrad_d +
                 '&dxsEntries=' + ID_Betriebszeit +
                 '&dxsEntries=' + ID_P1Spannung +
                 '&dxsEntries=' + ID_P2Spannung +
                 '&dxsEntries=' + ID_P1Strom +
                 '&dxsEntries=' + ID_P2Strom +
                 '&dxsEntries=' + ID_P1Leistung +
                 '&dxsEntries=' + ID_P2Leistung +
                 '&dxsEntries=' + ID_Status +
                 '&dxsEntries=' + ID_DC1Leistung +
                 '&dxsEntries=' + ID_DC2Leistung +
                 '&dxsEntries=' + ID_P3Spannung +    // 23
                 '&dxsEntries=' + ID_P3Strom +       // 24
                 '&dxsEntries=' + ID_DC3Leistung,    //25
                 
                 function (error, response, body) {
                     if(!error && response.statusCode ==200) {
                         if(logging) log(body);
                         var result = JSON.parse(body).dxsEntries;
                 		
                 		var Zustand = 'aus';
              
                 		if (result[20].val == 0) {
                         Zustand = 'aus';
                         } else if (result[20].value== 1) {
                         Zustand = 'Leerlauf';
                         } else if (result[20].value == 2) {
                         Zustand = 'Anfahren';
                         } else if (result[20].value == 3) {
                         Zustand = 'Einspeisen MPP';
                         } else if (result[20].value == 4) {
                         Zustand = 'Einspeisen abgeregelt';
                         } else if (result[20].value == 7) {
                         Zustand = 'Isolationsmessung';
                         } else {
                         Zustand = (String('Code ') + String('' + result[20].value));
                         }
                     
                 		
                 		
                         setState('Solaranlage.Momentanwerte.Leistung_DC_aktuell', result[0].value || 0, true);
                         setState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', result[1].value || 0, true);
                         setState('Solaranlage.Momentanwerte.Eigenverbrauch', result[2].value || 0, true);
                         setState('Solaranlage.Summenwerte.Eigenverbrauch_d', result[3].value || 0, true);
                         setState('Solaranlage.Summenwerte.Eigenverbrauch_G', result[4].value || 0, true);
                         setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', result[5].value || 0, true);
                         setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', result[6].value || 0, true);
                         setState('Solaranlage.Summenwerte.Tagesertrag', result[7].value || 0, true);
                         setState('Solaranlage.Summenwerte.Gesamtertrag', result[8].value || 0, true);
                         setState('Solaranlage.Summenwerte.Hausverbrauch_d', result[9].value || 0, true);
                         setState('Solaranlage.Summenwerte.Hausverbrauch_G', result[10].value || 0, true);
                         setState('Solaranlage.Summenwerte.Autarkiegrad_G', result[11].value || 0, true);
                         setState('Solaranlage.Summenwerte.Autarkiegrad_d', result[12].value || 0, true);
                         setState('Solaranlage.Summenwerte.Betriebszeit', result[13].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P1Spannung', result[14].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P2Spannung', result[15].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P1Strom', result[16].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P2Strom', result[17].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P1Leistung', result[18].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P2Leistung', result[19].value || 0, true);
                         setState('Solaranlage.Momentanwerte.Status', Zustand || 0, true);
                         setState('Solaranlage.Momentanwerte.Leistung_String1', result[21].value || 0, true);
                         setState('Solaranlage.Momentanwerte.Leistung_String2', result[22].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P3Spannung', result[23].value || 0, true);
                         setState('Solaranlage.Momentanwerte.P3Strom', result[24].value || 0, true);
                         setState('Solaranlage.Momentanwerte.Leistung_String3', result[25].value || 0, true);
                     } else {
                         log("Fehler: " + error + " bei Abfrage von: " + url, "warn");
                     }
                 });
              }
              
              schedule("*/11 * 5-23 * * *", Piko);
              //on('smartmeter.0.1-0:16_7_0__255.value', Piko); // triggert bei Wertänderung;
              
              

              Liefert Fehler:

              15:59:11.002 error javascript.0 (1899) at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)
              15:59:22.001 error javascript.0 (1899) at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)
              15:59:33.002 error javascript.0 (1899) at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)

              Homoran 1 Reply Last reply Reply Quote 0
              • M
                MartyBr @Homoran last edited by

                @homoran

                Meinst du die Datenpunkte?

                Bildschirmfoto 2021-10-04 um 16.02.32.png

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

                  @martybr sagte in Status vom Kostal Wechselrichter auslesen?:

                  die Werte für den String 3 ergänzt

                  wo?
                  ich sehe die ID für den String 3 nicht.
                  Woher hast du denn diese Zaahl

                  1 Reply Last reply Reply Quote 0
                  • M
                    MartyBr @MartyBr last edited by

                    @Homoran

                    Hier noch Log-Meldungen:

                    
                    javascript.0
                    2021-10-04 16:08:22.003	error	at processTimers (internal/timers.js:500:7)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at listOnTimeout (internal/timers.js:557:17)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:228:7)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:268:28
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at Job.invoke (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Job.js:168:15)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1313:34)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)
                    
                    javascript.0
                    2021-10-04 16:08:22.002	error	Error in callback: ReferenceError: ID_DC3Leistung is not defined
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at processTimers (internal/timers.js:500:7)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at listOnTimeout (internal/timers.js:557:17)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:228:7)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:268:28
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Job.invoke (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Job.js:168:15)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1313:34)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)
                    
                    javascript.0
                    2021-10-04 16:08:11.002	error	Error in callback: ReferenceError: ID_DC3Leistung is not defined
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at processTimers (internal/timers.js:500:7)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at listOnTimeout (internal/timers.js:557:17)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:228:7)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:268:28
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Job.invoke (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Job.js:168:15)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1313:34)
                    
                    javascript.0
                    2021-10-04 16:08:11.003	error	at Object.Piko (script.js.Photovoltaik.Kostal-Piko-Test:133:21)
                    
                    javascript.0
                    2021-10-04 16:08:11.002	error	Error in callback: ReferenceError: ID_DC3Leistung is not defined
                    
                    
                    Homoran 2 Replies Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @MartyBr last edited by

                      @martybr was ergibt bei dir:

                      <IP>/api/dxs.json?dxsEntries=33555459

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        MartyBr @Homoran last edited by

                        @homoran sagte in Status vom Kostal Wechselrichter auslesen?:

                        <IP>/api/dxs.json?dxsEntries=33555459

                        {"dxsEntries":[{"dxsId":33555459,"value":163.961151}],"session":{"sessionId":0,"roleId":0},"status":{"code":0}}
                        
                        Glasfaser Homoran 2 Replies Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @MartyBr last edited by Homoran

                          @martybr

                          // Ausleseskript Wechselrichter Kostal Piko ab Firmware v05.31 (12.10.2015)
                          
                          //Variable
                          
                          var url = '192.168.178.77'; // IP der Photovoltaik-Anlage eintragen
                          var IPAnlage = url + '/api/dxs.json'; 
                          
                          //Leistungswerte
                             ID_DCEingangGesamt = 33556736;         // in W
                             ID_Ausgangsleistung = 67109120;        // in W
                             ID_Eigenverbrauch = 83888128;          // in W
                             
                             //Status
                             ID_Status = 16780032;                  // 0:Off
                             
                             //Statistik - Tag
                             ID_Ertrag_d = 251658754;               // in Wh
                             ID_Hausverbrauch_d = 251659010;        // in Wh
                             ID_Eigenverbrauch_d = 251659266;       // in Wh
                             ID_Eigenverbrauchsquote_d = 251659278; // in %
                             ID_Autarkiegrad_d = 251659279;         // in %
                             
                             //Statistik - Gesamt
                             ID_Ertrag_G = 251658753;               // in kWh
                             ID_Hausverbrauch_G = 251659009;        // in kWh
                             ID_Eigenverbrauch_G = 251659265;       // in kWh
                             ID_Eigenverbrauchsquote_G = 251659280; // in %
                             ID_Autarkiegrad_G = 251659281;         // in %
                             ID_Betriebszeit = 251658496;           // in h
                             
                             //Momentanwerte - PV Generator
                             ID_DC1Spannung = 33555202;             // in V
                             ID_DC1Strom = 33555201;                // in A
                             ID_DC1Leistung = 33555203;             // in W
                             ID_DC2Spannung = 33555458;             // in V
                             ID_DC2Strom = 33555457;                // in A
                             ID_DC2Leistung = 33555459;             // in W
                             ID_DC3Spannung = 33555714;             // in V
                             ID_DC3Strom = 33555713;                // in A
                             ID_DC3Leistung = 33555715;             // in W
                             
                             //Momentanwerte Haus
                             ID_HausverbrauchSolar = 83886336;      // in W
                             ID_HausverbrauchBatterie = 83886592;   // in W
                             ID_HausverbrauchNetz = 83886848;       // in W
                             ID_HausverbrauchPhase1 = 83887106;     // in W
                             ID_HausverbrauchPhase2 = 83887362;     // in W
                             ID_HausverbrauchPhase3 = 83887618;     // in W
                             
                             //Netz Netzparameter
                             ID_NetzAusgangLeistung = 67109120;     // in W
                             ID_NetzFrequenz = 67110400;            // in Hz
                             ID_NetzCosPhi = 67110656;
                             
                             //Netz Phase 1
                             ID_P1Spannung = 67109378;              // in V
                             ID_P1Strom = 67109377;                 // in A
                             ID_P1Leistung = 67109379;              // in W
                             
                             //Netz Phase 2
                             ID_P2Spannung = 67109634;              // in V
                             ID_P2Strom = 67109633;                 // in A
                             ID_P2Leistung = 67109635;              // in W
                             
                             //Netz Phase 3
                             ID_P3Spannung = 67109890;              // in V
                             ID_P3Strom = 67109889;                 // in A
                             ID_P3Leistung = 67109891;              // in W
                          
                          
                          
                          
                          
                          
                          
                          createState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', 0);
                          createState('Solaranlage.Summenwerte.Autarkiegrad_d',0);
                          createState('Solaranlage.Summenwerte.Autarkiegrad_G',0);
                          createState('Solaranlage.Summenwerte.Betriebszeit',0);
                          createState('Solaranlage.Momentanwerte.Status','aus');
                          createState('Solaranlage.Momentanwerte.Leistung_DC_aktuell',0);
                          createState('Solaranlage.Momentanwerte.Eigenverbrauch',0);
                          createState('Solaranlage.Summenwerte.Eigenverbrauch_d');
                          createState('Solaranlage.Summenwerte.Eigenverbrauch_G', 0);
                          createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', 0);
                          createState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', 0);
                          createState('Solaranlage.Summenwerte.Tagesertrag', 0);
                          createState('Solaranlage.Summenwerte.Gesamtertrag', 0);
                          createState('Solaranlage.Summenwerte.Hausverbrauch_d', 0);
                          createState('Solaranlage.Summenwerte.Hausverbrauch_G', 0);
                          createState('Solaranlage.Momentanwerte.P1Spannung');
                          createState('Solaranlage.Momentanwerte.P2Spannung');
                          createState('Solaranlage.Momentanwerte.P3Spannung');
                          createState('Solaranlage.Momentanwerte.P1Strom');
                          createState('Solaranlage.Momentanwerte.P2Strom');
                          createState('Solaranlage.Momentanwerte.P3Strom');
                          createState('Solaranlage.Momentanwerte.P1Leistung');
                          createState('Solaranlage.Momentanwerte.P2Leistung');
                          createState('Solaranlage.Momentanwerte.P3Leistung');
                          createState('Solaranlage.Momentanwerte.Leistung_String1');
                          createState('Solaranlage.Momentanwerte.Leistung_String2');
                          createState('Solaranlage.Momentanwerte.Leistung_String3');
                          
                          
                          var logging = false;
                          var request = require('request');
                          
                          function Piko() {
                             if (logging) log("Piko 5.5 auslesen");
                             request('http://' + IPAnlage + 
                             '?dxsEntries=' + ID_DCEingangGesamt +
                             '&dxsEntries=' + ID_Ausgangsleistung +
                             '&dxsEntries=' + ID_Eigenverbrauch +
                             '&dxsEntries=' + ID_Eigenverbrauch_d +
                             '&dxsEntries=' + ID_Eigenverbrauch_G +
                             '&dxsEntries=' + ID_Eigenverbrauchsquote_d +
                             '&dxsEntries=' + ID_Eigenverbrauchsquote_G +
                             '&dxsEntries=' + ID_Ertrag_d +
                             '&dxsEntries=' + ID_Ertrag_G +
                             '&dxsEntries=' + ID_Hausverbrauch_d +
                             '&dxsEntries=' + ID_Hausverbrauch_G +
                             '&dxsEntries=' + ID_Autarkiegrad_G +
                             '&dxsEntries=' + ID_Autarkiegrad_d +
                             '&dxsEntries=' + ID_Betriebszeit +
                             '&dxsEntries=' + ID_P1Spannung +
                             '&dxsEntries=' + ID_P2Spannung +
                             '&dxsEntries=' + ID_P1Strom +
                             '&dxsEntries=' + ID_P2Strom +
                             '&dxsEntries=' + ID_P1Leistung +
                             '&dxsEntries=' + ID_P2Leistung +
                             '&dxsEntries=' + ID_Status +
                             '&dxsEntries=' + ID_DC1Leistung +
                             '&dxsEntries=' + ID_DC2Leistung +
                             '&dxsEntries=' + ID_P3Spannung +    // 23
                             '&dxsEntries=' + ID_P3Strom +       // 24
                             '&dxsEntries=' + ID_DC3Leistung,    //25
                             
                             function (error, response, body) {
                                 if(!error && response.statusCode ==200) {
                                     if(logging) log(body);
                                     var result = JSON.parse(body).dxsEntries;
                             		
                             		var Zustand = 'aus';
                          
                             		if (result[20].val == 0) {
                                     Zustand = 'aus';
                                     } else if (result[20].value== 1) {
                                     Zustand = 'Leerlauf';
                                     } else if (result[20].value == 2) {
                                     Zustand = 'Anfahren';
                                     } else if (result[20].value == 3) {
                                     Zustand = 'Einspeisen MPP';
                                     } else if (result[20].value == 4) {
                                     Zustand = 'Einspeisen abgeregelt';
                                     } else if (result[20].value == 7) {
                                     Zustand = 'Isolationsmessung';
                                     } else {
                                     Zustand = (String('Code ') + String('' + result[20].value));
                                     }
                                 
                             		
                             		
                                     setState('Solaranlage.Momentanwerte.Leistung_DC_aktuell', result[0].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.Leistung_AC_aktuell', result[1].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.Eigenverbrauch', result[2].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Eigenverbrauch_d', result[3].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Eigenverbrauch_G', result[4].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_d', result[5].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Eigenverbrauchsquote_G', result[6].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Tagesertrag', result[7].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Gesamtertrag', result[8].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Hausverbrauch_d', result[9].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Hausverbrauch_G', result[10].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Autarkiegrad_G', result[11].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Autarkiegrad_d', result[12].value || 0, true);
                                     setState('Solaranlage.Summenwerte.Betriebszeit', result[13].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P1Spannung', result[14].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P2Spannung', result[15].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P1Strom', result[16].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P2Strom', result[17].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P1Leistung', result[18].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P2Leistung', result[19].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.Status', Zustand || 0, true);
                                     setState('Solaranlage.Momentanwerte.Leistung_String1', result[21].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.Leistung_String2', result[22].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P3Spannung', result[23].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.P3Strom', result[24].value || 0, true);
                                     setState('Solaranlage.Momentanwerte.Leistung_String3', result[25].value || 0, true);
                                 } else {
                                     log("Fehler: " + error + " bei Abfrage von: " + url, "warn");
                                 }
                             });
                          }
                          
                          schedule("*/11 * 5-23 * * *", Piko);
                          //on('smartmeter.0.1-0:16_7_0__255.value', Piko); // triggert bei Wertänderung;
                          

                          1 Reply Last reply Reply Quote 0
                          • Glasfaser
                            Glasfaser @MartyBr last edited by

                            @martybr
                            ID_DC3Leistung fehlt

                             //Momentanwerte - PV Generator
                               ID_DC1Spannung = 33555202;             // in V
                               ID_DC1Strom = 33555201;                // in A
                               ID_DC1Leistung = 33555203;             // in W
                               ID_DC2Spannung = 33555458;             // in V
                               ID_DC2Strom = 33555457;                // in A
                               ID_DC2Leistung = 33555459;             // in W
                               ID_DC3Leistung =                              // in W
                            
                            Homoran 1 Reply Last reply Reply Quote 0
                            • Homoran
                              Homoran Global Moderator Administrators @MartyBr last edited by

                              @martybr ist das die Leistung von String 2?

                              wenn ja mal mit <IP>/api/dxs.json?dxsEntries=33555715 versuchen

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

                                @glasfaser sach ich doch!

                                ich habe google bemüht und bastel gerade -

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

                                  @homoran

                                  Sorry 😉

                                  Homoran 2 Replies Last reply Reply Quote 0
                                  • Homoran
                                    Homoran Global Moderator Administrators @Glasfaser last edited by

                                    @glasfaser klar doch!
                                    siehe edit und spoiler

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

                                      @glasfaser du kannst gerne gleich übernehmen.
                                      Als Programmiernoob bin ich gleich am Ende meiner Kenntnisse, zumal ich nicht per trial und error bei mir so lange testen kann bis es läuft

                                      Der Spoiler müsste jetzt soweit passen hoffe ich
                                      kannst du dir den mal ansehen, bitte.

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

                                        @homoran

                                        setState('Solaranlage.Momentanwerte.P3Spannung', result[23].value || 0, true);
                                                   setState('Solaranlage.Momentanwerte.P3Strom', result[24].value || 0, true);
                                                   setState('Solaranlage.Momentanwerte.Leistung_String3', result[27].value || 0, true);
                                        

                                        kommt da nicht 23 , 24 , result 25

                                        Homoran 1 Reply Last reply Reply Quote 0
                                        • M
                                          MartyBr @Homoran last edited by MartyBr

                                          @homoran sagte in Status vom Kostal Wechselrichter auslesen?:

                                          <IP>/api/dxs.json?dxsEntries=33555715

                                          nein !! Das ist String 3. Ihr so so verdammt schnell, da komme ich nicht mit 😀

                                          Homoran Glasfaser 2 Replies Last reply Reply Quote 0
                                          • Homoran
                                            Homoran Global Moderator Administrators @Glasfaser last edited by Homoran

                                            @glasfaser sagte in Status vom Kostal Wechselrichter auslesen?:

                                            kommt da nicht 23 , 24 , result 25

                                            eben nicht. das stand darin.
                                            ich habe ja 3 Elemente zugefügt (Spannung, Strom und Leistung)

                                            obwohl:
                                            das sind ja nur die IDS, ich hab mir das array gar nicht angesehen 😳

                                            EDIT:
                                            du hast recht, es muss doch 25 sein, da Spannung und Strom nicht im array sind

                                            • werde ich sofort ändern
                                            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

                                            520
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            35
                                            331
                                            57526
                                            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