Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. 99+ errors in 50msec!

    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

    99+ errors in 50msec!

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

      @wendy2702 sagte in 99+ errors in 50msec!:

      also kennst du die scripte und hast sie zum Testen mal gestoppt?

      ja!
      ..und nein, weil das Ganze

      @homoran sagte in 99+ errors in 50msec!:

      insgesamt aber nur ca. 50 msec.

      gedauert hatte.

      @wendy2702 sagte in 99+ errors in 50msec!:

      Welche Versionen in Iob installiert?
      Scripte zeigen.
      Gute Beiträge:-)

      jaja 🙂
      alles veraltet, Skripte sind uralt und von Forenmitgliedern für ich geschrieben worden.
      laufen seit Jahren ohne Probleme.

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

        @crunchip sagte in 99+ errors in 50msec!:

        @homoran und beide in Instanz 1?

        ja!
        hatte mal vor Jahren eine Instanz zerschossen und dann alles nach .1 kopiert . Seitdem läuft alles auf .1

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

          @homoran vielleicht für die 50msec keinen Zugriff auf die IP gehabt.

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

            @wendy2702 sagte in 99+ errors in 50msec!:

            @homoran vielleicht für die 50msec keinen Zugriff auf die IP gehabt.

            möglich.

            mich wunderte nur diese Intensität.
            3x pro Millisekunde.
            das müsste ein automatischer retry o.ä. sein.
            das Skript (ich glaube beide) triggern alle 6 Sekunden.

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

              @homoran das dann natürlich blöd,
              vllt mal die alten logs durchsehen ob das öfter vor kam

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

                @crunchip sagte in 99+ errors in 50msec!:

                ob das öfter vor kam

                nee, meines Wissens noch nie

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

                  @wendy2702 sagte in 99+ errors in 50msec!:

                  Scripte zeigen.

                  var domain = '192.168.138.103'; // domain or ip without http:// or https:// 
                  var url = '/api/dxs.json';
                  var datenpunkt = '0_userdata.0.Solaranlage.Info';
                  //var datenpunkt = 'javascript.0.info';
                  
                  var msgs = [
                  {"code":"3000","type":"Störung Updateprozess","description":"Interne Systemstörung","action":"Update des Wechselrichters durchführen."},
                  {"code":"3003","type":"Interne Kommunikationsstörung","description":"Interne Kommunikationsstörung","action":"zwischen Netzüberwachung und Steuerung Internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten kontrollieren"},
                  {"code":"3006","type":"Interne Systemstörung ","description":"Interne Systemstörung bzgl. Leistungsabregelung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf. Support"},
                  {"code":"3010","type":"Interne Kommunikationsstörung","description":"Interne Kommunikationsstörung","action":"zwischen Steuerung und Kommunkationsplatine Kontrollieren Sie die Uhrzeiteinstellung, Funktionalität der Kommunikationsplatine und weiterer Kommunikationseinstellungen. Wechselrichter schaltet trotz fehlerhaftem Zeitstempel auf"},
                  {"code":"3011","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3012","type":"Störung Varistor","description":"DC-Varistor defekt","action":"Defekten Varistor tauschen"},
                  {"code":"3013","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren"},
                  {"code":"3014","type":"Interne Temperaturstörung","description":"Übertemperatur Prozessor","action":"Installationsbedingungen und Lüfter kontrollieren"},
                  {"code":"3017","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3018","type":"Information","description":"Leistungsabregelung durch externe Vorgaben (Netzbetreiber)","action":"Keine Maßnahme notwendig"},
                  {"code":"3019","type":"Externe Netzstörung","description":"Leistungsabregelung aufgrund eines Netzfehlers (erhöhte Netzfrequenz)","action":"Support"},
                  {"code":"3020","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3021","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3022","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3023","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3024","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3025","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3026","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3027","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3028","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3029","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3030","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren"},
                  {"code":"3031","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf"},
                  {"code":"3032","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3033","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3034","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten"},
                  {"code":"3035","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten"},
                  {"code":"3036","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3037","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3038","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3039","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3045","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf"},
                  {"code":"3046","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf"},
                  {"code":"3047","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3048","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten"},
                  {"code":"3049","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten"},
                  {"code":"3050","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten"},
                  {"code":"3051","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3052","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3053","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3054","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"3055","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten"},
                  {"code":"3056","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3057","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Generatorinstallation/ -auslegung kontrollieren"},
                  {"code":"3059","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Ggf. falsche Ländereinstellung. Support kontaktieren"},
                  {"code":"3060","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktiere"},
                  {"code":"3061","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3062","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3063","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3064","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3065","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3066","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktiere"},
                  {"code":"3068","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten"},
                  {"code":"3070","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3071","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3072","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3073","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3074","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3075","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3076","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Die AC-Spannung ist gegebenenfalls zu niedrig"},
                  {"code":"3079","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten"},
                  {"code":"3080","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten"},
                  {"code":"3082","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3083","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"},
                  {"code":"3084","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren"},
                  {"code":"3085","type":"Interne Temperaturstörung","description":"Übertemperatur Prozessor","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                  {"code":"3086","type":"Information","description":"Leistungsabregelung aufgrund eines Netzfehlers (erhöhte AC-Spannung)","action":"Support"},
                  {"code":"3087","type":"Interne Systemstörung ","description":"Interner Systemfehler","action":"Support kontaktieren"},
                  {"code":"3088","type":"Interne Systemstörung ","description":"Lüftereinheit verschmutzt","action":"Lüftereinheit reinigen"},
                  {"code":"3089","type":"Interne Systemstörung ","description":"Lüftereinheit verschmutzt","action":"Lüftereinheit reinigen"},
                  {"code":"3090","type":"Interne Systemstörung ","description":"Interner Systemfehler","action":"Support kontaktieren"},
                  {"code":"3091","type":"Interne Systemstörung ","description":"Lüfter nicht korrekt angeschlossen","action":"Lüfter-Steckverbindungen prüfe"},
                  {"code":"3092","type":"Interne Systemstörung ","description":"Lüfter nicht korrekt angeschlossen","action":"Lüfter-Steckverbindungen prüfe"},
                  {"code":"3093","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktiere"},
                  {"code":"3094","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktiere"},
                  {"code":"3095","type":"Interne Parametrierungsstörung","description":"Falsche Kalibrierung","action":"Support kontaktiere"},
                  {"code":"3096","type":"Information","description":"Falsche Dimensionierung der PV-Generator","action":"Generatorinstallation/ -auslegung kontrolliere"},
                  {"code":"3097","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktiere"},
                  {"code":"3098","type":"Information","description":"Netz nicht vorhanden","action":"Keine Maßnahme notwendig"},
                  {"code":"3101","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3102","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3103","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3104","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf"},
                  {"code":"3105","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"},
                  {"code":"3106","type":"Information","description":"Falsche Eingabe am KomBoard oder falsche Verdrahtung","action":"Eingabe oder Verdrahtung korriegieren"},
                  {"code":"4100","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support"},
                  {"code":"4101","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support"},
                  {"code":"4102","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support"},
                  {"code":"4103","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support"},
                  {"code":"4104","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support"},
                  {"code":"4105","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support"},
                  {"code":"4106","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support"},
                  {"code":"4110","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support"},
                  {"code":"4121","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4122","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4130","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4131","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4150","type":"Information","description":"Erhöhte Netzfrequenz. Oft gehäuftes Auftreten am Morgen und am Abend.","action":"Installation kontrollieren"},
                  {"code":"4151","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren"},
                  {"code":"4157","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Keine Maßnahme notwendig"},
                  {"code":"4158","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren"},
                  {"code":"4159","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren"},
                  {"code":"4160","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren"},
                  {"code":"4161","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren"},
                  {"code":"4170","type":"Information","description":"Eine Phase ist nicht angeschlossen. Ein Sicherungsautomat wurde nicht eingeschaltet.","action":"Installation kontrollieren"},
                  {"code":"4180","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren"},
                  {"code":"4181","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren "},
                  {"code":"4185","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                  {"code":"4200","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren "},
                  {"code":"4201","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren "},
                  {"code":"4210","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren "},
                  {"code":"4211","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren "},
                  {"code":"4220","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren "},
                  {"code":"4221","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren "},
                  {"code":"4290","type":"Externe Netzstörung","description":"Die Netzfrequenz hat sich zu schnell verändert.","action":"Generatorinstallation kontrollieren "},
                  {"code":"4300","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4301","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4302","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4303","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4304","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4321","type":"Interne Parametrierungsstörung","description":"Defektes EEPROM unerlaubte Speicherzugriffe","action":"Support"},
                  {"code":"4322","type":"Interne Parametrierungsstörung","description":"Softwarefehler","action":"Support kontaktieren"},
                  {"code":"4323","type":"Interne Parametrierungsstörung","description":"Fehlerstrom","action":"Support"},
                  {"code":"4324","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support"},
                  {"code":"4325","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support"},
                  {"code":"4340","type":"-","description":"","action":""},
                  {"code":"4354","type":"Externer Fehlerstrom","description":"Fehlerstrom","action":"Generatorinstallation kontrollieren "},
                  {"code":"4360","type":"-","description":"","action":""},
                  {"code":"4421","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4422","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren. "},
                  {"code":"4424","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support"},
                  {"code":"4425","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support "},
                  {"code":"4450","type":"Externe Isolationsfehler","description":"Isolationsfehler","action":"Generatorinstallation kontrollieren "},
                  {"code":"4451","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren "},
                  {"code":"4475","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4476","type":"Information","description":"Schwache PV-Versorgung (z.B. morgens)","action":"Keine Maßnahme notwendig "},
                  {"code":"4800","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4801","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support "},
                  {"code":"4802","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4803","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support "},
                  {"code":"4804","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support "},
                  {"code":"4805","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4810","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"4850","type":"Interne Systemstörung ","description":"EVU","action":"Support "},
                  {"code":"4870","type":"-","description":"","action":""},
                  {"code":"7500","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support "},
                  {"code":"7503","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig"}
                  ];
                  
                  
                  
                  function getEvents() {
                    //log('getEvents');
                    var keys = [];
                    var key1 = 234881792;
                    var key2 = 234881537;  
                    keys.push(key1);
                    for (var i=0;i<10;i++) {
                        keys.push(key2+i);
                    }
                  
                    pikorequest(keys, function(response){
                        //log('events: '+ JSON.stringify(response));
                        var item,len;
                        var msga = [];
                        if (typeof response === 'string') response = JSON.parse(response);
                        item = getResponseId(response,234881792);
                        len = item.value;
                        for (var i=0;i<len;i++) {
                            item = getResponseId(response,234881537+i);
                            var d,date,code,env;
                            d = item.value;
                            date = timeConverter((d[0] << 0) + (d[1] << 8) + (d[2] << 16) + (d[3] << 24));
                            code = (d[4] << 0) + (d[5] << 8);
                            env = ("0000"+((d[6] << 0) + (d[7] << 8)).toString(16)).toLocaleUpperCase().substr(-4,4)+'h';
                            var msg = msgs.find(item => item.code==code);
                            msg.date=date;
                            var msgtext = 'Code: '+msg.code+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                            //log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                            //log("Datenpunkt: "+ datenpunkt+i + " Fehlermeldung: " + msgtext + true/*ack*/);
                            setState(datenpunkt+i,`[` + JSON.stringify(msg) +`]`, true/*ack*/);
                         msga.push(JSON.parse(JSON.stringify(msg)));           
                        }
                        setState(datenpunkt, JSON.stringify(msga) , true/*ack*/);
                     });
                  }
                  
                  function pikorequest(keys,callback) {
                    //log('pikorequest');
                    if (keys.length==0) {
                        //log('request error: No keys ');
                        return;     
                    }
                  
                    var query = '';
                  
                    for (var i = 0; i < keys.length; i++) { 
                        query += '&dxsEntries=' + keys[i];
                    }
                  
                    var req_url = 'http://' + domain + url + '?sessionid=iobroker' + query;
                    //log ('query: '+req_url);
                  
                    request(
                        { method: 'GET',
                        uri: req_url,
                        }
                    , function (error, response, body) {
                                //log('error: ' + error);
                                //log('Status: '+ response.statusCode);
                                //log('response: '+ JSON.stringify(response));
                                //response.body = '{"dxsEntries":[{"dxsId":234881792,"value":1},{"dxsId":234881537,"value":[207,217,88,94,63,16,2,0]},{"dxsId":234881538,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881539,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881540,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881541,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881542,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881543,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881544,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881545,"value":[0,0,0,0,0,0,0,0]},{"dxsId":234881546,"value":[0,0,0,0,0,0,0,0]}],"session":{"sessionId":0,"roleId":0},"status":{"code":0}}';
                                //response.statusCode = 200;
                                //error = false;
                  
                            if (!error && response.statusCode == 200) {
                                //log('request ok: ');
                                //log('Status: '+ response.statusCode);
                                //log('response: '+ JSON.stringify(response));
                                callback(response.body);
                            } else {
                                log('request nok: ');
                                //log('Status: '+ response.statusCode);
                                //log('error: ' + error);
                            }
                        }
                    );
                  }
                  function getResponseId(response,id) {
                    return response.dxsEntries.find( item => item.dxsId === id );
                  }
                  function timeConverter(UNIX_timestamp){
                  var a = new Date(UNIX_timestamp * 1000);
                  var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
                  var year = a.getFullYear();
                  var month = months[a.getMonth()];
                  var date = a.getDate();
                  var hour = ('0'+a.getHours()).slice(-2);
                  var min = ('0'+a.getMinutes()).slice(-2);
                  var sec = ('0'+a.getSeconds()).slice(-2);
                  var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
                  return time;
                  log (time);
                  }
                  schedule("* * * * *", getEvents);
                  
                  

                  // Ausleseskript Wechselrichter Kostal Piko ab Firmware v05.31 (12.10.2015)
                  
                  //Variable
                  
                  //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 Genertor
                     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
                  
                  
                  
                  var IPAnlage = '192.168.138.103/api/dxs.json';   // IP der Photovoltaik-Anlage
                  
                  
                  
                  createState('Messwerte.0.Solaranlage.Momentanwerte.Leistung_AC_aktuell', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Autarkiegrad_d',0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Autarkiegrad_G',0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Betriebszeit',0);
                  createState('Messwerte.0.Solaranlage.Momentanwerte.Leistung_DC_aktuell',0);
                  createState('Messwerte.0.Solaranlage.Momentanwerte.Eigenverbrauch',0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauch_d');
                  createState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauch_G', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauchsquote_d', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauchsquote_G', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Tagesertrag', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Gesamtertrag', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Hausverbrauch_d', 0);
                  createState('Messwerte.0.Solaranlage.Summenwerte.Hausverbrauch_G', 0);
                  createState('Messwerte.0.Solaranlage.Momentanwerte.DC1Spannung');
                  createState('Messwerte.0.Solaranlage.Momentanwerte.DC2Spannung');
                  createState('Messwerte.0.Solaranlage.Momentanwerte.P1Strom');
                  createState('Messwerte.0.Solaranlage.Momentanwerte.P2Strom');
                  createState('Messwerte.0.Solaranlage.Momentanwerte.P1Leistung');
                  createState('Messwerte.0.Solaranlage.Momentanwerte.P2Leistung');
                  
                  
                  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_DC1Spannung +
                     '&dxsEntries=' + ID_DC2Spannung +
                     '&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;
                             setState('Messwerte.0.Solaranlage.Momentanwerte.Leistung_DC_aktuell', result[0].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.Leistung_AC_aktuell', result[1].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.Eigenverbrauch', result[2].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauch_d', result[3].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauch_G', result[4].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauchsquote_d', result[5].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Eigenverbrauchsquote_G', result[6].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Tagesertrag', result[7].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Gesamtertrag', result[8].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Hausverbrauch_d', result[9].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Hausverbrauch_G', result[10].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Autarkiegrad_G', result[11].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Autarkiegrad_d', result[12].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Summenwerte.Betriebszeit', result[13].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.DC1Spannung', result[14].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.DC2Spannung', result[15].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.P1Strom', result[16].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.P2Strom', result[17].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.P1Leistung', result[18].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.P2Leistung', result[19].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.Status', result[20].value || 0, true);
                             setState('Messwerte.0.Solaranlage.Momentanwerte.Leistung_String1', result[21].value || 0, true);
                             setState('Messwerte.0.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;
                  
                  

                  Wie gesagt ist js nicht meine Heimat. Die Skripte sind nicht von mir.

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

                    @homoran

                    Die Skripte fragen ja beide die gleiche IP ab.
                    Die war wohl nicht verfügbar. Das ist der Hauptfehlergrund für die Logeinträge
                    Der Fehler

                    Error in request callback: ReferenceError: url is not defined
                    liegt daran, das in skript 2 die variable url in zeile, 
                    log("Fehler: " + error + " bei Abfrage von: " + url, "warn");
                    

                    nie definiert wurde,

                    bei skript 2 dürfte sich das eigentlich nicht so oft wiederholen, zur Abfrage wird request verwendet und request wiederholt nicht (weiß nicht ob man das konfigurieren kann, aber wenn ist hier nix davon zu sehen.)

                    skript 1 triggert ja anhand schedule, da kenn ich micht nicht ganz so aus, aber das müsste sekündlich sein?

                    In diesem skript wird nur ein request abgesetzt, daher sehe ich jetzt auch nicht warum der fehler so oft kommt (bis auf das schedule)

                    Nactrag
                    Das 2. Skript wird ja Dutch Wertänderungen eines datenpunktes getriggert. Evtl könntest du mal prüfen wie oft das vorkommt. Evt wird das Skript auch so sehr oft getriggert aber ohne Fehler sieht man natürlich nix

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

                      @oliverio sagte in 99+ errors in 50msec!:

                      skript 1 triggert ja anhand schedule, da kenn ich micht nicht ganz so aus, aber das müsste sekündlich sein?

                      5 Sterne ist minütlich

                      @oliverio sagte in 99+ errors in 50msec!:

                      nie definiert wurde,

                      ok! aber die zweite Frage nach einem automatischen Retry was zu den 99+ Meldungen in 50 msec füht ist also noch offen!?
                      das ist ja sschon fast ei DoS 😉

                      @oliverio sagte in 99+ errors in 50msec!:

                      Das 2. Skript wird ja Dutch Wertänderungen eines datenpunktes getriggert. Evtl könntest du mal prüfen wie oft das vorkommt.

                      eigentlich alle 6 Sekunden, wenn der Smartmeter Adapter zu dem Zeitpunkt nicht gesponnen hat.

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        Lucky_ESA Developer Most Active @Homoran last edited by

                        @homoran Keine Ahnung ob das zusammenhängt aber ich kann so ein Phänomen bestätigen. Muss jetzt erst mal selber schauen was passiert ist.
                        Mein Log von gestern ist 800 MB groß und von heute schon über 1GB.

                        Problem nach Update Node 18.15.0 auf 18.16.0

                        Gruß//Lucky

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        886
                        Online

                        31.8k
                        Users

                        80.0k
                        Topics

                        1.3m
                        Posts

                        5
                        15
                        423
                        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