Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Entwicklung
    4. Js-controller 1.2.3 Testen

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Js-controller 1.2.3 Testen

    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RappiRN Most Active last edited by

      @rantanplan:

      Ok. Habe noch die 1.0.4 :oops:

      Danke für die Info.

      Grüße `

      Ich habe auch vis 1.0.4 und js-controller 1.2.3 und ich habe diese Datenpunkte!

      Enrico

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

        @SchuetzeSchulz:

        Kurze Frage,

        ist hiermit auch das JavaScript-Problem auf Windows-Systemen gelöst, welches mit 1.2.2 "kam"? `
        Ja.

        (bluefox) fix windows problem and storing of error messages
        
        1 Reply Last reply Reply Quote 0
        • Bluefox
          Bluefox last edited by

          @Pman:

          @rantanplan:

          @Bluefox:

          BTW, unter vis.0.datapoints kann man die Anzahl von DPs in jedem vis Projekt finden. Ist bei mir, nach dem Update, aber nicht vorhanden.
          Du brauchst auch Vis von github. `
          Eigentlich sollte so gehen. Die Datenpunkte werden berechnet, wenn diag info gesendet wird.

          Dann sendest du wohl kein Diag Info.

          1 Reply Last reply Reply Quote 0
          • D
            dtp last edited by

            Hab gestern Abend mal auf die 1.2.3 upgedatet. Installation lief soweit problemlos durch unter Raspian Stretch mit Node.js 8.9.1. Allerdings wurden zunächst viele meiner installierten Adapter als nicht installiert angezeigt. Einige musste ich dann auch manuell nachinstallieren, um dann die zusätzlich eingerichtete Instanz wieder zu löschen. Am größten waren die Probleme diesbezüglich beim broadlink2-Adapter.

            Vermutlich hatte das Problem aber damit zu tun, dass ich zwischenzeitlich wegen der parallel installierten Homebridge und dem zugehörigen broadlink-rm-Plugin von Node.js 6.12 auf Node.js 8.9.1. updaten musste.

            Aktuell läuft der ioBroker aber soweit wieder.

            Bis dann,

            Thorsten

            1 Reply Last reply Reply Quote 0
            • Dutchman
              Dutchman Developer Most Active Administrators last edited by

              Hi Torsten,

              Ich sehe hierin auch mehr die Kombination mit den node update

              Bei mir läuft 1.2.3 seit nett Woche problemlos

              –-----------------------

              Send from mobile device

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

                1.2.3 läuft bei mir einige Tage. Ich hatte festgestellt, dass seitdem ein Script nicht mehr läuft und den javascript-Adapter in einer Endlosschleife zum Abstürzen bringt. Kann da ein Zusamenhang sein?

                Script Adapter-Updates:

                ! ```
                `// fragt die angebotenen Updates von ioBroker ab
                // Abfrage dauert etwas (ca. 1 Minute)
                //
                // Repository muss in den ioBroker Einstellungen richtig gepflegt sein
                ! // Übersicht der ioBroker Consolen-Kommandos:
                // https://github.com/ioBroker/ioBroker/wiki/Console-commands
                ! var logOn = true; // Logausgabe im Skript
                var forecreation = true; // true: Datenpunkte werden überschrieben (ween z.B. Bezeichnungen geändert wurden)
                ! var pfad = "Systeminfos.iobroker" + "."; // Pfad in dem die Datenpunkte angelegt werden
                ! // Datenpunktnamen:
                var idListOK = pfad + 'update_liste_verfuegbar';
                var idUpdateList = pfad + "update_liste";
                var idUpdateCount = pfad + "Adapter_updates";
                var idStatusTime = pfad + "status_datum";
                var idAvailableCount = pfad + "Adapter_verfuegbar";
                var idInstalledCount = pfad + "Adapter_installiert";
                var idAktivRepo = pfad + "Repo_aktiv";
                var idAktivRepoUrl = pfad + "Repo_url";
                var idHostUpdate = pfad + "Host_Update_verfuegbar";
                var idBeta = pfad + "Adapter_Anzahl_Betaversionen";
                ! // regelmässige Wiederholungen der Abfrage
                var cronStr = "57 */2 * * *";
                ! var abfrageUpdates = 'iobroker update';
                var abfrageRepo = 'iobroker repo';
                ! // -----------------------------------------------------------------------------
                ! createState(idListOK, false, forecreation, {
                name: 'iobroker update Liste konnte gelesen werden',
                desc: 'iobroker update Liste konnte gelesen werden',
                type: 'boolean',
                unit: '',
                role: 'value'
                });
                ! createState(idUpdateList, "initalisiert", forecreation, {
                name: 'Liste der verfügbaren Updates aus Repo',
                desc: 'Liste der verfügbaren Updates aus Repo',
                type: 'string',
                unit: '',
                role: 'value'
                });
                ! createState(idUpdateCount, 0, forecreation, {
                name: 'Anzahl verfügbarer Updates aus Repo',
                desc: 'Anzahl verfügbarer Updates der installierten Adapter aus Repo',
                type: 'number',
                unit: '',
                role: 'value'
                });
                ! createState(idAvailableCount, 0, forecreation, {
                name: 'Anzahl verfügbarer Adapter im Repo',
                desc: 'Anzahl verfügbarer Adapter im Repo',
                type: 'number',
                unit: '',
                role: 'value'
                });
                ! createState(idInstalledCount, 0, forecreation, {
                name: 'Anzahl installierter Adapter aus Repo',
                desc: 'Anzahl installierter Adapter aus Repo',
                type: 'number',
                unit: '',
                role: 'value'
                });
                ! createState(idStatusTime, now(), forecreation, {
                name: 'Zeitpunkt der letzten Statusabfrage',
                desc: 'Zeitpunkt der letzten Statusabfrage',
                type: 'string',
                unit: '',
                role: 'value'
                });
                ! createState(idAktivRepo, "initalisiert", forecreation, {
                name: 'Als aktiv eingestelltes Repo',
                desc: 'Als aktiv eingestelltes Repo',
                type: 'string',
                unit: '',
                role: 'value'
                });
                ! createState(idAktivRepoUrl, "initalisiert", forecreation, {
                name: 'url des aktiven Repo',
                desc: 'url des aktiven Repo',
                type: 'string',
                unit: '',
                role: 'value'
                });
                ! createState(idHostUpdate, false, forecreation, {
                name: 'iobroker Host update verfügbar',
                desc: 'iobroker Host update verfügbar',
                type: 'boolean',
                unit: '',
                role: 'value'
                });
                ! createState(idBeta, 0, forecreation, {
                name: 'Anzahl installierte Betaversionen',
                desc: 'Anzahl installierte Betaversionen',
                type: 'number',
                unit: '',
                role: 'value'
                });
                ! // -----------------------------------------------------------------------------
                ! function now() {
                return formatDate(new Date(), "hh:mm:ss, YYYY-MM-DD");
                }
                ! function writeJson(json) {
                return JSON.stringify(json); // JSON in String umwandeln, damit das JSON in einem Datenpunkt geschrieben werden kann
                }
                ! function checkBeta(installiertStr,updateStr) {
                var installiertArr = /(\d+).(\d+).(\d+)/g.exec(installiertStr);
                var updateArr = /(\d+).(\d+).(\d+)/g.exec(updateStr);
                //log("installiertArr: " + installiertArr);
                //log("updateArr: " + updateArr);
                var i;
                for ( i=1; i<4; i++ ) {
                log("Stelle: " + i + ": Update: " + updateArr[i] + " : Installiert: " + installiertArr[i]);
                if(parseInt(updateArr[i]) < parseInt(installiertArr[i])) return true;
                }
                return false;
                }
                ! // fragt die möglichen Updates ab
                function abfrageConsoleUpdates() {
                exec(abfrageUpdates, function(err, stdout, stderr) {
                if(logOn) log("Abfrage: "+abfrageUpdates);
                if (err) {
                log("Fehler ioBroker Statusabfrage: " + err,"error");
                return;
                }
                var out = stdout.toString();
                //log(out);
                if(out.match("Error: 404: Not Found") || out.match("Cannot download json")) {
                setState(idUpdateList,"ioBroker Repository nicht gefunden");
                log("ioBroker Repository nicht gefunden","warn");
                setState(idListOK,false);
                return;
                }
                var arrInstalled = out.match(/.+installed.+\n/g);
                var arrUpdates = out.match(/Adapter.+Updateable.+\n/g);
                var arrContrUpdate = out.match(/Controller.+Updateable.+\n/g);
                var arrAvailable = out.match(/Adapter /g);

                    var updates         = 0;
                    var ContrUpdate     = 0;
                    var installiert     = -1;
                    var verfuegbar      = -1;
                    var updateJson      = [];
                    var beta            = 0;
                
                    if(typeof arrInstalled !== 'undefined' && arrInstalled !== null && arrInstalled.length > 0) installiert = arrInstalled.length;
                    if(typeof arrUpdates !== 'undefined' && arrUpdates !== null && arrUpdates.length > 0)  updates = arrUpdates.length;
                    if(typeof arrContrUpdate !== 'undefined' && arrContrUpdate !== null && arrContrUpdate.length > 0)  ContrUpdate = 1;
                    if(typeof arrAvailable !== 'undefined' && arrAvailable !== null && arrAvailable.length > 0) verfuegbar = arrAvailable.length;
                

                ! if(ContrUpdate > 0) {
                if(logOn) log("** HOST Update verfügbar **");
                if(logOn) log("arrContrUpdate: " + arrContrUpdate);
                var arrController = /.+"(.+)".+(\d+.\d+.\d+).+(\d+.\d+.\d+)/g.exec(arrContrUpdate[0]);
                if(logOn) log("arrController: " + arrController);
                ! if(checkBeta(arrController[3],arrController[2])) beta = beta +1;
                ! updateJson.push({
                adapter: arrController[1],
                update: arrController[2],
                version: arrController[3],
                beta: (checkBeta(arrController[3],arrController[2]) ? "Beta" : "")

                        });
                
                    }
                
                    if(updates > 0) {
                        var i;
                        for ( i=0; i <updates; i++/)/{/var/arrupdate="/.+&quot;(.+)&quot;.+(\d+.\d+.\d+).+(\d+.\d+.\d+)/g.exec(arrUpdates[i]);" if(checkbeta(arrupdate[3],arrupdate[2]))/beta="beta" +1;/updatejson.push({/adapter:/arrupdate[1],/update:/arrupdate[2],/version:/arrupdate[3],/beta:/(checkbeta(arrupdate[3],arrupdate[2])/?/"beta"/:/"")/});/}/updates="updates" +/contrupdate/-/beta;/setstate(idupdatecount/,updates);/setstate(idavailablecount/,verfuegbar);/setstate(idinstalledcount/,installiert);/if(updatejson.length="==" 0)/updatejson.push({adapter:"",update:"",version:""});/setstate(idupdatelist/,writejson(updatejson));/setstate(idlistok/,true);/setstate(idstatustime/,now());/setstate(idhostupdate,/(contrupdate="">0 ? true : false));
                    setState(idBeta,            beta);
                

                ! if(logOn) log("Anzahl Adapter in Repo verfügbar: " + verfuegbar);
                if(logOn) log("Anzahl Adapter aus Repo installiert: " + installiert);
                if(logOn) log("Anzahl Adapter mit Updates: " + updates);
                if(logOn) log("Anzahl Adapter als Beta installiert: " + beta);

                });
                

                }

                ! // fragt das aktive Repository ab
                function abfrageConsoleRepo() {
                exec(abfrageRepo, function(err, stdout, stderr) {
                if(logOn) log("Abfrage: "+abfrageRepo);
                if (err) {
                log("Fehler ioBroker Statusabfrage: " + err,"error");
                return;
                }
                var out = stdout.toString();
                ! if(logOn) log(stdout);
                var aktivRepo = stdout.match(/Active repo: (.+)/)[1];
                if(logOn) log("Aktive Repo: " + aktivRepo);
                ! var regex = new RegExp("^"+aktivRepo+": (.+)", "gm");
                var aktivRepoUrl = stdout.match(/^online: (.+)/gm).toString().replace(aktivRepo+": ","");
                if(logOn) log("Aktive Repo url: " + aktivRepoUrl);
                ! setState(idAktivRepo,aktivRepo);
                setState(idAktivRepoUrl,aktivRepoUrl);
                ! });
                }
                ! function abfragen() {
                abfrageConsoleUpdates();
                abfrageConsoleRepo();
                }
                ! // regelmässige Wiederholungen
                // -----------------------------------------------------------------------------
                schedule(cronStr, abfragen);
                ! // main
                // -----------------------------------------------------------------------------
                function main() {
                abfragen();
                }
                ! // Start Skript:
                // -----------------------------------------------------------------------------
                ! setTimeout(main, 500);</updates;>Fehler:~~[code]~~javascript.1 2017-11-29 10:38:52.932 info Start javascript script.js.common.Systeminfos.Adapter-updates
                javascript.1 2017-11-29 10:38:52.283 info received all objects
                javascript.1 2017-11-29 10:38:50.983 info received all states
                javascript.1 2017-11-29 10:38:48.589 info requesting all objects
                javascript.1 2017-11-29 10:38:48.589 info requesting all states
                javascript.1 2017-11-29 10:38:48.589 info starting. Version 3.4.0 in /opt/iobroker/node_modules/iobroker.javascript, node: v6.12.0
                host.brix-3150 2017-11-29 10:38:46.993 info instance system.adapter.javascript.1 started with pid 2633
                host.brix-3150 2017-11-29 10:38:16.952 info Restart adapter system.adapter.javascript.1 because enabled
                host.brix-3150 2017-11-29 10:38:16.952 error instance system.adapter.javascript.1 terminated with code 0 (OK)
                Caught 2017-11-29 10:38:16.952 error by controller[0]: at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
                Caught 2017-11-29 10:38:16.952 error by controller[0]: at maybeClose (internal/child_process.js:920:16)
                Caught 2017-11-29 10:38:16.952 error by controller[0]: at ChildProcess.emit (events.js:191:7)
                Caught 2017-11-29 10:38:16.951 error by controller[0]: at emitTwo (events.js:106:13)
                Caught 2017-11-29 10:38:16.951 error by controller[0]: at ChildProcess.exithandler (child_process.js:189:7)
                Caught 2017-11-29 10:38:16.950 error by controller[0]: at script.js.common.Systeminfos.Adapter-updates:345:59
                Caught 2017-11-29 10:38:16.946 error by controller[0]: TypeError: Cannot read property 'toString' of null
                javascript.1 2017-11-29 10:38:16.869 info terminating
                javascript.1 2017-11-29 10:38:16.823 error at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
                javascript.1 2017-11-29 10:38:16.823 error at maybeClose (internal/child_process.js:920:16)
                javascript.1 2017-11-29 10:38:16.823 error at ChildProcess.emit (events.js:191:7)
                javascript.1 2017-11-29 10:38:16.823 error at emitTwo (events.js:106:13)
                javascript.1 2017-11-29 10:38:16.823 error at ChildProcess.exithandler (child_process.js:189:7)
                javascript.1 2017-11-29 10:38:16.823 error at script.js.common.Systeminfos.Adapter-updates:345:59
                javascript.1 2017-11-29 10:38:16.823 error TypeError: Cannot read property 'toString' of null
                javascript.1 2017-11-29 10:38:16.822 error uncaught exception: Cannot read property 'toString' of null[/code]`[/i][/i][/i][/i][/i]

                1 Reply Last reply Reply Quote 0
                • AlCalzone
                  AlCalzone Developer last edited by

                  @lobomau:

                  Caught   2017-11-29 10:38:16.950   error   by controller[0]: at script.js.common.Systeminfos.Adapter-updates:345:59
                  Caught   2017-11-29 10:38:16.946   error   by controller[0]: TypeError: Cannot read property 'toString' of null
                  ```` `  
                  

                  Habe jetzt keine Lust bis Zeile 345 zu zählen, wie sieht die denn aus?

                  1 Reply Last reply Reply Quote 0
                  • blauholsten
                    blauholsten Developer last edited by

                    @AlCalzone:

                    @lobomau:

                    Caught   2017-11-29 10:38:16.950   error   by controller[0]: at script.js.common.Systeminfos.Adapter-updates:345:59
                    Caught   2017-11-29 10:38:16.946   error   by controller[0]: TypeError: Cannot read property 'toString' of null
                    ```` `  
                    

                    Habe jetzt keine Lust bis Zeile 345 zu zählen, wie sieht die denn aus? `
                    Beim kurzfristig en überfliegen findet eine regex Abfrage statt, die dann als String umgewandelt werden soll. Diese scheint aber null zu liefern, und somit einen Fehler zu werfen….

                    Aus meiner Sicht fehlt eine Abfrage auf null und undefiniert bzw. Ein try/catch Block um das abzufangen

                    1 Reply Last reply Reply Quote 0
                    • AlCalzone
                      AlCalzone Developer last edited by

                      Das wird dann wohl diese Zeile sein

                              var aktivRepoUrl = stdout.match(/^online: (.+)/gm).toString().replace(aktivRepo+": ","");
                      

                      Da hat sich anscheinend die Ausgabe von "iobroker repo" in der Konsole geändert.

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

                        Ich laufe auch seit einigen Tagen fehlerfrei mit der v.1.2.3

                        Das Update lief problemlos durch.

                        Allerdings habe ich keine neuen Funktionen getestet

                        node v.6.12.0

                        npm v.3.10.10

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        758
                        Online

                        31.7k
                        Users

                        79.8k
                        Topics

                        1.3m
                        Posts

                        11
                        20
                        1769
                        Loading More Posts
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes
                        Reply
                        • Reply as topic
                        Log in to reply
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                        The ioBroker Community 2014-2023
                        logo