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

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    11
    1
    355

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.6k

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

Parser

Geplant Angeheftet Gesperrt Verschoben ioBroker Allgemein
parser
108 Beiträge 3 Kommentatoren 9.6k 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.
  • HomoranH Homoran

    @OliverIO sagte in Parser:

    dann müsste da em ende der protokollausgabe in der Skript engine so etwas wie folgt rauskommen

    sorry nein:

    18:07:44.048	info	javascript.0 (27541) Stop script script.js.Helios_ErrorTest
    18:07:44.152	info	javascript.0 (27541) Start javascript script.js.Helios_ErrorTest
    18:07:44.158	info	javascript.0 (27541) script.js.Helios_ErrorTest: getEvents
    18:07:44.159	info	javascript.0 (27541) script.js.Helios_ErrorTest: pikorequest
    18:07:44.159	info	javascript.0 (27541) script.js.Helios_ErrorTest: query: http://192.168.138.103/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546
    18:07:44.161	info	javascript.0 (27541) script.js.Helios_ErrorTest: registered 0 subscriptions and 0 schedules
    18:07:44.189	info	javascript.0 (27541) script.js.Helios_ErrorTest: error: null
    18:07:44.190	info	javascript.0 (27541) script.js.Helios_ErrorTest: Status: 200
    18:07:44.190	info	javascript.0 (27541) script.js.Helios_ErrorTest: response: {"statusCode":200,"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}}","headers":{"content-type":"text/plain","expires":"Sun, 02 Jan 2000 11:11:11 GMT"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"192.168.138.103","port":80,"hostname":"192.168.138.103","hash":null,"search":"?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","query":"sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","pathname":"/api/dxs.json","path":"/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","href":"http://192.168.138.103/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546"},"method":"GET","headers":{}}}
    18:07:44.191	info	javascript.0 (27541) script.js.Helios_ErrorTest: events: {"statusCode":200,"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}}","headers":{"content-type":"text/plain","expires":"Sun, 02 Jan 2000 11:11:11 GMT"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"192.168.138.103","port":80,"hostname":"192.168.138.103","hash":null,"search":"?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","query":"sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","pathname":"/api/dxs.json","path":"/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546","href":"http://192.168.138.103/api/dxs.json?sessionid=iobroker&dxsEntries=234881792&dxsEntries=234881537&dxsEntries=234881538&dxsEntries=234881539&dxsEntries=234881540&dxsEntries=234881541&dxsEntries=234881542&dxsEntries=234881543&dxsEntries=234881544&dxsEntries=234881545&dxsEntries=234881546"},"method":"GET","headers":{}}}
    18:07:44.192	error	javascript.0 (27541) script.js.Helios_ErrorTest: TypeError: Cannot read property 'find' of undefined
    18:07:44.193	error	javascript.0 (27541) at getResponseId (script.js.Helios_ErrorTest:70:32)
    18:07:44.193	error	javascript.0 (27541) at script.js.Helios_ErrorTest:17:16
    18:07:44.193	error	javascript.0 (27541) at Request._callback (script.js.Helios_ErrorTest:61:17)
    

    Das ganze kam mir nicht ganz unbekannt vor.
    Das Skript mit dem ich die aktuellen Werte auslese sieht so aus:

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

    Hat auch jemand hier aus dem Forum gemacht

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

    @Homoran

    so nochmal probieren.

    var domain = '192.168.1.20'; // domain or ip without http:// or https:// 
    var url = '/api/dxs.json';
     
    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
            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';
                log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' ');
            }
        });
    }
     
    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 = {"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;
     
                if (!error && response.statusCode == 200) {
                    //log('Status: '+ response.statusCode);
                    //log('response: '+ JSON.stringify(response));
                    callback(JSON.parse(body));
                } else {
                    //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 1 Antwort Letzte Antwort
    0
    • OliverIOO OliverIO

      @Homoran

      so nochmal probieren.

      var domain = '192.168.1.20'; // domain or ip without http:// or https:// 
      var url = '/api/dxs.json';
       
      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
              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';
                  log('message' + i+1 + ': ' + date + ' '  + code + ' '  + env + ' ');
              }
          });
      }
       
      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 = {"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;
       
                  if (!error && response.statusCode == 200) {
                      //log('Status: '+ response.statusCode);
                      //log('response: '+ JSON.stringify(response));
                      callback(JSON.parse(body));
                  } else {
                      //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 Offline
      HomoranH Offline
      Homoran
      Global Moderator Administrators
      schrieb am zuletzt editiert von
      #54

      @OliverIO sagte in Parser:

      so nochmal probieren.

      Super!!!

      8:29:28.245	info	javascript.0 (27541) script.js.Helios_ErrorTest: message01: 28 Feb 2020 10:13:51 4159 0002h
      

      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
      • OliverIOO Offline
        OliverIOO Offline
        OliverIO
        schrieb am zuletzt editiert von
        #55

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

        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 sagte in Parser:

          so nochmal probieren.

          Super!!!

          8:29:28.245	info	javascript.0 (27541) script.js.Helios_ErrorTest: message01: 28 Feb 2020 10:13:51 4159 0002h
          
          OliverIOO Offline
          OliverIOO Offline
          OliverIO
          schrieb am zuletzt editiert von
          #56

          @Homoran jetzt musst du nur noch entscheiden in welcher form du das als datenpunkt haben willst. wie gesagt, es können bis zu 10 events rauskommen.
          das mapping bekomm ich auch hin

          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

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

            HomoranH Offline
            HomoranH Offline
            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 Offline
                  HomoranH Offline
                  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 Offline
                      HomoranH Offline
                      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 Offline
                          HomoranH Offline
                          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 Offline
                              HomoranH Offline
                              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 Offline
                                HomoranH Offline
                                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 Offline
                                  HomoranH Offline
                                  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 Offline
                                      HomoranH Offline
                                      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 Offline
                                          HomoranH Offline
                                          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
                                          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

                                          325

                                          Online

                                          32.5k

                                          Benutzer

                                          81.8k

                                          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