Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Hilfe für Javascript Legastheniker und js v8.3.x

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Hilfe für Javascript Legastheniker und js v8.3.x

    This topic has been deleted. Only users with topic management privileges can see it.
    • haus-automatisierung
      haus-automatisierung Developer Most Active @Homoran last edited by

      @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

      Das "Problem" ist, dass duese Doku sich an Programmierer richtet

      Richtig, so wie sich auch JavaScript-Scripts im Adapter an Programmierer richten. Wer vorher request verstanden hat, sollte damit kein Problem haben

      Homoran 1 Reply Last reply Reply Quote 1
      • Homoran
        Homoran Global Moderator Administrators @haus-automatisierung last edited by

        @haus-automatisierung sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

        Wer vorher request verstanden hat, sollte damit kein Problem haben

        korrekt!
        Aber genau um diese User geht es mir hier nicht, sondern um Hilfe für

        @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

        c&p User, die 'nur mal eben' was anpassen wollen

        haus-automatisierung 1 Reply Last reply Reply Quote 0
        • haus-automatisierung
          haus-automatisierung Developer Most Active @Homoran last edited by

          @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

          c&p User, die 'nur mal eben' was anpassen wollen

          Da wäre es eigentlich schöner, wenn man nicht jeden Script direkt auf httpGet umschreibt, sondern erstmal schaut ob das nicht auch per Blockly lösbar wäre.

          Ja, da sind auch nicht alle Parameter enthalten welche es in JS gibt, aber mittlerweile kann man doch recht viel erreichen, was vorher nicht ging (und JavaScript erfordert hat).

          Homoran 1 Reply Last reply Reply Quote 1
          • Homoran
            Homoran Global Moderator Administrators @haus-automatisierung last edited by Homoran

            @haus-automatisierung sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

            sondern erstmal schaut ob das nicht auch per Blockly lösbar wäre.

            ja, wäre vielleicht eine Möglichkeit.

            Wenn ich meine js-Skripte als Beispiel nehme, so stammen sie aus Zeiten als es noch kein Blockly gab.
            Außerdem sind sie teilweise so umfangreich, dass eine Umstellung auf Blockly 'mal eben' gar nicht möglich ist.

            Weiterhin gibt es unter den 80.000 iobroker Anwendern reichlich User, die von sich sagen, dass sie "kein Java können", aber meist schon am strukturierten, logischen Ansatz scheitern, was durchaus zu akzeptieren sein sollte.
            Wir können nicht davon ausgehen, dass jeder Anwender programmieren kann!
            Das will ich auch nicht als Bedingung für ioBroker voraussetzen!

            haus-automatisierung 1 Reply Last reply Reply Quote 0
            • haus-automatisierung
              haus-automatisierung Developer Most Active @Homoran last edited by

              @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

              Wir können nicht davon ausgehen, dass jeder Anwender programmieren kann!

              Richtig, deswegen gibt's ja Blockly. Aber das Problem bleiben ja ältere Beiträge hier im Forum, welche man über Google findet und dann 1:1 übernimmt. Die sollte man ggf. entsprechend kennzeichnen.

              Homoran 1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @haus-automatisierung last edited by

                @haus-automatisierung sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                deswegen gibt's ja Blockly.

                Das ist keine Programmierung?? 🤔

                haus-automatisierung 1 Reply Last reply Reply Quote 0
                • haus-automatisierung
                  haus-automatisierung Developer Most Active @Homoran last edited by

                  @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                  Das ist keine Programmierung??

                  Doch klar, aber ohne die Syntax kennen zu müssen.

                  Habe das hier gerade kurz zusammengeschrieben: https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/upgrade-guide.md

                  Hätte das gern alles an einer Stelle und nicht verteilt im Forum (gibt ja schon zig Threads).

                  Homoran 1 Reply Last reply Reply Quote 1
                  • Homoran
                    Homoran Global Moderator Administrators @haus-automatisierung last edited by Homoran

                    @haus-automatisierung sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                    Doch klar, aber ohne die Syntax kennen zu müssen.

                    das beträfe mich, aber nicht die vorhin genannte andere Gruppe

                    @haus-automatisierung sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                    Hätte das gern alles an einer Stelle und nicht verteilt im Forum

                    dann bitte hier im Forum.
                    Das Forum ist der zentrale Anlaufpunkt für User.

                    Oder ist das verlinkte nur für Entwickler?

                    ganz davon abgesehen ist /en/ auch nicht allen Usern geläufig

                    haus-automatisierung 1 Reply Last reply Reply Quote 0
                    • haus-automatisierung
                      haus-automatisierung Developer Most Active @Homoran last edited by

                      @homoran sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                      Oder ist das verlinkte nur für Entwickler?

                      Für alle, welche den Adapter nutzen. Dafür gibt es doch die Dokumentation je Adapter, oder? Das landet ja dann auch alles hier:

                      https://www.iobroker.net/#en/adapters/adapterref/iobroker.javascript/README.md

                      Zumindest hatte ich mir noch vorgenommen, die Blockly-Dokumentation auf den aktuellen Stand zu bringen (auf drei Sprachen). Ist natürlich eine menge Arbeit und wäre Quatsch, wenn das eh niemand liest.

                      1 Reply Last reply Reply Quote 1
                      • apollon77
                        apollon77 last edited by apollon77

                        Aber nochmal für mich: Warum muss Rainer überhaupt was ändern? Ich dachte das "request" als Paket weiterhin da ist nur halt nicht mehr automatisch drin ist. Also mit einem

                        var request = require("request");
                        

                        sollte doch weiterhin alles gehen, oder? Vllt hätten wir in der Doku die Request Beispiele mit Deprecation info noch lassen sollen?

                        haus-automatisierung 1 Reply Last reply Reply Quote 0
                        • haus-automatisierung
                          haus-automatisierung Developer Most Active @apollon77 last edited by

                          @apollon77 Ja, funktioniert alles. Und ist im Standard auch noch als dependency erhalten. Es gibt nur eine Warnung im Log. Mehr nicht.

                          apollon77 1 Reply Last reply Reply Quote 1
                          • apollon77
                            apollon77 @haus-automatisierung last edited by

                            @haus-automatisierung Vllt machen wir wie bei anderen deprecations eine "info" log draus? damit man es im Log unterdrücken kann? oder nur einmal die warnung per skript per vorkommen? Weil wenn ich alle 5s einen "request" call mache dann ist das schon viel log 🙂

                            haus-automatisierung 1 Reply Last reply Reply Quote 0
                            • haus-automatisierung
                              haus-automatisierung Developer Most Active @apollon77 last edited by

                              @apollon77 sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                              Vllt machen wir wie bei anderen deprecations eine "info" log draus?

                              Dann macht wieder keiner was und die Leute, welche das Loglevel jetzt schon angepasst haben, sind am Ende wieder überrascht warum es "plötzlich" nicht mehr geht. 😞

                              apollon77 1 Reply Last reply Reply Quote 0
                              • apollon77
                                apollon77 @haus-automatisierung last edited by

                                @haus-automatisierung Ja ich weiss, aber glabe mir, wir haben da so einige Erfahrungen mit Deprecations und Usern ... und beim JavaScript Adapter ist das - wie man hier auch sieht, wo Kenntnisswelten aufeinanderprallen - nochmal ne andere Baustelle.

                                Viele User haben sich irgendwann man Skripte herkopiert und vllt "zurechtgepfuscht" (Alles gut - weil Sie es nicht besser können) ... die Rennen jetzt dann alle da rein. Sollten wir. auch bedenken.
                                Wir haben verschiedenene User-Typen hier und ganz viele sind halt keine (Skript) Profis. Von daher finde ich Rainers ansinnen super hier im Forum eine deutsche und ausführlichere Variante der Migration-Infos zu haben.

                                O 1 Reply Last reply Reply Quote 3
                                • O
                                  oFbEQnpoLKKl6mbY5e13 @apollon77 last edited by oFbEQnpoLKKl6mbY5e13

                                  Ich finde es gut, dass @Homoran versucht, eine für Anwender verständliche Anleitung zum Umbau von request auf httpget zu erstellen. Ich finde es auch richtig, von request wegzukommen.

                                  Danke an @haus-automatisierung !

                                  Aber auch ich nutze ein Skript, welches ich von hier kopiert habe:

                                  https://github.com/volkerrichert/ioBroker.mymuell

                                  Ich kann das trotz der Hinweise von @Homoran nicht umbauen.

                                  Hier das Original:

                                  const city_id = XXXXX;
                                  const area_id = XXX;
                                  const logging = false;
                                  const name = 'Müllabfuhr';
                                  const numberOfEntries = 69;
                                  
                                  const request = require('request');
                                  const instanz = '0_userdata.' + instance + '.muell';
                                  
                                  if (logging) log('starting muell.' + instanz);
                                  
                                  extendObject(instanz, {
                                         type: "device",
                                         common: {
                                             name: name
                                         }
                                     }, function (err) {
                                         if (err) {
                                             log('could not create device: ', 'warn');
                                             return;
                                         }
                                     
                                     }
                                  );
                                  let baseData = {};
                                  
                                  // query names first
                                  request({
                                     url: 'https://mymuell.jumomind.com/mmapp/api.php?r=trash&city_id=' + city_id + '&area_id=' + area_id, 
                                     method: 'GET', 
                                     headers: { 'Accept': 'application/json' }
                                     }, function(error, response, body) {
                                         if (!error && response.statusCode == 200) {
                                             var data = JSON.parse(body);  // info ist ein Objekt
                                             data.forEach((v, i) => {
                                                 baseData[v._name] = v;
                                             })
                                             updateMuell();
                                         }
                                     }
                                  );
                                  
                                  schedule('{"time":{"exactTime":true,"start":"12:17"},"period":{"days":1}}', updateMuell);
                                  
                                  function updateMuell() {
                                     var options = {url: 'https://mymuell.jumomind.com/webservice.php?idx=termins&city_id=' + city_id + '&area_id=' + area_id + '&ws=3', method: 'GET', headers: { 'Accept': 'application/json' }};
                                  
                                     request(options, function(error, response, body) {
                                         if (!error && response.statusCode == 200) {
                                             var info = JSON.parse(body);  // info ist ein Objekt
                                             if (info[0].Ack === 'Success') {
                                                 var data = info[0]._data;  // xy ist eine Eigenschaft des Objektes info
                                                 let counter = 0;
                                                 const date = (new Date())
                                                 const todayStr = date.getFullYear() + "-" + ('00' + (date.getMonth() + 1 )).slice(-2) + "-" + ('00' + date.getDate()).slice(-2)
                                                 log(todayStr);
                                                 data.forEach((v, i) => {
                                                     if (todayStr < v.cal_date && counter <= numberOfEntries) {
                                                         
                                                         const basePath = instanz + '.' + ('000' + counter).slice(-3);
                                                         log(v.cal_date + ' -> ' + basePath, 'debug');
                                                         // States erstellen
                                                         extendObject(basePath, {
                                                                 type: "channel",
                                                                 common: {
                                                                     name: v.cal_date_normal
                                                                 }
                                                             }, function (err) {
                                                                 if (err) {
                                                                     log('could not create device: ', 'warn');
                                                                     return;
                                                                 }
                                                             
                                                             }
                                                         );
                                                         createState(basePath + '.date', v.cal_date_normal, {
                                                             name: 'Datum',
                                                             desc: 'Datum der Abholung',
                                                             type: 'string',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.date', v.cal_date_normal, true);
                                                         });
                                                         
                                                         createState(basePath + '.desc', baseData[v.cal_garbage_type].title, {
                                                             name: 'Beschreibung',
                                                             desc: 'Beschreibung der Abholung',
                                                             type: 'string',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.desc', baseData[v.cal_garbage_type].title, true);
                                                         });
                                                         createState(basePath + '.color', {
                                                             name: 'Farbe',
                                                             desc: 'Farbe',
                                                             type: 'string',
                                                             role: 'level.color',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.color', baseData[v.cal_garbage_type].color, true);
                                                         });
                                  
                                                         counter++;
                                                     }
                                                 });
                                             }
                                         }
                                     });
                                  };
                                  

                                  Hier mein Versuch (Funktion nicht getestet):

                                  const city_id = XXXXX;
                                  const area_id = XXX;
                                  const logging = false;
                                  const name = 'Müllabfuhr';
                                  const numberOfEntries = 69;
                                  
                                  const axios = require('axios');
                                  const instanz = '0_userdata.' + instance + '.muell';
                                  
                                  if (logging) log('starting muell.' + instanz);
                                  
                                  extendObject(instanz, {
                                         type: "device",
                                         common: {
                                             name: name
                                         }
                                     }, function (err) {
                                         if (err) {
                                             log('could not create device: ', 'warn');
                                             return;
                                         }
                                     
                                     }
                                  );
                                  let baseData = {};
                                  
                                  // query names first
                                  httpGet({
                                     url: 'https://mymuell.jumomind.com/mmapp/api.php?r=trash&city_id=' + city_id + '&area_id=' + area_id, 
                                     method: 'GET', 
                                     headers: { 'Accept': 'application/json' }
                                     }, function(error, response) {
                                         if (!error && response.data == 200) {
                                             var data = JSON.parse(body);  // info ist ein Objekt
                                             data.forEach((v, i) => {
                                                 baseData[v._name] = v;
                                             })
                                             updateMuell();
                                         }
                                     }
                                  );
                                  
                                  schedule('{"time":{"exactTime":true,"start":"12:17"},"period":{"days":1}}', updateMuell);
                                  
                                  function updateMuell() {
                                     var options = {url: 'https://mymuell.jumomind.com/webservice.php?idx=termins&city_id=' + city_id + '&area_id=' + area_id + '&ws=3', method: 'GET', headers: { 'Accept': 'application/json' }};
                                  
                                     httpGet(options, (error, response) {
                                         if (!error && response.data == 200) {
                                             var info = JSON.parse(body);  // info ist ein Objekt
                                             if (info[0].Ack === 'Success') {
                                                 var data = info[0]._data;  // xy ist eine Eigenschaft des Objektes info
                                                 let counter = 0;
                                                 const date = (new Date())
                                                 const todayStr = date.getFullYear() + "-" + ('00' + (date.getMonth() + 1 )).slice(-2) + "-" + ('00' + date.getDate()).slice(-2)
                                                 log(todayStr);
                                                 data.forEach((v, i) => {
                                                     if (todayStr < v.cal_date && counter <= numberOfEntries) {
                                                         
                                                         const basePath = instanz + '.' + ('000' + counter).slice(-3);
                                                         log(v.cal_date + ' -> ' + basePath, 'debug');
                                                         // States erstellen
                                                         extendObject(basePath, {
                                                                 type: "channel",
                                                                 common: {
                                                                     name: v.cal_date_normal
                                                                 }
                                                             }, function (err) {
                                                                 if (err) {
                                                                     log('could not create device: ', 'warn');
                                                                     return;
                                                                 }
                                                             
                                                             }
                                                         );
                                                         createState(basePath + '.date', v.cal_date_normal, {
                                                             name: 'Datum',
                                                             desc: 'Datum der Abholung',
                                                             type: 'string',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.date', v.cal_date_normal, true);
                                                         });
                                                         
                                                         createState(basePath + '.desc', baseData[v.cal_garbage_type].title, {
                                                             name: 'Beschreibung',
                                                             desc: 'Beschreibung der Abholung',
                                                             type: 'string',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.desc', baseData[v.cal_garbage_type].title, true);
                                                         });
                                                         createState(basePath + '.color', {
                                                             name: 'Farbe',
                                                             desc: 'Farbe',
                                                             type: 'string',
                                                             role: 'level.color',
                                                             read: true,
                                                             write: false
                                                         }, () => {
                                                             setState(basePath + '.color', baseData[v.cal_garbage_type].color, true);
                                                         });
                                  
                                                         counter++;
                                                     }
                                                 });
                                             }
                                         }
                                     });
                                  };
                                  

                                  haus-automatisierung Homoran 3 Replies Last reply Reply Quote 0
                                  • haus-automatisierung
                                    haus-automatisierung Developer Most Active @oFbEQnpoLKKl6mbY5e13 last edited by

                                    @ofbeqnpolkkl6mby5e13 MyMüll hab ich im Trashschedule Adapter doch schon integriert 🙃

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

                                      @ofbeqnpolkkl6mby5e13 sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                                      Hier mein Versuch

                                      du hast auf axios umgebaut?
                                      die Hinweise sind für httpGet

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

                                        @ofbeqnpolkkl6mby5e13 sagte in Hilfe für Javascript Legastheniker und js v8.3.x:

                                        var data = JSON.parse(body); // info ist ein Objekt

                                        und zumindest da ist noch ein body anstelle von response.data

                                        1 Reply Last reply Reply Quote 0
                                        • O
                                          oFbEQnpoLKKl6mbY5e13 @haus-automatisierung last edited by oFbEQnpoLKKl6mbY5e13

                                          @haus-automatisierung

                                          Könntest du bitte trotz Trashschedule-Adapter helfen, das Skript auf httpGet umzustellen?

                                          Mein aktueller Stand:

                                          const city_id = XXXXX;
                                          const area_id = XXX;
                                          const logging = false;
                                          const name = 'Müllabfuhr';
                                          const numberOfEntries = 69;
                                          
                                          const instanz = '0_userdata.' + instance + '.muell-test';
                                          
                                          if (logging) log('starting muell.' + instanz);
                                          
                                          extendObject(instanz, {
                                                 type: "device",
                                                 common: {
                                                     name: name
                                                 }
                                             }, function (err) {
                                                 if (err) {
                                                     log('could not create device: ', 'warn');
                                                     return;
                                                 }
                                             
                                             }
                                          );
                                          let baseData = {};
                                          
                                          // query names first
                                          httpGet('https://mymuell.jumomind.com/mmapp/api.php?r=trash&city_id=' + city_id + '&area_id=' + area_id, { timeout: 2000 }, (error, response) => {
                                             if (!error && response.data == 200) {
                                                 console.log(response.statusCode);
                                                 console.log(response.data);
                                             } else {
                                                 console.error(error);
                                             var data = JSON.parse(response.data);  // info ist ein Objekt
                                                     data.forEach((v, i) => {
                                                         baseData[v._name] = v;
                                                     })
                                             updateMuell();	
                                             }
                                          });
                                          
                                          schedule('{"time":{"exactTime":true,"start":"12:17"},"period":{"days":1}}', updateMuell);
                                          
                                          function updateMuell() {
                                             var options = 'https://mymuell.jumomind.com/webservice.php?idx=termins&city_id=' + city_id + '&area_id=' + area_id + '&ws=3'
                                          
                                             httpGet(options), (error, response)
                                                 if (!error && response.data == 200) 
                                                     var info = JSON.parse(response.data);  // info ist ein Objekt
                                                     if (info[0].Ack === 'Success') {
                                                         var data = info[0]._data;  // xy ist eine Eigenschaft des Objektes info
                                                         let counter = 0;
                                                         const date = (new Date())
                                                         const todayStr = date.getFullYear() + "-" + ('00' + (date.getMonth() + 1 )).slice(-2) + "-" + ('00' + date.getDate()).slice(-2)
                                                         log(todayStr);
                                                         data.forEach((v, i) => {
                                                             if (todayStr < v.cal_date && counter <= numberOfEntries) {
                                                                 
                                                                 const basePath = instanz + '.' + ('000' + counter).slice(-3);
                                                                 log(v.cal_date + ' -> ' + basePath, 'debug');
                                                                 // States erstellen
                                                                 extendObject(basePath, {
                                                                         type: "channel",
                                                                         common: {
                                                                             name: v.cal_date_normal
                                                                         }
                                                                     }, function (err) {
                                                                         if (err) {
                                                                             log('could not create device: ', 'warn');
                                                                             return;
                                                                         }
                                                                     
                                                                     }
                                                                 );
                                                                 createState(basePath + '.date', v.cal_date_normal, {
                                                                     name: 'Datum',
                                                                     desc: 'Datum der Abholung',
                                                                     type: 'string',
                                                                     read: true,
                                                                     write: false
                                                                 }, () => {
                                                                     setState(basePath + '.date', v.cal_date_normal, true);
                                                                 });
                                                                 
                                                                 createState(basePath + '.desc', baseData[v.cal_garbage_type].title, {
                                                                     name: 'Beschreibung',
                                                                     desc: 'Beschreibung der Abholung',
                                                                     type: 'string',
                                                                     read: true,
                                                                     write: false
                                                                 }, () => {
                                                                     setState(basePath + '.desc', baseData[v.cal_garbage_type].title, true);
                                                                 });
                                                                 createState(basePath + '.color', {
                                                                     name: 'Farbe',
                                                                     desc: 'Farbe',
                                                                     type: 'string',
                                                                     role: 'level.color',
                                                                     read: true,
                                                                     write: false
                                                                 }, () => {
                                                                     setState(basePath + '.color', baseData[v.cal_garbage_type].color, true);
                                                                 });
                                          
                                                                 counter++;
                                                             }
                                                         });
                                                     }
                                                 };
                                             
                                          

                                          2024-05-26 18:33:57.582  - info: javascript.0 (3416) Start JavaScript script.js.common._Tests.Test_17 (JavaScript/js)
                                          2024-05-26 18:33:57.614  - info: javascript.0 (3416) script.js.common._Tests.Test_17: registered 0 subscriptions, 1 schedule, 0 messages, 0 logs and 0 file subscriptions
                                          2024-05-26 18:33:57.705  - error: javascript.0 (3416) script.js.common._Tests.Test_17: null
                                          2024-05-26 18:33:57.707  - error: javascript.0 (3416) Error in callback: TypeError: Cannot read properties of undefined (reading 'headers')
                                          2024-05-26 18:33:57.708  - error: javascript.0 (3416)     at getHttpRequestConfig (/opt/iobroker/node_modules/iobroker.javascript/lib/tools.js:139:18)
                                          2024-05-26 18:33:57.708  - error: javascript.0 (3416)     at httpGet (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1179:20)
                                          2024-05-26 18:33:57.708  - error: javascript.0 (3416)     at updateMuell (script.js.common._Tests.Test_17:47:5)
                                          2024-05-26 18:33:57.709  - error: javascript.0 (3416)     at Object.<anonymous> (script.js.common._Tests.Test_17:38:5)
                                          2024-05-26 18:33:57.709  - error: javascript.0 (3416)     at /opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1189:38
                                          2024-05-26 18:33:57.709  - error: javascript.0 (3416)     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                                          2024-05-26 18:33:59.284  - info: javascript.0 (3416) Stopping script script.js.common._Tests.Test_17
                                          
                                          T Homoran 2 Replies Last reply Reply Quote 0
                                          • T
                                            TT-Tom @oFbEQnpoLKKl6mbY5e13 last edited by

                                            @ofbeqnpolkkl6mby5e13

                                            response.data sind deine Daten die zurückkommen, die wirst du nicht auf den Status prüfen wollen.
                                            Da müsste also response.statusCode stehen.

                                            if (!error && response.data == 200)
                                            
                                            O Homoran 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            776
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            8
                                            104
                                            6395
                                            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