Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. ioBroker Allgemein
  4. Parser

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    23
    1
    1.3k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.3k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.5k

Parser

Geplant Angeheftet Gesperrt Verschoben ioBroker Allgemein
parser
108 Beiträge 3 Kommentatoren 9.5k Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • OliverIOO OliverIO

    dein eingebundenes skript ruft ebenfalls die daten per json ab und schreibt sie in datenpunkte.
    das prinzip ist das gleiche

    HomoranH Nicht stören
    HomoranH Nicht stören
    Homoran
    Global Moderator Administrators
    schrieb am zuletzt editiert von Homoran
    #57

    @OliverIO Ich sag ja: kommt mir bekannt vor ;-)

    Jetzt noch eine translationtable und gut ist :joy:

    Mit Blockly käme ich jetzt weiter

    on({id: 'Messwerte.0.Solaranlage.Momentanwerte.Status', change: "ne"}, function (obj) {
      var value = obj.state.val;
      var oldValue = obj.oldState.val;
      if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 0) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'aus', true);
      } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 1) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Leerlauf', true);
      } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 2) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Anfahren', true);
      } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 3) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen MPP', true);
      } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 4) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen abgeregelt', true);
      } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 7) {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Isolationsmessung', true);
      } else {
        setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, (String('Code ') + String(('' + getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val))), true);
      }
    });
    

    Aber in Blockly

    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

    OliverIOO 2 Antworten Letzte Antwort
    0
    • HomoranH Homoran

      @OliverIO Ich sag ja: kommt mir bekannt vor ;-)

      Jetzt noch eine translationtable und gut ist :joy:

      Mit Blockly käme ich jetzt weiter

      on({id: 'Messwerte.0.Solaranlage.Momentanwerte.Status', change: "ne"}, function (obj) {
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 0) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'aus', true);
        } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 1) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Leerlauf', true);
        } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 2) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Anfahren', true);
        } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 3) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen MPP', true);
        } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 4) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen abgeregelt', true);
        } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 7) {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Isolationsmessung', true);
        } else {
          setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, (String('Code ') + String(('' + getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val))), true);
        }
      });
      

      Aber in Blockly

      OliverIOO Offline
      OliverIOO Offline
      OliverIO
      schrieb am zuletzt editiert von
      #58

      @Homoran
      blocky ist blöd.
      i endeffekt ist es das glche wie programmieren, nur mit klötzchen. jedes klötzchen entspricht eh mehr oder weniger einem javascript befehl. mit javascript gibt es aber im netz mehr flexibilität und mehr lösungen als für blockly

      Meine Adapter und Widgets
      TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
      Links im Profil

      HomoranH 1 Antwort Letzte Antwort
      0
      • HomoranH Homoran

        @OliverIO Ich sag ja: kommt mir bekannt vor ;-)

        Jetzt noch eine translationtable und gut ist :joy:

        Mit Blockly käme ich jetzt weiter

        on({id: 'Messwerte.0.Solaranlage.Momentanwerte.Status', change: "ne"}, function (obj) {
          var value = obj.state.val;
          var oldValue = obj.oldState.val;
          if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 0) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'aus', true);
          } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 1) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Leerlauf', true);
          } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 2) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Anfahren', true);
          } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 3) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen MPP', true);
          } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 4) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Einspeisen abgeregelt', true);
          } else if (getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val == 7) {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, 'Isolationsmessung', true);
          } else {
            setState("Messwerte.0.Solaranlage.Momentanwerte.Status_Klartext"/*Status_Klartext*/, (String('Code ') + String(('' + getState("Messwerte.0.Solaranlage.Momentanwerte.Status").val))), true);
          }
        });
        

        Aber in Blockly

        OliverIOO Offline
        OliverIOO Offline
        OliverIO
        schrieb am zuletzt editiert von
        #59

        @Homoran ok Übersetzungstabelle mach ich später. Muss mal ne weile ausser Haus

        Meine Adapter und Widgets
        TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
        Links im Profil

        1 Antwort Letzte Antwort
        0
        • OliverIOO OliverIO

          @Homoran
          blocky ist blöd.
          i endeffekt ist es das glche wie programmieren, nur mit klötzchen. jedes klötzchen entspricht eh mehr oder weniger einem javascript befehl. mit javascript gibt es aber im netz mehr flexibilität und mehr lösungen als für blockly

          HomoranH Nicht stören
          HomoranH Nicht stören
          Homoran
          Global Moderator Administrators
          schrieb am zuletzt editiert von
          #60

          @OliverIO ich weiß, aber ich bin froh dass es das gibt, da ich mich erst seit ioBroker mit js beschäftige.

          Ist für mich wie eine Fremdsprache: Verstehen: so lala, sprechen: naja
          Die Grammatik (=Syntax) ist bei mir noch nicht sicher genug, eher Glückssache)

          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

          OliverIOO 1 Antwort Letzte Antwort
          0
          • HomoranH Homoran

            @OliverIO ich weiß, aber ich bin froh dass es das gibt, da ich mich erst seit ioBroker mit js beschäftige.

            Ist für mich wie eine Fremdsprache: Verstehen: so lala, sprechen: naja
            Die Grammatik (=Syntax) ist bei mir noch nicht sicher genug, eher Glückssache)

            OliverIOO Offline
            OliverIOO Offline
            OliverIO
            schrieb am zuletzt editiert von
            #61

            @Homoran
            blockly kannst dann mit latein vergleichen.
            man kann das zwar lernen, aber nur begrenzt einsetzen.
            Neue Literatur gibt es ebenfalls begrenzt
            oder Internet. Wenn man gar kein englisch kann, bleibt einem ein großer Anteil des Internets verschlossen.

            Meine Adapter und Widgets
            TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
            Links im Profil

            HomoranH OliverIOO 2 Antworten Letzte Antwort
            0
            • OliverIOO OliverIO

              @Homoran
              blockly kannst dann mit latein vergleichen.
              man kann das zwar lernen, aber nur begrenzt einsetzen.
              Neue Literatur gibt es ebenfalls begrenzt
              oder Internet. Wenn man gar kein englisch kann, bleibt einem ein großer Anteil des Internets verschlossen.

              HomoranH Nicht stören
              HomoranH Nicht stören
              Homoran
              Global Moderator Administrators
              schrieb am zuletzt editiert von
              #62

              @OliverIO
              Bin ich ganz bei dir.
              Aber besser als nur auf andere angewiesen zu sein.

              Ich erarbeite mir damit die Grundlagen (sehe immer wieder in den Blockly <=> JS Code und irgendwann werde ich auch JS nativ arbeiten - Hoffe ich ;-)

              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

              1 Antwort Letzte Antwort
              0
              • OliverIOO OliverIO

                @Homoran
                blockly kannst dann mit latein vergleichen.
                man kann das zwar lernen, aber nur begrenzt einsetzen.
                Neue Literatur gibt es ebenfalls begrenzt
                oder Internet. Wenn man gar kein englisch kann, bleibt einem ein großer Anteil des Internets verschlossen.

                OliverIOO Offline
                OliverIOO Offline
                OliverIO
                schrieb am zuletzt editiert von
                #63

                mach mal ein Basis javascript tutorial .
                Dann werden dir schnell Sachen klarer.
                Eine kleine html-Seite im Browser.
                Da brauch man nicht einmal einen Server
                und dann mit den Dev Tools in Chrome/Firefox debuggen
                um zu sehen was da Schritt für Schritt passiert.

                https://wiki.selfhtml.org/wiki/JavaScript/Tutorials

                Meine Adapter und Widgets
                TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                Links im Profil

                HomoranH 1 Antwort Letzte Antwort
                0
                • OliverIOO OliverIO

                  mach mal ein Basis javascript tutorial .
                  Dann werden dir schnell Sachen klarer.
                  Eine kleine html-Seite im Browser.
                  Da brauch man nicht einmal einen Server
                  und dann mit den Dev Tools in Chrome/Firefox debuggen
                  um zu sehen was da Schritt für Schritt passiert.

                  https://wiki.selfhtml.org/wiki/JavaScript/Tutorials

                  HomoranH Nicht stören
                  HomoranH Nicht stören
                  Homoran
                  Global Moderator Administrators
                  schrieb am zuletzt editiert von
                  #64

                  @OliverIO Das Tut habe ich schon hinter mir.
                  Bei mir hapert es wirklich an der richtigen Syntax.
                  Ist für Außenstehende schwer zu verstehen. Aber ich kann das zehnmal lernen, beim elften mal weiß ich es wieder nicht.
                  Nachvollziehen und sogar Fehler in komplexeren js scripten ist dagegen viel einfacher für mich

                  kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                  Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                  der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                  OliverIOO 1 Antwort Letzte Antwort
                  0
                  • HomoranH Homoran

                    @OliverIO Das Tut habe ich schon hinter mir.
                    Bei mir hapert es wirklich an der richtigen Syntax.
                    Ist für Außenstehende schwer zu verstehen. Aber ich kann das zehnmal lernen, beim elften mal weiß ich es wieder nicht.
                    Nachvollziehen und sogar Fehler in komplexeren js scripten ist dagegen viel einfacher für mich

                    OliverIOO Offline
                    OliverIOO Offline
                    OliverIO
                    schrieb am zuletzt editiert von
                    #65

                    @Homoran

                    So nun bitte nochmal testen.
                    Allerdings will er bei mir nix in einen Datenpunkt schreiben, obwohl das alles passt und auch kein Fehler kommt.
                    Die Namen der Datenpunkte kannst du konfigurieren (Zeile 3)
                    Messwerte.0.Solaranlage.Info0 bis Messwerte.0.Solaranlage.Info9
                    Da ich sonst nichts mit Skripten mache kannst du evtl. mal probieren

                    var domain = '192.168.1.20'; // domain or ip without http:// or https:// 
                    var url = '/api/dxs.json';
                    var datenpunkt = 'Messwerte.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 kontrollieren1 "},
                    {"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. Support1 "},
                    {"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 auf1 "},
                    {"code":"3011","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3012","type":"Störung Varistor","description":"DC-Varistor defekt","action":"Defekten Varistor tauschen1 "},
                    {"code":"3013","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                    {"code":"3014","type":"Interne Temperaturstörung","description":"Übertemperatur Prozessor","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                    {"code":"3017","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"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":"Support1 "},
                    {"code":"3020","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3021","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3022","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3023","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3024","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3025","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3026","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3027","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1"},
                    {"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 kontrollieren1 "},
                    {"code":"3030","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                    {"code":"3031","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf1 "},
                    {"code":"3032","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                    {"code":"3033","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3034","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                    {"code":"3035","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                    {"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 auf1 "},
                    {"code":"3046","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf.1 "},
                    {"code":"3047","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3048","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                    {"code":"3049","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                    {"code":"3050","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                    {"code":"3051","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3052","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3053","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                    {"code":"3054","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"3055","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                    {"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 kontrollieren1 "},
                    {"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 kontaktieren "},
                    {"code":"3061","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3062","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"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 notwendig1 "},
                    {"code":"3065","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3066","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren "},
                    {"code":"3068","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                    {"code":"3070","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3071","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3072","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3073","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3074","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3075","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"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 starten1 "},
                    {"code":"3080","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1"},
                    {"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":"Support1 "},
                    {"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üfen "},
                    {"code":"3092","type":"Interne Systemstörung ","description":"Lüfter nicht korrekt angeschlossen","action":"Lüfter-Steckverbindungen prüfen "},
                    {"code":"3093","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                    {"code":"3094","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                    {"code":"3095","type":"Interne Parametrierungsstörung","description":"Falsche Kalibrierung","action":"Support kontaktieren "},
                    {"code":"3096","type":"Information","description":"Falsche Dimensionierung der PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren "},
                    {"code":"3097","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                    {"code":"3098","type":"Information","description":"Netz nicht vorhanden","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3101","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3102","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3103","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                    {"code":"3104","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                    {"code":"3105","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"},
                    {"code":"3106","type":"Information","description":"Falsche Eingabe am KomBoard oder falsche Verdrahtung","action":"Eingabe oder Verdrahtung korriegieren1 "},
                    {"code":"4100","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                    {"code":"4101","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                    {"code":"4102","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                    {"code":"4103","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                    {"code":"4104","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                    {"code":"4105","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                    {"code":"4106","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                    {"code":"4110","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                    {"code":"4121","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4122","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4130","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4131","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4150","type":"Information","description":"Erhöhte Netzfrequenz. Oft gehäuftes Auftreten am Morgen und am Abend.","action":"Installation kontrollieren1 "},
                    {"code":"4151","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                    {"code":"4157","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Keine Maßnahme notwendig1 "},
                    {"code":"4158","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                    {"code":"4159","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                    {"code":"4160","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                    {"code":"4161","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                    {"code":"4170","type":"Information","description":"Eine Phase ist nicht angeschlossen. Ein Sicherungsautomat wurde nicht eingeschaltet.","action":"Installation kontrollieren1 "},
                    {"code":"4180","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1"},
                    {"code":"4181","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1 "},
                    {"code":"4185","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                    {"code":"4200","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                    {"code":"4201","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                    {"code":"4210","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                    {"code":"4211","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                    {"code":"4220","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                    {"code":"4221","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                    {"code":"4290","type":"Externe Netzstörung","description":"Die Netzfrequenz hat sich zu schnell verändert.","action":"Generatorinstallation kontrollieren1 "},
                    {"code":"4300","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4301","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4302","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4303","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4304","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4321","type":"Interne Parametrierungsstörung","description":"Defektes EEPROM unerlaubte Speicherzugriffe","action":"Support1 "},
                    {"code":"4322","type":"Interne Parametrierungsstörung","description":"Softwarefehler","action":"Support kontaktieren "},
                    {"code":"4323","type":"Interne Parametrierungsstörung","description":"Fehlerstrom","action":"Support1 "},
                    {"code":"4324","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                    {"code":"4325","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                    {"code":"4340","type":"-","description":"","action":""},
                    {"code":"4354","type":"Externer Fehlerstrom","description":"Fehlerstrom","action":"Generatorinstallation kontrollieren1 "},
                    {"code":"4360","type":"-","description":"","action":""},
                    {"code":"4421","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4422","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren. "},
                    {"code":"4424","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                    {"code":"4425","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                    {"code":"4450","type":"Externe Isolationsfehler","description":"Isolationsfehler","action":"Generatorinstallation kontrollieren1 "},
                    {"code":"4451","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren "},
                    {"code":"4475","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4476","type":"Information","description":"Schwache PV-Versorgung (z.B. morgens)","action":"Keine Maßnahme notwendig1 "},
                    {"code":"4800","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4801","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                    {"code":"4802","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4803","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                    {"code":"4804","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                    {"code":"4805","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4810","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"4850","type":"Interne Systemstörung ","description":"EVU","action":"Support1 "},
                    {"code":"4870","type":"-","description":"","action":""},
                    {"code":"7500","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                    {"code":"7503","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"}
                    ];
                    
                    
                    
                    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
                            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);
                                var msgtext = 'Code: '+msg.type+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                                log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                                setState(datenpunkt+i, msgtext, 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 = a.getHours();
                      var min = a.getMinutes();
                      var sec = a.getSeconds();
                      var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
                      return time;
                    }
                    getEvents();
                    
                    

                    Meine Adapter und Widgets
                    TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                    Links im Profil

                    HomoranH 2 Antworten Letzte Antwort
                    0
                    • OliverIOO OliverIO

                      @Homoran

                      So nun bitte nochmal testen.
                      Allerdings will er bei mir nix in einen Datenpunkt schreiben, obwohl das alles passt und auch kein Fehler kommt.
                      Die Namen der Datenpunkte kannst du konfigurieren (Zeile 3)
                      Messwerte.0.Solaranlage.Info0 bis Messwerte.0.Solaranlage.Info9
                      Da ich sonst nichts mit Skripten mache kannst du evtl. mal probieren

                      var domain = '192.168.1.20'; // domain or ip without http:// or https:// 
                      var url = '/api/dxs.json';
                      var datenpunkt = 'Messwerte.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 kontrollieren1 "},
                      {"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. Support1 "},
                      {"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 auf1 "},
                      {"code":"3011","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3012","type":"Störung Varistor","description":"DC-Varistor defekt","action":"Defekten Varistor tauschen1 "},
                      {"code":"3013","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                      {"code":"3014","type":"Interne Temperaturstörung","description":"Übertemperatur Prozessor","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                      {"code":"3017","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"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":"Support1 "},
                      {"code":"3020","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3021","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3022","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3023","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3024","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3025","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3026","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3027","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1"},
                      {"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 kontrollieren1 "},
                      {"code":"3030","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                      {"code":"3031","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf1 "},
                      {"code":"3032","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                      {"code":"3033","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3034","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                      {"code":"3035","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                      {"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 auf1 "},
                      {"code":"3046","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf.1 "},
                      {"code":"3047","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3048","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                      {"code":"3049","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                      {"code":"3050","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                      {"code":"3051","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3052","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3053","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                      {"code":"3054","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"3055","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                      {"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 kontrollieren1 "},
                      {"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 kontaktieren "},
                      {"code":"3061","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3062","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"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 notwendig1 "},
                      {"code":"3065","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3066","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren "},
                      {"code":"3068","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                      {"code":"3070","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3071","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3072","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3073","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3074","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3075","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"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 starten1 "},
                      {"code":"3080","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1"},
                      {"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":"Support1 "},
                      {"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üfen "},
                      {"code":"3092","type":"Interne Systemstörung ","description":"Lüfter nicht korrekt angeschlossen","action":"Lüfter-Steckverbindungen prüfen "},
                      {"code":"3093","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                      {"code":"3094","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                      {"code":"3095","type":"Interne Parametrierungsstörung","description":"Falsche Kalibrierung","action":"Support kontaktieren "},
                      {"code":"3096","type":"Information","description":"Falsche Dimensionierung der PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren "},
                      {"code":"3097","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                      {"code":"3098","type":"Information","description":"Netz nicht vorhanden","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3101","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3102","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3103","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                      {"code":"3104","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                      {"code":"3105","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"},
                      {"code":"3106","type":"Information","description":"Falsche Eingabe am KomBoard oder falsche Verdrahtung","action":"Eingabe oder Verdrahtung korriegieren1 "},
                      {"code":"4100","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                      {"code":"4101","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                      {"code":"4102","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                      {"code":"4103","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                      {"code":"4104","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                      {"code":"4105","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                      {"code":"4106","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                      {"code":"4110","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                      {"code":"4121","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4122","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4130","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4131","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4150","type":"Information","description":"Erhöhte Netzfrequenz. Oft gehäuftes Auftreten am Morgen und am Abend.","action":"Installation kontrollieren1 "},
                      {"code":"4151","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                      {"code":"4157","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Keine Maßnahme notwendig1 "},
                      {"code":"4158","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                      {"code":"4159","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                      {"code":"4160","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                      {"code":"4161","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                      {"code":"4170","type":"Information","description":"Eine Phase ist nicht angeschlossen. Ein Sicherungsautomat wurde nicht eingeschaltet.","action":"Installation kontrollieren1 "},
                      {"code":"4180","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1"},
                      {"code":"4181","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1 "},
                      {"code":"4185","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                      {"code":"4200","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                      {"code":"4201","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                      {"code":"4210","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                      {"code":"4211","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                      {"code":"4220","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                      {"code":"4221","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                      {"code":"4290","type":"Externe Netzstörung","description":"Die Netzfrequenz hat sich zu schnell verändert.","action":"Generatorinstallation kontrollieren1 "},
                      {"code":"4300","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4301","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4302","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4303","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4304","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4321","type":"Interne Parametrierungsstörung","description":"Defektes EEPROM unerlaubte Speicherzugriffe","action":"Support1 "},
                      {"code":"4322","type":"Interne Parametrierungsstörung","description":"Softwarefehler","action":"Support kontaktieren "},
                      {"code":"4323","type":"Interne Parametrierungsstörung","description":"Fehlerstrom","action":"Support1 "},
                      {"code":"4324","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                      {"code":"4325","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                      {"code":"4340","type":"-","description":"","action":""},
                      {"code":"4354","type":"Externer Fehlerstrom","description":"Fehlerstrom","action":"Generatorinstallation kontrollieren1 "},
                      {"code":"4360","type":"-","description":"","action":""},
                      {"code":"4421","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4422","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren. "},
                      {"code":"4424","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                      {"code":"4425","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                      {"code":"4450","type":"Externe Isolationsfehler","description":"Isolationsfehler","action":"Generatorinstallation kontrollieren1 "},
                      {"code":"4451","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren "},
                      {"code":"4475","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4476","type":"Information","description":"Schwache PV-Versorgung (z.B. morgens)","action":"Keine Maßnahme notwendig1 "},
                      {"code":"4800","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4801","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                      {"code":"4802","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4803","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                      {"code":"4804","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                      {"code":"4805","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4810","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"4850","type":"Interne Systemstörung ","description":"EVU","action":"Support1 "},
                      {"code":"4870","type":"-","description":"","action":""},
                      {"code":"7500","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                      {"code":"7503","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"}
                      ];
                      
                      
                      
                      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
                              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);
                                  var msgtext = 'Code: '+msg.type+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                                  log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                                  setState(datenpunkt+i, msgtext, 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 = a.getHours();
                        var min = a.getMinutes();
                        var sec = a.getSeconds();
                        var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
                        return time;
                      }
                      getEvents();
                      
                      
                      HomoranH Nicht stören
                      HomoranH Nicht stören
                      Homoran
                      Global Moderator Administrators
                      schrieb am zuletzt editiert von
                      #66

                      @OliverIO
                      Danke!

                      war jetzt paar Tage auf Dienstreise - muss erst mal wieder "runterkommen".
                      Werde ich dann schnellstmöglich testen

                      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                      1 Antwort Letzte Antwort
                      0
                      • OliverIOO OliverIO

                        @Homoran

                        So nun bitte nochmal testen.
                        Allerdings will er bei mir nix in einen Datenpunkt schreiben, obwohl das alles passt und auch kein Fehler kommt.
                        Die Namen der Datenpunkte kannst du konfigurieren (Zeile 3)
                        Messwerte.0.Solaranlage.Info0 bis Messwerte.0.Solaranlage.Info9
                        Da ich sonst nichts mit Skripten mache kannst du evtl. mal probieren

                        var domain = '192.168.1.20'; // domain or ip without http:// or https:// 
                        var url = '/api/dxs.json';
                        var datenpunkt = 'Messwerte.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 kontrollieren1 "},
                        {"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. Support1 "},
                        {"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 auf1 "},
                        {"code":"3011","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3012","type":"Störung Varistor","description":"DC-Varistor defekt","action":"Defekten Varistor tauschen1 "},
                        {"code":"3013","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                        {"code":"3014","type":"Interne Temperaturstörung","description":"Übertemperatur Prozessor","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                        {"code":"3017","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"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":"Support1 "},
                        {"code":"3020","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3021","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3022","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3023","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3024","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3025","type":"Externe Generatorstörung","description":"Überspannung am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3026","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3027","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Support1"},
                        {"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 kontrollieren1 "},
                        {"code":"3030","type":"Interne Temperaturstörung","description":"Übertemperatur AC/DC an Leistungsstufe","action":"Installationsbedingungen und Lüfter kontrollieren1 "},
                        {"code":"3031","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf1 "},
                        {"code":"3032","type":"Externe Generatorstörung","description":"Überstrom am PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren1 "},
                        {"code":"3033","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3034","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                        {"code":"3035","type":"Interne Systemstörung ","description":"Interner Zwischenkreisfehler","action":"Das Gerät neu starten1 "},
                        {"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 auf1 "},
                        {"code":"3046","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach Prüfung durch und schaltet generell auf.1 "},
                        {"code":"3047","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3048","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                        {"code":"3049","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                        {"code":"3050","type":"Interne Kommunikationsstörung","description":"Interner Kommunikationsfehler","action":"Kontrollieren Sie die internen Kommunikationsleitungen zwischen den einzelnen Leiterplatten1 "},
                        {"code":"3051","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3052","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3053","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                        {"code":"3054","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"3055","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                        {"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 kontrollieren1 "},
                        {"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 kontaktieren "},
                        {"code":"3061","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3062","type":"Interne Temperaturstörung","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"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 notwendig1 "},
                        {"code":"3065","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3066","type":"Interne Parametrierungsstörung","description":"Interne Systemstörung","action":"Support kontaktieren "},
                        {"code":"3068","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1 "},
                        {"code":"3070","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3071","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3072","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3073","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3074","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3075","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"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 starten1 "},
                        {"code":"3080","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Das Gerät neu starten1"},
                        {"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":"Support1 "},
                        {"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üfen "},
                        {"code":"3092","type":"Interne Systemstörung ","description":"Lüfter nicht korrekt angeschlossen","action":"Lüfter-Steckverbindungen prüfen "},
                        {"code":"3093","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                        {"code":"3094","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                        {"code":"3095","type":"Interne Parametrierungsstörung","description":"Falsche Kalibrierung","action":"Support kontaktieren "},
                        {"code":"3096","type":"Information","description":"Falsche Dimensionierung der PV-Generator","action":"Generatorinstallation/ -auslegung kontrollieren "},
                        {"code":"3097","type":"Interne Parametrierungsstörung","description":"Falsche Parametrierung","action":"Support kontaktieren "},
                        {"code":"3098","type":"Information","description":"Netz nicht vorhanden","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3101","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3102","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3103","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1 "},
                        {"code":"3104","type":"Interne Systemstörung ","description":"Interne AC-Systemstörung","action":"Gerät führt mehrfach eine Prüfung durch und schaltet generell auf1 "},
                        {"code":"3105","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"},
                        {"code":"3106","type":"Information","description":"Falsche Eingabe am KomBoard oder falsche Verdrahtung","action":"Eingabe oder Verdrahtung korriegieren1 "},
                        {"code":"4100","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                        {"code":"4101","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                        {"code":"4102","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                        {"code":"4103","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                        {"code":"4104","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L1","action":"Support1 "},
                        {"code":"4105","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L2","action":"Support1 "},
                        {"code":"4106","type":"Interne Systemstörung ","description":"Erhöhter DC-Strom L3","action":"Support1 "},
                        {"code":"4110","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                        {"code":"4121","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4122","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4130","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4131","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4150","type":"Information","description":"Erhöhte Netzfrequenz. Oft gehäuftes Auftreten am Morgen und am Abend.","action":"Installation kontrollieren1 "},
                        {"code":"4151","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                        {"code":"4157","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Keine Maßnahme notwendig1 "},
                        {"code":"4158","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                        {"code":"4159","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                        {"code":"4160","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "},
                        {"code":"4161","type":"Externe Netzstörung","description":"Zu niedrige Netzfrequenz","action":"Installation kontrollieren1 "},
                        {"code":"4170","type":"Information","description":"Eine Phase ist nicht angeschlossen. Ein Sicherungsautomat wurde nicht eingeschaltet.","action":"Installation kontrollieren1 "},
                        {"code":"4180","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1"},
                        {"code":"4181","type":"Externe Netzstörung","description":"PE-Leitung nicht angeschlossen","action":"Installation kontrollieren1 "},
                        {"code":"4185","type":"Interne Systemstörung ","description":"Interner Softwarefehler","action":"Support1 "},
                        {"code":"4200","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                        {"code":"4201","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                        {"code":"4210","type":"Externe Netzstörung","description":"Erhöhte Netzspannung","action":"Installation kontrollieren1 "},
                        {"code":"4211","type":"Externe Netzstörung","description":"Zu niedrige Netzspannung","action":"Installation kontrollieren1 "},
                        {"code":"4220","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                        {"code":"4221","type":"Externe Netzstörung","description":"Spannungsmittelwert der letzten 10 Min. zu groß","action":"Installation kontrollieren1 "},
                        {"code":"4290","type":"Externe Netzstörung","description":"Die Netzfrequenz hat sich zu schnell verändert.","action":"Generatorinstallation kontrollieren1 "},
                        {"code":"4300","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4301","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4302","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4303","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4304","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4321","type":"Interne Parametrierungsstörung","description":"Defektes EEPROM unerlaubte Speicherzugriffe","action":"Support1 "},
                        {"code":"4322","type":"Interne Parametrierungsstörung","description":"Softwarefehler","action":"Support kontaktieren "},
                        {"code":"4323","type":"Interne Parametrierungsstörung","description":"Fehlerstrom","action":"Support1 "},
                        {"code":"4324","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                        {"code":"4325","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                        {"code":"4340","type":"-","description":"","action":""},
                        {"code":"4354","type":"Externer Fehlerstrom","description":"Fehlerstrom","action":"Generatorinstallation kontrollieren1 "},
                        {"code":"4360","type":"-","description":"","action":""},
                        {"code":"4421","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4422","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren. "},
                        {"code":"4424","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1"},
                        {"code":"4425","type":"Interne Parametrierungsstörung","description":"Parameterfehler","action":"Support1 "},
                        {"code":"4450","type":"Externe Isolationsfehler","description":"Isolationsfehler","action":"Generatorinstallation kontrollieren1 "},
                        {"code":"4451","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support kontaktieren "},
                        {"code":"4475","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4476","type":"Information","description":"Schwache PV-Versorgung (z.B. morgens)","action":"Keine Maßnahme notwendig1 "},
                        {"code":"4800","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4801","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                        {"code":"4802","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4803","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                        {"code":"4804","type":"Interne Systemstörung ","description":"Isolationsfehler","action":"Support1 "},
                        {"code":"4805","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4810","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"4850","type":"Interne Systemstörung ","description":"EVU","action":"Support1 "},
                        {"code":"4870","type":"-","description":"","action":""},
                        {"code":"7500","type":"Interne Systemstörung ","description":"Interne Systemstörung","action":"Support1 "},
                        {"code":"7503","type":"Information","description":"Interne Systemstörung","action":"Keine Maßnahme notwendig1"}
                        ];
                        
                        
                        
                        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
                                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);
                                    var msgtext = 'Code: '+msg.type+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                                    log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                                    setState(datenpunkt+i, msgtext, 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 = a.getHours();
                          var min = a.getMinutes();
                          var sec = a.getSeconds();
                          var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
                          return time;
                        }
                        getEvents();
                        
                        
                        HomoranH Nicht stören
                        HomoranH Nicht stören
                        Homoran
                        Global Moderator Administrators
                        schrieb am zuletzt editiert von Homoran
                        #67

                        @OliverIO sagte in Parser:

                        Allerdings will er bei mir nix in einen Datenpunkt schreiben, obwohl das alles passt und auch kein Fehler kommt.
                        Die Namen der Datenpunkte kannst du konfigurieren (Zeile 3)

                        sieht bei mir genauso aus. :-(

                        javascript.0	2020-03-06 16:45:27.132	info	(27541) script.js.Helios_ErrorTest_V2: message01: 28 Feb 2020 10:13:51 4159 0002h Code: Externe Netzstörung Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Installation kontroll
                        javascript.0	2020-03-06 16:45:27.130	info	(27541) script.js.Helios_ErrorTest_V2: events: "{\"dxsEntries\":[{\"dxsId\":234881792,\"value\":1},{\"dxsId\":234881537,\"value\":[207,217,88,94,63,16,2,0]},{\"dxsId\":234881538,\"value\":[0,0,0,0,0,
                        javascript.0	2020-03-06 16:45:27.129	info	(27541) script.js.Helios_ErrorTest_V2: request ok:
                        javascript.0	2020-03-06 16:45:27.129	info	(27541) script.js.Helios_ErrorTest_V2: response: {"statusCode":200,"body":"{\"dxsEntries\":[{\"dxsId\":234881792,\"value\":1},{\"dxsId\":234881537,\"value\":[207,217,88,94,63,16,2,0]},{\"dxsId\":2348
                        javascript.0	2020-03-06 16:45:27.128	info	(27541) script.js.Helios_ErrorTest_V2: Status: 200
                        javascript.0	2020-03-06 16:45:27.127	info	(27541) script.js.Helios_ErrorTest_V2: error: null
                        javascript.0	2020-03-06 16:45:27.082	info	(27541) script.js.Helios_ErrorTest_V2: registered 0 subscriptions and 0 schedules
                        javascript.0	2020-03-06 16:45:27.079	info	(27541) script.js.Helios_ErrorTest_V2: query: http://192.168.138.103/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234
                        javascript.0	2020-03-06 16:45:27.078	info	(27541) script.js.Helios_ErrorTest_V2: pikorequest
                        javascript.0	2020-03-06 16:45:27.077	info	(27541) script.js.Helios_ErrorTest_V2: getEvents
                        javascript.0	2020-03-06 16:45:27.051	info	(27541) Start javascript script.js.Helios_ErrorTest_V2
                        javascript.0	2020-03-06 16:44:00.034	info	(27541) script.js.Klima_und_Umwelt.Luftdaten_RoKi: Luftdaten aktualisiert
                        javascript.0	2020-03-06 16:42:09.972	info	(27541) Stop script script.js.Helios_ErrorTest_V2
                        

                        Wo muss ich einen logeintrag zum debuggen einbauen, wo das Skript den Datenpunkt beschreiben müsste?

                        ich such mal ;-)

                        EDIT:
                        Gab es da nicht einen Bug mit setstate unter 0_userdata.0???

                        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                        1 Antwort Letzte Antwort
                        0
                        • HomoranH Nicht stören
                          HomoranH Nicht stören
                          Homoran
                          Global Moderator Administrators
                          schrieb am zuletzt editiert von Homoran
                          #68

                          @OliverIO
                          kaum schreibt man ins log:

                                      var msg = msgs.find(item => item.code==code);
                                      var msgtext = 'Code: '+msg.type+' 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, msgtext, true/*ack*/);
                          

                          und bekommt die Bestätigung, dass alles richtig laufen müsste:

                          javascript.0	2020-03-06 16:58:38.947	info	(27541) script.js.Helios_ErrorTest_V2: Datenpunkt: 0_userdata.0.Solaranlage.Info0 Fehlermeldung: Code: Externe Netzstörung Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Instal
                          javascript.0	2020-03-06 16:58:38.947	info	(27541) script.js.Helios_ErrorTest_V2: message01: 28 Feb 2020 10:13:51 4159 0002h Code: Externe Netzstörung Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Installation kontroll
                          javascript.0	2020-03-06 16:58:38.946	info	(27541) script.js.Helios_ErrorTest_V2: events: "{\"dxsEntries\":[{\"dxsId\":234881792,\"value\":1},{\"dxsId\":234881537,\"value\":[207,217,88,94,63,16,2,0]},{\"dxsId\":234881538,\"value\":[0,0,0,0,0,
                          javascript.0	2020-03-06 16:58:38.946	info	(27541) script.js.Helios_ErrorTest_V2: request ok:
                          

                          steht auch auf einmal was im Datenpunkt.

                          Das Skript wird im Moment wohl nur durch den Start getriggert, oder?
                          eigentlich müsste man es jede Minute (o.ä) laufen lassen um den Fehler hoffentlich "sofort" gemeldet zu bekommen.

                          Dann kann man auf die Änderung der Datenpunkte reagieren und weitere Aktionen auslösen.

                          kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                          Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                          der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                          OliverIOO 1 Antwort Letzte Antwort
                          0
                          • HomoranH Homoran

                            @OliverIO
                            kaum schreibt man ins log:

                                        var msg = msgs.find(item => item.code==code);
                                        var msgtext = 'Code: '+msg.type+' 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, msgtext, true/*ack*/);
                            

                            und bekommt die Bestätigung, dass alles richtig laufen müsste:

                            javascript.0	2020-03-06 16:58:38.947	info	(27541) script.js.Helios_ErrorTest_V2: Datenpunkt: 0_userdata.0.Solaranlage.Info0 Fehlermeldung: Code: Externe Netzstörung Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Instal
                            javascript.0	2020-03-06 16:58:38.947	info	(27541) script.js.Helios_ErrorTest_V2: message01: 28 Feb 2020 10:13:51 4159 0002h Code: Externe Netzstörung Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Installation kontroll
                            javascript.0	2020-03-06 16:58:38.946	info	(27541) script.js.Helios_ErrorTest_V2: events: "{\"dxsEntries\":[{\"dxsId\":234881792,\"value\":1},{\"dxsId\":234881537,\"value\":[207,217,88,94,63,16,2,0]},{\"dxsId\":234881538,\"value\":[0,0,0,0,0,
                            javascript.0	2020-03-06 16:58:38.946	info	(27541) script.js.Helios_ErrorTest_V2: request ok:
                            

                            steht auch auf einmal was im Datenpunkt.

                            Das Skript wird im Moment wohl nur durch den Start getriggert, oder?
                            eigentlich müsste man es jede Minute (o.ä) laufen lassen um den Fehler hoffentlich "sofort" gemeldet zu bekommen.

                            Dann kann man auf die Änderung der Datenpunkte reagieren und weitere Aktionen auslösen.

                            OliverIOO Offline
                            OliverIOO Offline
                            OliverIO
                            schrieb am zuletzt editiert von
                            #69

                            @Homoran ja genau, schedule musst du selbst einstellen

                            Meine Adapter und Widgets
                            TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                            Links im Profil

                            HomoranH 1 Antwort Letzte Antwort
                            0
                            • OliverIOO OliverIO

                              @Homoran ja genau, schedule musst du selbst einstellen

                              HomoranH Nicht stören
                              HomoranH Nicht stören
                              Homoran
                              Global Moderator Administrators
                              schrieb am zuletzt editiert von
                              #70

                              @OliverIO
                              Danke nochmal!

                              ich hoffe nur, dass man da nicht nur die historischen und erledigten Ereignisse bekommt, sondern auch aktive.

                              Hier habe ich noch was geändert:

                              var msgtext = 'Code: '+msg.code+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                              

                              Bei code hattest du auch msg.type stehen.
                              Jetzt bekomme ich das alles wie ich es will.

                              Vielleicht probiere ich mich mal daran, den Output als Json zu formatieren, damit ich es anschließend einfacher zerlegen kann

                              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                              OliverIOO 1 Antwort Letzte Antwort
                              0
                              • HomoranH Homoran

                                @OliverIO
                                Danke nochmal!

                                ich hoffe nur, dass man da nicht nur die historischen und erledigten Ereignisse bekommt, sondern auch aktive.

                                Hier habe ich noch was geändert:

                                var msgtext = 'Code: '+msg.code+' Typ: '+msg.type+' Beschreibung: '+msg.description+' Maßnahme: '+msg.action
                                

                                Bei code hattest du auch msg.type stehen.
                                Jetzt bekomme ich das alles wie ich es will.

                                Vielleicht probiere ich mich mal daran, den Output als Json zu formatieren, damit ich es anschließend einfacher zerlegen kann

                                OliverIOO Offline
                                OliverIOO Offline
                                OliverIO
                                schrieb am zuletzt editiert von
                                #71

                                @Homoran
                                das ist einfach. in msg steht das anhand des fehlercodes ausgewählte objekt drin.
                                da musst du nur noch
                                JSON.stringify(msg) in den Datenpunkt schreiben

                                Meine Adapter und Widgets
                                TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                                Links im Profil

                                HomoranH 2 Antworten Letzte Antwort
                                0
                                • OliverIOO OliverIO

                                  @Homoran
                                  das ist einfach. in msg steht das anhand des fehlercodes ausgewählte objekt drin.
                                  da musst du nur noch
                                  JSON.stringify(msg) in den Datenpunkt schreiben

                                  HomoranH Nicht stören
                                  HomoranH Nicht stören
                                  Homoran
                                  Global Moderator Administrators
                                  schrieb am zuletzt editiert von Homoran
                                  #72

                                  @OliverIO sagte in Parser:

                                  da musst du nur noch
                                  JSON.stringify(msg) in den Datenpunkt schreiben

                                  @OliverIO sagte in Parser:

                                  das ist zu einfach.

                                  ;-)

                                  {"code":"4159","type":"Externe Netzstörung","description":"Erhöhte Netzfrequenz","action":"Installation kontrollieren1 "}
                                  

                                  kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                                  Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                                  der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                                  1 Antwort Letzte Antwort
                                  0
                                  • OliverIOO OliverIO

                                    @Homoran
                                    das ist einfach. in msg steht das anhand des fehlercodes ausgewählte objekt drin.
                                    da musst du nur noch
                                    JSON.stringify(msg) in den Datenpunkt schreiben

                                    HomoranH Nicht stören
                                    HomoranH Nicht stören
                                    Homoran
                                    Global Moderator Administrators
                                    schrieb am zuletzt editiert von
                                    #73

                                    @OliverIO

                                    Habe heute den Cron aktiviert und auch die log Einträge entfernt um das log nicht minütlich zu fluten.
                                    klappt alles soweit ganz gut.

                                    Lediglich bei einer Sache brauche ich noch deine Hilfe.

                                    In früheren Versionen hattest du auch noch das Datum/Uhrzeit drin.
                                    Im Skript ist ganz unten auch eine Funktion zum Umwandeln des Datums mit einer Variable "time"

                                    Da anscheinend die Funktion nicht aufgerufen wird, kann ich "time" auch nicht verwenden.
                                    Ich habe auch noch gar nicht herausbekommen wie und wo ich an Datum/Uhrzeit des Ereignisses komme.

                                    Ich wäre da für einen Denkanstoss dankbar

                                    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                                    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                                    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                                    OliverIOO 1 Antwort Letzte Antwort
                                    0
                                    • HomoranH Homoran

                                      @OliverIO

                                      Habe heute den Cron aktiviert und auch die log Einträge entfernt um das log nicht minütlich zu fluten.
                                      klappt alles soweit ganz gut.

                                      Lediglich bei einer Sache brauche ich noch deine Hilfe.

                                      In früheren Versionen hattest du auch noch das Datum/Uhrzeit drin.
                                      Im Skript ist ganz unten auch eine Funktion zum Umwandeln des Datums mit einer Variable "time"

                                      Da anscheinend die Funktion nicht aufgerufen wird, kann ich "time" auch nicht verwenden.
                                      Ich habe auch noch gar nicht herausbekommen wie und wo ich an Datum/Uhrzeit des Ereignisses komme.

                                      Ich wäre da für einen Denkanstoss dankbar

                                      OliverIOO Offline
                                      OliverIOO Offline
                                      OliverIO
                                      schrieb am zuletzt editiert von
                                      #74

                                      @Homoran

                                      Zeile 178
                                      https://forum.iobroker.net/post/389135

                                      Meine Adapter und Widgets
                                      TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                                      Links im Profil

                                      HomoranH 1 Antwort Letzte Antwort
                                      0
                                      • OliverIOO OliverIO

                                        @Homoran

                                        Zeile 178
                                        https://forum.iobroker.net/post/389135

                                        HomoranH Nicht stören
                                        HomoranH Nicht stören
                                        Homoran
                                        Global Moderator Administrators
                                        schrieb am zuletzt editiert von
                                        #75

                                        @OliverIO Danke!
                                        Aber....

                                        Im code ist noch alles da:
                                        Der log output von:

                                        log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                                        

                                        bringt

                                        message01: 28 Feb 2020 10:13:51 4159 0002h Code: 4159 Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Installation kontrollieren1
                                        

                                        Da ist das Datum.
                                        Aber msg enthält es nicht.

                                        var msg = msgs.find(item => item.code==code);
                                        

                                        und landet somit mit JSON.stringify nicht im Datenpunkt.

                                        mit den Zeilen zuvor komme ich nicht klar wie ich es in die Message bekommen könnte, sozusagen als msg.date.
                                        Ich denke wegen der [n] es handelt sich wohl um ein Array, aber das ist jenseits meiner Skills

                                        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                                        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                                        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                                        OliverIOO 1 Antwort Letzte Antwort
                                        0
                                        • HomoranH Homoran

                                          @OliverIO Danke!
                                          Aber....

                                          Im code ist noch alles da:
                                          Der log output von:

                                          log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' '+msgtext);
                                          

                                          bringt

                                          message01: 28 Feb 2020 10:13:51 4159 0002h Code: 4159 Typ: Externe Netzstörung Beschreibung: Erhöhte Netzfrequenz Maßnahme: Installation kontrollieren1
                                          

                                          Da ist das Datum.
                                          Aber msg enthält es nicht.

                                          var msg = msgs.find(item => item.code==code);
                                          

                                          und landet somit mit JSON.stringify nicht im Datenpunkt.

                                          mit den Zeilen zuvor komme ich nicht klar wie ich es in die Message bekommen könnte, sozusagen als msg.date.
                                          Ich denke wegen der [n] es handelt sich wohl um ein Array, aber das ist jenseits meiner Skills

                                          OliverIOO Offline
                                          OliverIOO Offline
                                          OliverIO
                                          schrieb am zuletzt editiert von
                                          #76

                                          @Homoran dann
                                          msg.date = date;

                                          Meine Adapter und Widgets
                                          TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                                          Links im Profil

                                          HomoranH 1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

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

                                          609

                                          Online

                                          32.5k

                                          Benutzer

                                          81.7k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe