Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Gelöst: Keine Ahnung von API

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    12
    1
    128

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.3k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

Gelöst: Keine Ahnung von API

Scheduled Pinned Locked Moved Skripten / Logik
23 Posts 4 Posters 1.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J JoergH

    @michihorn Es gibt doch einen Datenpunkt "LoadURL", da würde ich mal die URL eintragen, z.B. per Blockly...

    M Online
    M Online
    michihorn
    wrote on last edited by
    #3

    @joergh Ich habe meine Beotrag noch etwas ausformuliert. Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen, kein Blocky.

    J OliverIOO 2 Replies Last reply
    0
    • M michihorn

      @joergh Ich habe meine Beotrag noch etwas ausformuliert. Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen, kein Blocky.

      J Offline
      J Offline
      JoergH
      wrote on last edited by
      #4

      @michihorn sagte in Keine Ahnung von API:

      @joergh Ich habe meine Beotrag noch etwas ausformuliert. Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen, kein Blocky.

      Dann schreib es doch in Blockly und schalte dann auf Javascript Darstellung um...oder was für ein "Script" meinst Du?

      1 Reply Last reply
      0
      • M michihorn

        @joergh Ich habe meine Beotrag noch etwas ausformuliert. Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen, kein Blocky.

        OliverIOO Offline
        OliverIOO Offline
        OliverIO
        wrote on last edited by OliverIO
        #5

        @michihorn sagte in Keine Ahnung von API:

        Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen

        datenpunkte können mit setState geschrieben werden
        https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md#setstate

        und wenn du unbedingt per REST den datenpunkt beschreiben willst, dann mit dem simpleapi adapter

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

        M 1 Reply Last reply
        0
        • OliverIOO OliverIO

          @michihorn sagte in Keine Ahnung von API:

          Die Frage ist wie setze ich den Befehl ab, wie könnte ein Script aussehen

          datenpunkte können mit setState geschrieben werden
          https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md#setstate

          und wenn du unbedingt per REST den datenpunkt beschreiben willst, dann mit dem simpleapi adapter

          M Online
          M Online
          michihorn
          wrote on last edited by
          #6

          @oliverio Hallöchen
          ich weiß wie man Datenpunkte beschreibt, aber wie beschreibe ich per API die StartURL im FullyBrowser.

          OliverIOO 1 Reply Last reply
          0
          • M michihorn

            @oliverio Hallöchen
            ich weiß wie man Datenpunkte beschreibt, aber wie beschreibe ich per API die StartURL im FullyBrowser.

            OliverIOO Offline
            OliverIOO Offline
            OliverIO
            wrote on last edited by OliverIO
            #7

            @michihorn

            dann verstehe ich dich nicht.
            du beschreibst den datenpunkt des adapters
            der adapter sorgt dafür das dem fully mitzuteilen

            adapter sind doch dafür da eine einheitlichen zugriff per datenpunkt auf beliebige geräte bereitzustellen

            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 Reply Last reply
            1
            • M Online
              M Online
              michihorn
              wrote on last edited by michihorn
              #8

              @oliverio Ich möchte ohne Fully-Adapter in den Fully Browser schreiben. Dazu hat der Entwickler eine Abhandlung über Rest-Api in der Doku gepackt. (siehe erster Post).
              Da ich nicht weiß wie ich einen Http Befehl an ein externes Gerät sende, habe ich dieses Thema eröffnet.
              Im übrigen ich nutze noch Java 7.8.0.

              Ich habe es mal so versucht:

              var request = require('request');
              
              schedule("* * * * *", function () {
              
              require('request')("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl");
               
              )
              });
              

              Bekomme aber folgende Fehlermeldung im LOG

              
              javascript.0
              2024-10-14 17:34:46.011	error	at processImmediate (node:internal/timers:485:21)
              
              javascript.0
              2024-10-14 17:34:46.011	error	at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.javascript/main.js:1676:17)
              
              javascript.0
              2024-10-14 17:34:46.011	error	at /opt/iobroker/node_modules/iobroker.javascript/main.js:2201:17
              
              javascript.0
              2024-10-14 17:34:46.011	error	at prepareScript (/opt/iobroker/node_modules/iobroker.javascript/main.js:2103:37)
              
              javascript.0
              2024-10-14 17:34:46.011	error	at createVM (/opt/iobroker/node_modules/iobroker.javascript/main.js:1850:21)
              
              javascript.0
              2024-10-14 17:34:46.011	error	at new Script (node:vm:117:7)
              
              javascript.0
              2024-10-14 17:34:46.011	error	SyntaxError: missing ) after argument list
              
              javascript.0
              2024-10-14 17:34:46.011	error	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              
              javascript.0
              2024-10-14 17:34:46.010	error	request("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"");
              
              javascript.0
              2024-10-14 17:34:46.010	error	script.js.Trash.Skript_111 compile failed: at script.js.Trash.Skript_111:5
              

              Gruß
              Michael

              OliverIOO J 2 Replies Last reply
              0
              • M michihorn

                @oliverio Ich möchte ohne Fully-Adapter in den Fully Browser schreiben. Dazu hat der Entwickler eine Abhandlung über Rest-Api in der Doku gepackt. (siehe erster Post).
                Da ich nicht weiß wie ich einen Http Befehl an ein externes Gerät sende, habe ich dieses Thema eröffnet.
                Im übrigen ich nutze noch Java 7.8.0.

                Ich habe es mal so versucht:

                var request = require('request');
                
                schedule("* * * * *", function () {
                
                require('request')("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl");
                 
                )
                });
                

                Bekomme aber folgende Fehlermeldung im LOG

                
                javascript.0
                2024-10-14 17:34:46.011	error	at processImmediate (node:internal/timers:485:21)
                
                javascript.0
                2024-10-14 17:34:46.011	error	at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.javascript/main.js:1676:17)
                
                javascript.0
                2024-10-14 17:34:46.011	error	at /opt/iobroker/node_modules/iobroker.javascript/main.js:2201:17
                
                javascript.0
                2024-10-14 17:34:46.011	error	at prepareScript (/opt/iobroker/node_modules/iobroker.javascript/main.js:2103:37)
                
                javascript.0
                2024-10-14 17:34:46.011	error	at createVM (/opt/iobroker/node_modules/iobroker.javascript/main.js:1850:21)
                
                javascript.0
                2024-10-14 17:34:46.011	error	at new Script (node:vm:117:7)
                
                javascript.0
                2024-10-14 17:34:46.011	error	SyntaxError: missing ) after argument list
                
                javascript.0
                2024-10-14 17:34:46.011	error	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                
                javascript.0
                2024-10-14 17:34:46.010	error	request("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"");
                
                javascript.0
                2024-10-14 17:34:46.010	error	script.js.Trash.Skript_111 compile failed: at script.js.Trash.Skript_111:5
                

                Gruß
                Michael

                OliverIOO Offline
                OliverIOO Offline
                OliverIO
                wrote on last edited by OliverIO
                #9

                @michihorn

                ah ok, ist halt unnötig kompliziert.
                ist halt dann offtopic
                aber die doku von fully ist hier
                https://www.fully-kiosk.com/en/#rest

                bei deinem beispiel bist schonmal auf dem richtigen weg

                1. du musst die strings richtig verknüpfen mit +, also "xxx"+"yyy"
                2. bestimmte zeichen sind in einer url nicht zlässig und müssen kodiert werden. dazu gibt es den befehl urlencode
                3. wenn du request verwendest erhälst du eine meckernachricht im log, daher gleich nachfolgebibliothek axios verwendenaxios

                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 Reply Last reply
                0
                • M michihorn

                  @oliverio Ich möchte ohne Fully-Adapter in den Fully Browser schreiben. Dazu hat der Entwickler eine Abhandlung über Rest-Api in der Doku gepackt. (siehe erster Post).
                  Da ich nicht weiß wie ich einen Http Befehl an ein externes Gerät sende, habe ich dieses Thema eröffnet.
                  Im übrigen ich nutze noch Java 7.8.0.

                  Ich habe es mal so versucht:

                  var request = require('request');
                  
                  schedule("* * * * *", function () {
                  
                  require('request')("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl");
                   
                  )
                  });
                  

                  Bekomme aber folgende Fehlermeldung im LOG

                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at processImmediate (node:internal/timers:485:21)
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at Immediate._onImmediate (/opt/iobroker/node_modules/iobroker.javascript/main.js:1676:17)
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at /opt/iobroker/node_modules/iobroker.javascript/main.js:2201:17
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at prepareScript (/opt/iobroker/node_modules/iobroker.javascript/main.js:2103:37)
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at createVM (/opt/iobroker/node_modules/iobroker.javascript/main.js:1850:21)
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	at new Script (node:vm:117:7)
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	SyntaxError: missing ) after argument list
                  
                  javascript.0
                  2024-10-14 17:34:46.011	error	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  
                  javascript.0
                  2024-10-14 17:34:46.010	error	request("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"");
                  
                  javascript.0
                  2024-10-14 17:34:46.010	error	script.js.Trash.Skript_111 compile failed: at script.js.Trash.Skript_111:5
                  

                  Gruß
                  Michael

                  J Offline
                  J Offline
                  JoergH
                  wrote on last edited by JoergH
                  #10

                  @michihorn sagte in Keine Ahnung von API:

                  @oliverio Ich möchte ohne Fully-Adapter in den Fully Browser schreiben. Dazu hat der Entwickler eine Abhandlung über Rest-Api in der Doku gepackt. (siehe erster Post).
                  Da ich nicht weiß wie ich einen Http Befehl an ein externes Gerät sende, habe ich dieses Thema eröffnet.

                  Ich habe es mal so versucht:

                  var request = require('request');
                  
                  schedule("* * * * *", function () {
                  
                  require('request')("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"");
                   
                  )
                  });
                  

                  request ist deprecated....ich habe Dir ja einen Vorschlag gemacht, wie man das leicht rausfinden kann...

                  P.S.: Irgendwie scheinen mir da die Gänsefüßchen auch nicht zu stimmen....

                  M 1 Reply Last reply
                  1
                  • J JoergH

                    @michihorn sagte in Keine Ahnung von API:

                    @oliverio Ich möchte ohne Fully-Adapter in den Fully Browser schreiben. Dazu hat der Entwickler eine Abhandlung über Rest-Api in der Doku gepackt. (siehe erster Post).
                    Da ich nicht weiß wie ich einen Http Befehl an ein externes Gerät sende, habe ich dieses Thema eröffnet.

                    Ich habe es mal so versucht:

                    var request = require('request');
                    
                    schedule("* * * * *", function () {
                    
                    require('request')("http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"");
                     
                    )
                    });
                    

                    request ist deprecated....ich habe Dir ja einen Vorschlag gemacht, wie man das leicht rausfinden kann...

                    P.S.: Irgendwie scheinen mir da die Gänsefüßchen auch nicht zu stimmen....

                    M Online
                    M Online
                    michihorn
                    wrote on last edited by michihorn
                    #11

                    @joergh sagte in Keine Ahnung von API:

                    request ist deprecated....ich habe Dir ja einen Vorschlag gemacht, wie man das leicht rausfinden kann...

                    Ich bin noch bei Java 7.8.0, da gibt es noch den request. Möchte aktuell auch nicht upgraden

                    J 1 Reply Last reply
                    0
                    • M michihorn

                      @joergh sagte in Keine Ahnung von API:

                      request ist deprecated....ich habe Dir ja einen Vorschlag gemacht, wie man das leicht rausfinden kann...

                      Ich bin noch bei Java 7.8.0, da gibt es noch den request. Möchte aktuell auch nicht upgraden

                      J Offline
                      J Offline
                      JoergH
                      wrote on last edited by
                      #12

                      @michihorn Daran hängt es auch nicht...

                      Wenn man in javascript schaut und Dein Link so stimmen sollte, dann käme

                      try {
                        require("request")('"http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl""').on("error", (e) => { console.error(e); });
                      } catch (e) { console.error(e); }
                      

                      raus.

                      M 1 Reply Last reply
                      0
                      • J JoergH

                        @michihorn Daran hängt es auch nicht...

                        Wenn man in javascript schaut und Dein Link so stimmen sollte, dann käme

                        try {
                          require("request")('"http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl""').on("error", (e) => { console.error(e); });
                        } catch (e) { console.error(e); }
                        

                        raus.

                        M Online
                        M Online
                        michihorn
                        wrote on last edited by michihorn
                        #13

                        @joergh sagte in Keine Ahnung von API:

                        try { require("request")('"http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl""').on("error", (e) => { console.error(e); }); } catch (e) { console.error(e); }

                        Das ist die Fehlermeldung im LOG

                        17:56:47.115	info	javascript.0 (53553) script.js.Trash.Skript_111: registered 0 subscriptions, 1 schedule, 0 messages, 0 logs and 0 file subscriptions
                        17:57:00.007	error	javascript.0 (53553) script.js.Trash.Skript_111: Error: Invalid URI "%22http://192.168.178.1xx:2323/?cmd=loadUrl%20&%20url=%22http://192.168.178.1xx:8082/vis/index.html?main#000Header_K%22%20&%20password=Wxxxl%22%22" at Request.init (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:273:31) at new Request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:127:8) at request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/index.js:53:10) at requestSafe (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:34:16) at request (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:50:30) at Object.<anonymous> (script.js.Trash.Skript_111:44:21) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1620:34) at Job.invoke (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)
                        17:57:00.007	info	javascript.0 (53553) script.js.Trash.Skript_111: Done
                        

                        Ich habe die Gänsefüsschen nochmal geändert, jetzt kommt keine Fehlermeldung aber es passiert auch nichts auf dem Tablet.

                        var request = require('request');
                         
                        schedule("* * * * *", function () {
                         
                        try {
                          require("request")('http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"').on("error", (e) => { console.error(e); });
                        } catch (e) { console.error(e); }
                        log("Done")
                        });
                        
                        CodierknechtC 1 Reply Last reply
                        0
                        • M michihorn

                          @joergh sagte in Keine Ahnung von API:

                          try { require("request")('"http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl""').on("error", (e) => { console.error(e); }); } catch (e) { console.error(e); }

                          Das ist die Fehlermeldung im LOG

                          17:56:47.115	info	javascript.0 (53553) script.js.Trash.Skript_111: registered 0 subscriptions, 1 schedule, 0 messages, 0 logs and 0 file subscriptions
                          17:57:00.007	error	javascript.0 (53553) script.js.Trash.Skript_111: Error: Invalid URI "%22http://192.168.178.1xx:2323/?cmd=loadUrl%20&%20url=%22http://192.168.178.1xx:8082/vis/index.html?main#000Header_K%22%20&%20password=Wxxxl%22%22" at Request.init (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:273:31) at new Request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:127:8) at request (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/index.js:53:10) at requestSafe (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:34:16) at request (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:50:30) at Object.<anonymous> (script.js.Trash.Skript_111:44:21) at Job.job (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1620:34) at Job.invoke (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Job.js:171:15) at /opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:268:28 at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/node_modules/node-schedule/lib/Invocation.js:228:7) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7)
                          17:57:00.007	info	javascript.0 (53553) script.js.Trash.Skript_111: Done
                          

                          Ich habe die Gänsefüsschen nochmal geändert, jetzt kommt keine Fehlermeldung aber es passiert auch nichts auf dem Tablet.

                          var request = require('request');
                           
                          schedule("* * * * *", function () {
                           
                          try {
                            require("request")('http://192.168.178.1xx:2323/?cmd=loadUrl & url="http://192.168.178.1xx:8082/vis/index.html?main#000Header_K" & password=Wxxxxl"').on("error", (e) => { console.error(e); });
                          } catch (e) { console.error(e); }
                          log("Done")
                          });
                          
                          CodierknechtC Online
                          CodierknechtC Online
                          Codierknecht
                          Developer Most Active
                          wrote on last edited by
                          #14

                          @michihorn
                          Mal abgesehen davon, dass in der Doku von Anführungszeichen nix zu sehen ist, steht da auch nix von Leerzeichen.

                          Das sollte eher so aussehen:

                          const request = require('request');
                          const url = 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http://192.168.178.1xx:8082/vis/index.html?main#000Header_K&password=Wxxxxl';
                          
                          request(url, (err, res, body) => {
                            console.log(res);
                          });
                          

                          Da müssen dann aber ggf. auch noch die Sonderzeichen codiert werden.

                          "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                          Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                          HmIP|ZigBee|Tasmota|Unifi
                          Zabbix Certified Specialist
                          Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                          1 Reply Last reply
                          0
                          • M Online
                            M Online
                            michihorn
                            wrote on last edited by
                            #15

                            @codierknecht Dankeschön
                            ich habe das Script mal umgesetzt, läuft ohne Fehler, aber im Tablet/Fullybrowser ist nicht die neue URL eingetragen.
                            Anbei das LOG:

                            	javascript.0 (219200) script.js.Trash.Skript_111: <ref *2> IncomingMessage { _events: { close: [ [Function (anonymous)], [Function (anonymous)] ], error: [Function (anonymous)], data: [Function (anonymous)], end: [ [Function: responseOnEnd], [Function (anonymous)] ], readable: undefined }, _readableState: ReadableState { highWaterMark: 16384, buffer: [], bufferIndex: 0, length: 0, pipes: [], awaitDrainWriters: null, [Symbol(kState)]: 194512652 }, _maxListeners: 100, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'Content-Type', 'text/html', 'Date', 'Mon, 14 Oct 2024 17:07:01 GMT', 'Connection', 'keep-alive', 'Content-Length', '13413' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 200, statusMessage: 'OK ', client: <ref *1> Socket { connecting: false, _hadError: false, _parent: null, _host: null, _closeAfterHandlingError: false, _events: { close: [Function: onClose], error: undefined, prefinish: undefined, finish: undefined, drain: undefined, data: undefined, end: [Function: onReadableStreamEnd], readable: undefined, connect: undefined, free: [Function: onFree], timeout: [Function: onTimeout], agentRemove: [Function: onRemove] }, _readableState: ReadableState { highWaterMark: 16384, buffer: [], bufferIndex: 0, length: 0, pipes: [], awaitDrainWriters: null, [Symbol(kState)]: 60563716 }, _writableState: WritableState { highWaterMark: 16384, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0, [Symbol(kState)]: 17563908, [Symbol(kBufferedValue)]: null, [Symbol(kWriteCbValue)]: null }, allowHalfOpen: false, _maxListeners: 100, _eventsCount: 5, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, timeout: 0, parser: null, _httpMessage: ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [Circular *1], _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.192:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.192', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, [Symbol(async_id_symbol)]: 1042945, [Symbol(kHandle)]: TCP { reading: true, onconnection: null, [Symbol(owner_symbol)]: [Circular *1] }, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: -1, _idlePrev: null, _idleNext: null, _idleStart: 3122942, _onTimeout: null, _timerArgs: undefined, _repeat: null, _destroyed: true, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 1042944, [Symbol(triggerId)]: 1042943 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: true, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _consuming: true, _dumped: false, req: <ref *3> ClientRequest { _events: [Object: null prototype] { response: [Function: bound ], error: [Array], drain: [Function (anonymous)], socket: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: <ref *1> Socket { connecting: false, _hadError: false, _parent: null, _host: null, _closeAfterHandlingError: false, _events: [Object], _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: 100, _eventsCount: 5, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, timeout: 0, parser: null, _httpMessage: [Circular *3], [Symbol(async_id_symbol)]: 1042945, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: -1, _idlePrev: null, _idleNext: null, _idleStart: 3122942, _onTimeout: null, _timerArgs: undefined, _repeat: null, _destroyed: true, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 1042944, [Symbol(triggerId)]: 1042943 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: true, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.1xx:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.1xxx:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.1xx', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { host: [Array], 'sentry-trace': [Array], baggage: [Array] }, [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, _eventsCount: 4, request: <ref *4> Request { _events: [Object: null prototype] { error: [Array], complete: [Function: bound ], pipe: [Function (anonymous)], data: [Function (anonymous)], end: [Function (anonymous)] }, _eventsCount: 5, _maxListeners: 100, uri: Url { protocol: 'http:', slashes: true, auth: null, host: '192.168.178.192:2323', port: '2323', hostname: '192.168.178.192', hash: '#000Header_K&password=Wxxxxl', search: '?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', query: 'cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', pathname: '/', path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', href: 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main#000Header_K&password=Wxxxl' }, callback: [Function (anonymous)], readable: true, writable: true, _qs: Querystring { request: [Circular *4], lib: [Object], useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: Auth { request: [Circular *4], hasAuth: false, sentAuth: false, bearerToken: null, user: null, pass: null }, _oauth: OAuth { request: [Circular *4], params: null }, _multipart: Multipart { request: [Circular *4], boundary: 'c5364efa-db69-43c3-9cc0-08e6378823d2', chunked: false, body: null }, _redirect: Redirect { request: [Circular *4], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function (anonymous)], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: Tunnel { request: [Circular *4], proxyHeaderWhiteList: [Array], proxyHeaderExclusiveList: [] }, headers: {}, setHeader: [Function (anonymous)], hasHeader: [Function (anonymous)], getHeader: [Function (anonymous)], removeHeader: [Function (anonymous)], method: 'GET', localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function (anonymous)], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '2323', host: '192.168.178.192', path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', httpModule: { _connectionListener: [Function: connectionListener], METHODS: [Array], STATUS_CODES: [Object], Agent: [Function], ClientRequest: [Function: ClientRequest], IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], validateHeaderName: [Function], validateHeaderValue: [Function], get: [Function: wrappedMethod], request: [Function: wrappedMethod], setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers], maxHeaderSize: [Getter], globalAgent: [Getter/Setter] }, agentClass: [Function: Agent] { defaultMaxSockets: Infinity }, agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, _started: true, href: 'http://192.168.178.192:2323/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main#000Header_K&password=Wxxxl', req: <ref *3> ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [Socket], _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.192:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.192', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, ntick: true, response: [Circular *2], originalHost: '192.168.178.192:2323', originalHostHeaderName: 'host', responseContent: [Circular *2], _destdata: true, _ended: true, _callbackCalled: true, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: { 'content-type': 'text/html', date: 'Mon, 14 Oct 2024 17:07:01 GMT', connection: 'keep-alive', 'content-length': '13413' } }, body: '<!DOCTYPE html>\n' + '<html lang="en" class="notranslate" translate="no">\n' + '<head>\n' + ' <meta charset="UTF-8">\n' + ' <meta name="viewport" content="width=device-width,initial-scale=1">\n' + ' <title>Fully Remote Admin</title>\n' + ' <link rel="shortcut icon" type="image/x-icon" href="fully-favicon.ico">\n' + ' <link rel="stylesheet" href="styles6.css"/>\n' + ' <link rel="stylesheet" href="jquery.toast.min.css"/>\n' + ' <link rel="stylesheet" href="switch-input.css"/>\n' + '\n' + ' <script src="jquery.min.js"></script>\n' + ' <script src="jquery.toast.min.js"></script>\n' + '\n' + ' <script>\n' + '\n' + ' function closeWindow() {\n' + ' if(window.opener != null || window.history.length == 1)\n' + ' window.close();\n' + ' else\n' + " alert('Please just close this tab in your browser!');\n" + ' }\n' + '\n' + ' function htmlEncode(value){\n' + ` return $('<div/>').text(value).html().replace(/\\n/g,"<br>");\n` + ' }\n' + '\n' + ' function htmlDecode(value){\n' + " return $('<div/>').html(value).text();\n" + ' }\n' + '\n' + ' var imageUrl = null;\n' + '\n' + ' function toggleImage(url) {\n' + '\n' + ` if (!$("#imgholder").is(":visible") || $("#imgholder").attr('src').indexOf(url)<0) {\n` + ' $("#imgholder").show();\n' + ` $("#imgholder").off('load');\n` + ' imageUrl = url;\n' + '\n' + ` $("#imgholder").attr('src', 'fully-loading.png');\n` + ` $("#imgholder").on('load', function () {\n` + ` $("#imgholder").attr('src', imageUrl + "?time="+new Date().getTime());\n` + ` $("#imgholder").off('load');\n` + ' $("#startrefreshbutton").show();\n' + ' });\n' + ' }\n' + ' else {\n' + ' $("#imgholder").hide();\n' + ` $("#imgholder").off('load');\n` + ' $("#startrefreshbutton").hide();\n' + ' imageUrl = null;\n' + ' }\n' + ' }\n' + ' function startAutoRefresh() {\n' + ' $("#startrefreshbutton").hide();\n' + '\n' + ' if (imageUrl!=null) {\n' + ` $("#imgholder").attr('src', imageUrl + "?time="+new Date().getTime());\n` + '\n' + ` $("#imgholder").on('load', function () {\n` + ` $("#imgholder").off('load');\n` + " setTimeout('startAutoRefresh()', 100); // refresh after the next 100ms\n" + ' });\n' + ' }\n' + ' }\n' + '\n' + ' function savePref(key) {\n' + '\n' + ' if (!window.jQuery) {\n' + ' setTimeout(function() { submitForm(key); }, 200);\n' + ' return;\n' + ' }\n' + '\n' + ' var form = $("#form-"+key);\n' + ' var editArea = $("#edit-"+key);\n' + ' var editButton = $("#edit-button-"+key);\n' + ' var value = $("#value-"+key);\n' + ' var newValue = "", oldValue = "";\n' + '\n' + ` if (form.find('input[name="value"]').attr('type')=='radio') {\n` + ` newValue = form.find('input[name="value"]:checked').attr('customValue');\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + ` else if (form.find('textarea[name="value"]').length) {\n` + ` if (form.find('textarea[name="value"]').attr('type')=='json')\n` + ' oldValue = newValue = "(JSON)";\n' + ' else {\n' + ` newValue = form.find('textarea[name="value"]').val();\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + ' }\n' + ` else if (form.find('input[name="value"]').attr('type')=='password')\n` + ' oldValue = newValue = "*****";\n' + ' else {\n' + ` newValue = form.find('input[name="value"]').val();\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + '\n' + ' console.log(" Form data: "+form.serialize());\n' + ' console.log(" New value: "+newValue);\n' + '\n' + ' editArea.hide();\n' + ' value.html(htmlEncode(newValue));\n' + ' editButton.addClass("disabled");\n' + '\n' + ' $.ajax({\n' + ' dataType: "json",\n' + ' url: "setStringSetting?type=json",\n' + ' method: "POST",\n' + ' data: form.serialize()})\n' + '\n' + ' .done(function( json ) {\n' + ' console.log( "JSON Status: " + json.status+", "+json.statustext );\n' + ' if (json.status == "OK") {\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Success',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'success'\n" + ' });\n' + ' }\n' + ' else if (json.status == "Error") {\n' + '\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' }\n' + ' else {\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' }\n' + ' })\n' + '\n' + ' .fail(function( jqxhr, textStatus, error ) {\n' + ' console.log(" Request Failed: " + textStatus + ", " + error);\n' + ' console.log(" Response: "+ jqxhr.responseText);\n' + '\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' });\n' + ' }\n' + '\n' + ' function saveSwitchPref(input) {\n' + '\n' + " var newValue = ($(input).is(':checked')) ? 'true' : 'false';\n" + " var oldValue = !($(input).is(':checked'));\n" + " var sid = $(input).attr('id');\n" + ` console.log('Attr ' + sid + ' changed to ' + newValue + " from " + oldValue );\n` + '\n' + ' $(input).prop("disabled",true);\n' + '\n' + ' var formData = {\n' + " 'key' : sid,\n" + " 'value' : newValue,\n" + " 'type' : 'json'\n" + ' };\n' + '\n' + ' $.ajax({\n' + ' dataType: "json",\n' + ' url: "setBooleanSetting",\n' + ' method: "POST",\n' + ' data: formData})\n' + '\n' + ' .done(function( json ) {\n' + ' console.log( "JSON Status: " + json.status+", "+json.statustext );\n' + ' if (json.status == "OK") {\n' + ' $.toast({\n' + " heading: 'Success',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'success'\n" + ' });\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' else if (json.status == "Error") {\n' + ' $.toast({\n' + " heading: 'Error',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' else {\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' })\n' + '\n' + ' .fail(function( jqxhr, textStatus, error ) {\n' + ' console.log(" Request Failed: " + textStatus + ", " + error);\n' + ' console.log(" Response: "+ jqxhr.responseText);\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' });\n' + ' }\n' + '\n' + ' // Show additional input fields for the fast admin selector\n' + ' // Select elements by name or in some cases by id provided in addFields attribute on the selector\n' + '\n' + ' function showAddFields() {\n' + '\n' + ' var form = $("#fastAdminForm");\n' + ' var actionSelector = $("#actionSelector");\n' + '\n' + ' $(".addFields").hide();\n' + ' $(".addFields").attr("disabled",true);\n' + '\n' + ` if ($("#actionSelector option:selected").attr('addFields')) {\n` + ` var addFields = $("#actionSelector option:selected").attr('addFields').split(",");\n` + ' for (index = 0; index < addFields.length; ++index) {\n' + ` form.find('input[name="'+addFields[index]+'"]').show();\n` + ` form.find('input[name="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('select[name="'+addFields[index]+'"]').show();\n` + ` form.find('select[name="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('select[id="'+addFields[index]+'"]').show();\n` + ` form.find('select[id="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('span[name="'+addFields[index]+'"]').css('display', 'inline-block');\n` + ` form.find('span[name="'+addFields[index]+'"]').attr("disabled",false);\n` + ' }\n' + ' }\n' + ' }\n' + '\n' + ' function submitFastAdmin() {\n' + '\n' + ' // Check if command is selected\n' + ' var command = $("#actionSelector").val();\n' + ' if (command=="") {\n' + ' console.log("No command selected");\n' + ' return;\n' + ' }\n' + '\n' + ' '... 3413 more characters, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kHeaders)]: { 'content-type': 'text/html', date: 'Mon, 14 Oct 2024 17:07:01 GMT', connection: 'keep-alive', 'content-length': '13413' }, [Symbol(kHeadersCount)]: 8, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }
                            

                            Michael

                            CodierknechtC 1 Reply Last reply
                            0
                            • M michihorn

                              @codierknecht Dankeschön
                              ich habe das Script mal umgesetzt, läuft ohne Fehler, aber im Tablet/Fullybrowser ist nicht die neue URL eingetragen.
                              Anbei das LOG:

                              	javascript.0 (219200) script.js.Trash.Skript_111: <ref *2> IncomingMessage { _events: { close: [ [Function (anonymous)], [Function (anonymous)] ], error: [Function (anonymous)], data: [Function (anonymous)], end: [ [Function: responseOnEnd], [Function (anonymous)] ], readable: undefined }, _readableState: ReadableState { highWaterMark: 16384, buffer: [], bufferIndex: 0, length: 0, pipes: [], awaitDrainWriters: null, [Symbol(kState)]: 194512652 }, _maxListeners: 100, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'Content-Type', 'text/html', 'Date', 'Mon, 14 Oct 2024 17:07:01 GMT', 'Connection', 'keep-alive', 'Content-Length', '13413' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 200, statusMessage: 'OK ', client: <ref *1> Socket { connecting: false, _hadError: false, _parent: null, _host: null, _closeAfterHandlingError: false, _events: { close: [Function: onClose], error: undefined, prefinish: undefined, finish: undefined, drain: undefined, data: undefined, end: [Function: onReadableStreamEnd], readable: undefined, connect: undefined, free: [Function: onFree], timeout: [Function: onTimeout], agentRemove: [Function: onRemove] }, _readableState: ReadableState { highWaterMark: 16384, buffer: [], bufferIndex: 0, length: 0, pipes: [], awaitDrainWriters: null, [Symbol(kState)]: 60563716 }, _writableState: WritableState { highWaterMark: 16384, length: 0, corked: 0, onwrite: [Function: bound onwrite], writelen: 0, bufferedIndex: 0, pendingcb: 0, [Symbol(kState)]: 17563908, [Symbol(kBufferedValue)]: null, [Symbol(kWriteCbValue)]: null }, allowHalfOpen: false, _maxListeners: 100, _eventsCount: 5, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, timeout: 0, parser: null, _httpMessage: ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [Circular *1], _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.192:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.192', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, [Symbol(async_id_symbol)]: 1042945, [Symbol(kHandle)]: TCP { reading: true, onconnection: null, [Symbol(owner_symbol)]: [Circular *1] }, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: -1, _idlePrev: null, _idleNext: null, _idleStart: 3122942, _onTimeout: null, _timerArgs: undefined, _repeat: null, _destroyed: true, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 1042944, [Symbol(triggerId)]: 1042943 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: true, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _consuming: true, _dumped: false, req: <ref *3> ClientRequest { _events: [Object: null prototype] { response: [Function: bound ], error: [Array], drain: [Function (anonymous)], socket: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: <ref *1> Socket { connecting: false, _hadError: false, _parent: null, _host: null, _closeAfterHandlingError: false, _events: [Object], _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: 100, _eventsCount: 5, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, timeout: 0, parser: null, _httpMessage: [Circular *3], [Symbol(async_id_symbol)]: 1042945, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: -1, _idlePrev: null, _idleNext: null, _idleStart: 3122942, _onTimeout: null, _timerArgs: undefined, _repeat: null, _destroyed: true, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 1042944, [Symbol(triggerId)]: 1042943 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: true, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.1xx:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.1xxx:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.1xx', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] { host: [Array], 'sentry-trace': [Array], baggage: [Array] }, [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, _eventsCount: 4, request: <ref *4> Request { _events: [Object: null prototype] { error: [Array], complete: [Function: bound ], pipe: [Function (anonymous)], data: [Function (anonymous)], end: [Function (anonymous)] }, _eventsCount: 5, _maxListeners: 100, uri: Url { protocol: 'http:', slashes: true, auth: null, host: '192.168.178.192:2323', port: '2323', hostname: '192.168.178.192', hash: '#000Header_K&password=Wxxxxl', search: '?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', query: 'cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', pathname: '/', path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', href: 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main#000Header_K&password=Wxxxl' }, callback: [Function (anonymous)], readable: true, writable: true, _qs: Querystring { request: [Circular *4], lib: [Object], useQuerystring: undefined, parseOptions: {}, stringifyOptions: {} }, _auth: Auth { request: [Circular *4], hasAuth: false, sentAuth: false, bearerToken: null, user: null, pass: null }, _oauth: OAuth { request: [Circular *4], params: null }, _multipart: Multipart { request: [Circular *4], boundary: 'c5364efa-db69-43c3-9cc0-08e6378823d2', chunked: false, body: null }, _redirect: Redirect { request: [Circular *4], followRedirect: true, followRedirects: true, followAllRedirects: false, followOriginalHttpMethod: false, allowRedirect: [Function (anonymous)], maxRedirects: 10, redirects: [], redirectsFollowed: 0, removeRefererHeader: false }, _tunnel: Tunnel { request: [Circular *4], proxyHeaderWhiteList: [Array], proxyHeaderExclusiveList: [] }, headers: {}, setHeader: [Function (anonymous)], hasHeader: [Function (anonymous)], getHeader: [Function (anonymous)], removeHeader: [Function (anonymous)], method: 'GET', localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function (anonymous)], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '2323', host: '192.168.178.192', path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', httpModule: { _connectionListener: [Function: connectionListener], METHODS: [Array], STATUS_CODES: [Object], Agent: [Function], ClientRequest: [Function: ClientRequest], IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], validateHeaderName: [Function], validateHeaderValue: [Function], get: [Function: wrappedMethod], request: [Function: wrappedMethod], setMaxIdleHTTPParsers: [Function: setMaxIdleHTTPParsers], maxHeaderSize: [Getter], globalAgent: [Getter/Setter] }, agentClass: [Function: Agent] { defaultMaxSockets: Infinity }, agent: Agent { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object: null prototype], requests: [Object: null prototype] {}, sockets: [Object: null prototype], freeSockets: [Object: null prototype] {}, keepAliveMsecs: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, _started: true, href: 'http://192.168.178.192:2323/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main#000Header_K&password=Wxxxl', req: <ref *3> ClientRequest { _events: [Object: null prototype], _eventsCount: 5, _maxListeners: 100, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [Socket], _header: 'GET /?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main HTTP/1.1\r\n' + 'host: 192.168.178.192:2323\r\n' + 'sentry-trace: 2913c3ff953341f1be1a833816d147b0-a8afb69a85676e73\r\n' + 'baggage: sentry-environment=production,sentry-release=iobroker.javascript%407.8.0,sentry-public_key=f3b9740caaee4ee69eb68019d71526ff,sentry-trace_id=2913c3ff953341f1be1a833816d147b0\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/?cmd=loadUrl&url=http://192.168.178.162:8082/vis/index.html?main', _ended: true, res: [Circular *2], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: '192.168.178.192', protocol: 'http:', [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 16384, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, ntick: true, response: [Circular *2], originalHost: '192.168.178.192:2323', originalHostHeaderName: 'host', responseContent: [Circular *2], _destdata: true, _ended: true, _callbackCalled: true, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, toJSON: [Function: responseToJSON], caseless: Caseless { dict: { 'content-type': 'text/html', date: 'Mon, 14 Oct 2024 17:07:01 GMT', connection: 'keep-alive', 'content-length': '13413' } }, body: '<!DOCTYPE html>\n' + '<html lang="en" class="notranslate" translate="no">\n' + '<head>\n' + ' <meta charset="UTF-8">\n' + ' <meta name="viewport" content="width=device-width,initial-scale=1">\n' + ' <title>Fully Remote Admin</title>\n' + ' <link rel="shortcut icon" type="image/x-icon" href="fully-favicon.ico">\n' + ' <link rel="stylesheet" href="styles6.css"/>\n' + ' <link rel="stylesheet" href="jquery.toast.min.css"/>\n' + ' <link rel="stylesheet" href="switch-input.css"/>\n' + '\n' + ' <script src="jquery.min.js"></script>\n' + ' <script src="jquery.toast.min.js"></script>\n' + '\n' + ' <script>\n' + '\n' + ' function closeWindow() {\n' + ' if(window.opener != null || window.history.length == 1)\n' + ' window.close();\n' + ' else\n' + " alert('Please just close this tab in your browser!');\n" + ' }\n' + '\n' + ' function htmlEncode(value){\n' + ` return $('<div/>').text(value).html().replace(/\\n/g,"<br>");\n` + ' }\n' + '\n' + ' function htmlDecode(value){\n' + " return $('<div/>').html(value).text();\n" + ' }\n' + '\n' + ' var imageUrl = null;\n' + '\n' + ' function toggleImage(url) {\n' + '\n' + ` if (!$("#imgholder").is(":visible") || $("#imgholder").attr('src').indexOf(url)<0) {\n` + ' $("#imgholder").show();\n' + ` $("#imgholder").off('load');\n` + ' imageUrl = url;\n' + '\n' + ` $("#imgholder").attr('src', 'fully-loading.png');\n` + ` $("#imgholder").on('load', function () {\n` + ` $("#imgholder").attr('src', imageUrl + "?time="+new Date().getTime());\n` + ` $("#imgholder").off('load');\n` + ' $("#startrefreshbutton").show();\n' + ' });\n' + ' }\n' + ' else {\n' + ' $("#imgholder").hide();\n' + ` $("#imgholder").off('load');\n` + ' $("#startrefreshbutton").hide();\n' + ' imageUrl = null;\n' + ' }\n' + ' }\n' + ' function startAutoRefresh() {\n' + ' $("#startrefreshbutton").hide();\n' + '\n' + ' if (imageUrl!=null) {\n' + ` $("#imgholder").attr('src', imageUrl + "?time="+new Date().getTime());\n` + '\n' + ` $("#imgholder").on('load', function () {\n` + ` $("#imgholder").off('load');\n` + " setTimeout('startAutoRefresh()', 100); // refresh after the next 100ms\n" + ' });\n' + ' }\n' + ' }\n' + '\n' + ' function savePref(key) {\n' + '\n' + ' if (!window.jQuery) {\n' + ' setTimeout(function() { submitForm(key); }, 200);\n' + ' return;\n' + ' }\n' + '\n' + ' var form = $("#form-"+key);\n' + ' var editArea = $("#edit-"+key);\n' + ' var editButton = $("#edit-button-"+key);\n' + ' var value = $("#value-"+key);\n' + ' var newValue = "", oldValue = "";\n' + '\n' + ` if (form.find('input[name="value"]').attr('type')=='radio') {\n` + ` newValue = form.find('input[name="value"]:checked').attr('customValue');\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + ` else if (form.find('textarea[name="value"]').length) {\n` + ` if (form.find('textarea[name="value"]').attr('type')=='json')\n` + ' oldValue = newValue = "(JSON)";\n' + ' else {\n' + ` newValue = form.find('textarea[name="value"]').val();\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + ' }\n' + ` else if (form.find('input[name="value"]').attr('type')=='password')\n` + ' oldValue = newValue = "*****";\n' + ' else {\n' + ` newValue = form.find('input[name="value"]').val();\n` + ' oldValue = htmlDecode(value.html());\n' + ' }\n' + '\n' + ' console.log(" Form data: "+form.serialize());\n' + ' console.log(" New value: "+newValue);\n' + '\n' + ' editArea.hide();\n' + ' value.html(htmlEncode(newValue));\n' + ' editButton.addClass("disabled");\n' + '\n' + ' $.ajax({\n' + ' dataType: "json",\n' + ' url: "setStringSetting?type=json",\n' + ' method: "POST",\n' + ' data: form.serialize()})\n' + '\n' + ' .done(function( json ) {\n' + ' console.log( "JSON Status: " + json.status+", "+json.statustext );\n' + ' if (json.status == "OK") {\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Success',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'success'\n" + ' });\n' + ' }\n' + ' else if (json.status == "Error") {\n' + '\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' }\n' + ' else {\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' }\n' + ' })\n' + '\n' + ' .fail(function( jqxhr, textStatus, error ) {\n' + ' console.log(" Request Failed: " + textStatus + ", " + error);\n' + ' console.log(" Response: "+ jqxhr.responseText);\n' + '\n' + ' value.html(htmlEncode(oldValue));\n' + ' editButton.removeClass("disabled");\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' });\n' + ' }\n' + '\n' + ' function saveSwitchPref(input) {\n' + '\n' + " var newValue = ($(input).is(':checked')) ? 'true' : 'false';\n" + " var oldValue = !($(input).is(':checked'));\n" + " var sid = $(input).attr('id');\n" + ` console.log('Attr ' + sid + ' changed to ' + newValue + " from " + oldValue );\n` + '\n' + ' $(input).prop("disabled",true);\n' + '\n' + ' var formData = {\n' + " 'key' : sid,\n" + " 'value' : newValue,\n" + " 'type' : 'json'\n" + ' };\n' + '\n' + ' $.ajax({\n' + ' dataType: "json",\n' + ' url: "setBooleanSetting",\n' + ' method: "POST",\n' + ' data: formData})\n' + '\n' + ' .done(function( json ) {\n' + ' console.log( "JSON Status: " + json.status+", "+json.statustext );\n' + ' if (json.status == "OK") {\n' + ' $.toast({\n' + " heading: 'Success',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'success'\n" + ' });\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' else if (json.status == "Error") {\n' + ' $.toast({\n' + " heading: 'Error',\n" + ' text: json.statustext,\n' + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' else {\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' }\n' + ' })\n' + '\n' + ' .fail(function( jqxhr, textStatus, error ) {\n' + ' console.log(" Request Failed: " + textStatus + ", " + error);\n' + ' console.log(" Response: "+ jqxhr.responseText);\n' + ' $.toast({\n' + " heading: 'Error',\n" + " text: 'Device communication error',\n" + " showHideTransition: 'slide',\n" + " icon: 'error'\n" + ' });\n' + ' $(input).prop("checked",oldValue);\n' + ' $(input).prop("disabled",false);\n' + ' });\n' + ' }\n' + '\n' + ' // Show additional input fields for the fast admin selector\n' + ' // Select elements by name or in some cases by id provided in addFields attribute on the selector\n' + '\n' + ' function showAddFields() {\n' + '\n' + ' var form = $("#fastAdminForm");\n' + ' var actionSelector = $("#actionSelector");\n' + '\n' + ' $(".addFields").hide();\n' + ' $(".addFields").attr("disabled",true);\n' + '\n' + ` if ($("#actionSelector option:selected").attr('addFields')) {\n` + ` var addFields = $("#actionSelector option:selected").attr('addFields').split(",");\n` + ' for (index = 0; index < addFields.length; ++index) {\n' + ` form.find('input[name="'+addFields[index]+'"]').show();\n` + ` form.find('input[name="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('select[name="'+addFields[index]+'"]').show();\n` + ` form.find('select[name="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('select[id="'+addFields[index]+'"]').show();\n` + ` form.find('select[id="'+addFields[index]+'"]').attr("disabled",false)\n` + ` form.find('span[name="'+addFields[index]+'"]').css('display', 'inline-block');\n` + ` form.find('span[name="'+addFields[index]+'"]').attr("disabled",false);\n` + ' }\n' + ' }\n' + ' }\n' + '\n' + ' function submitFastAdmin() {\n' + '\n' + ' // Check if command is selected\n' + ' var command = $("#actionSelector").val();\n' + ' if (command=="") {\n' + ' console.log("No command selected");\n' + ' return;\n' + ' }\n' + '\n' + ' '... 3413 more characters, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kHeaders)]: { 'content-type': 'text/html', date: 'Mon, 14 Oct 2024 17:07:01 GMT', connection: 'keep-alive', 'content-length': '13413' }, [Symbol(kHeadersCount)]: 8, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }
                              

                              Michael

                              CodierknechtC Online
                              CodierknechtC Online
                              Codierknecht
                              Developer Most Active
                              wrote on last edited by
                              #16

                              @michihorn
                              Und was passiert, wenn Du den URL in einem Browser aufrufst?
                              Oder Du Dir statt res einen evtl. auftretenden Fehler err ins Log schreiben lässt?

                              "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                              Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                              HmIP|ZigBee|Tasmota|Unifi
                              Zabbix Certified Specialist
                              Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                              M 1 Reply Last reply
                              0
                              • CodierknechtC Codierknecht

                                @michihorn
                                Und was passiert, wenn Du den URL in einem Browser aufrufst?
                                Oder Du Dir statt res einen evtl. auftretenden Fehler err ins Log schreiben lässt?

                                M Online
                                M Online
                                michihorn
                                wrote on last edited by michihorn
                                #17

                                @codierknecht sagte in Keine Ahnung von API:

                                Und was passiert, wenn Du den URL in einem Browser aufrufst?

                                Wir sind dicht dran:
                                fully.png
                                Wenn ich jetzt das Password von Hand Eingebe, wird die StartURL geändert.
                                Ich habe gerade mal das Password in Gänsefüsschen gesetzt, dass klappt.

                                 http://192.168.178.1xx:2323/?cmd=loadUrl&url=http://192.168.178.1xx:8082/vis/index.html?main#000Header_K&password="Wxxxl"
                                

                                Aber leider nicht per Script.

                                Wenn ich das err ins LOG setzte kommt beim Durchlauf "null"

                                CodierknechtC 1 Reply Last reply
                                0
                                • M michihorn

                                  @codierknecht sagte in Keine Ahnung von API:

                                  Und was passiert, wenn Du den URL in einem Browser aufrufst?

                                  Wir sind dicht dran:
                                  fully.png
                                  Wenn ich jetzt das Password von Hand Eingebe, wird die StartURL geändert.
                                  Ich habe gerade mal das Password in Gänsefüsschen gesetzt, dass klappt.

                                   http://192.168.178.1xx:2323/?cmd=loadUrl&url=http://192.168.178.1xx:8082/vis/index.html?main#000Header_K&password="Wxxxl"
                                  

                                  Aber leider nicht per Script.

                                  Wenn ich das err ins LOG setzte kommt beim Durchlauf "null"

                                  CodierknechtC Online
                                  CodierknechtC Online
                                  Codierknecht
                                  Developer Most Active
                                  wrote on last edited by
                                  #18

                                  @michihorn

                                  Die Doku hast Du gelesen?

                                  Don’t forget to URLencode all query string parameters

                                  Wie bereits vermutet müssen die Parameter codiert werden.

                                  Das sollte dann vermutlich in etwa so aussehen:

                                  const url = 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http%3A%2F%2F192.168.178.1xx%3A8082%2Fvis%2Findex.html%3Fmain%23000Header_KK&password=Wxxxxl';
                                  

                                  Wenn das Passwort auch noch Sonderzeichen enthält, muss das auch codiert werden.
                                  https://www.urlencoder.org/de/

                                  BTW: Du musst hier Deine internen IP's nicht x'en. Die sehen bei uns allen gleich aus.

                                  "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                                  Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                                  HmIP|ZigBee|Tasmota|Unifi
                                  Zabbix Certified Specialist
                                  Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                                  M 1 Reply Last reply
                                  1
                                  • CodierknechtC Codierknecht

                                    @michihorn

                                    Die Doku hast Du gelesen?

                                    Don’t forget to URLencode all query string parameters

                                    Wie bereits vermutet müssen die Parameter codiert werden.

                                    Das sollte dann vermutlich in etwa so aussehen:

                                    const url = 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http%3A%2F%2F192.168.178.1xx%3A8082%2Fvis%2Findex.html%3Fmain%23000Header_KK&password=Wxxxxl';
                                    

                                    Wenn das Passwort auch noch Sonderzeichen enthält, muss das auch codiert werden.
                                    https://www.urlencoder.org/de/

                                    BTW: Du musst hier Deine internen IP's nicht x'en. Die sehen bei uns allen gleich aus.

                                    M Online
                                    M Online
                                    michihorn
                                    wrote on last edited by michihorn
                                    #19

                                    @codierknecht sagte in Keine Ahnung von API:

                                    const url = 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http%3A%2F%2F192.168.178.1xx%3A8082%2Fvis%2Findex.html%3Fmain%23000Header_KK&password=Wxxxxl';

                                    OK, die Seite wird nun per Script geladen, aber nur im "Edit" Modus :-(
                                    Das Password hat keine Sonderzeichen.

                                    CodierknechtC 1 Reply Last reply
                                    0
                                    • M michihorn

                                      @codierknecht sagte in Keine Ahnung von API:

                                      const url = 'http://192.168.178.1xx:2323/?cmd=loadUrl&url=http%3A%2F%2F192.168.178.1xx%3A8082%2Fvis%2Findex.html%3Fmain%23000Header_KK&password=Wxxxxl';

                                      OK, die Seite wird nun per Script geladen, aber nur im "Edit" Modus :-(
                                      Das Password hat keine Sonderzeichen.

                                      CodierknechtC Online
                                      CodierknechtC Online
                                      Codierknecht
                                      Developer Most Active
                                      wrote on last edited by
                                      #20

                                      @michihorn sagte in Keine Ahnung von API:

                                      aber nur im "Edit" Modus

                                      Du meinst den Vis-Editor?

                                      Dann bin ich raus.
                                      Da ich den Remote-Admin nicht habe, kann ich da nicht weiterhelfen.

                                      "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                                      Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                                      HmIP|ZigBee|Tasmota|Unifi
                                      Zabbix Certified Specialist
                                      Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                                      M 1 Reply Last reply
                                      0
                                      • CodierknechtC Codierknecht

                                        @michihorn sagte in Keine Ahnung von API:

                                        aber nur im "Edit" Modus

                                        Du meinst den Vis-Editor?

                                        Dann bin ich raus.
                                        Da ich den Remote-Admin nicht habe, kann ich da nicht weiterhelfen.

                                        M Online
                                        M Online
                                        michihorn
                                        wrote on last edited by michihorn
                                        #21

                                        @codierknecht Ja, den VIS Editor. Es wird kurz Angezeigt VIS existiert nicht, dann wird sie aber doch im Edit-Mod geladen.

                                        Nun klappt es ein kleiner Buchstabe zuviel:

                                        const url = 'http://192.168.178.192:2323/?cmd=loadUrl&url=http%3A%2F%2F192.168.178.162%3A8082%2Fvis%2Findex.html%3Fmain%23000Header_K&password=Wxxxl';
                                        

                                        Hinter ....Header_K stand noch ein K.
                                        Vielen herzlichen Dank.

                                        1 Reply Last reply
                                        0
                                        • CodierknechtC Online
                                          CodierknechtC Online
                                          Codierknecht
                                          Developer Most Active
                                          wrote on last edited by Codierknecht
                                          #22

                                          @michihorn
                                          Ein einfaches Umschalten der View geht allerdings noch deutlich einfacher direkt über die States der Vis-Instanz.

                                          e049be65-405e-4cbc-a0f0-1582e2b8bd37-grafik.png

                                          setState('vis.0.control.data', 'Header_K');
                                          setState('vis.0.control.command', 'changeView');
                                          

                                          "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Martin Fowler, "Refactoring")

                                          Proxmox 9.1.1 LXC|8 GB|Core i7-6700
                                          HmIP|ZigBee|Tasmota|Unifi
                                          Zabbix Certified Specialist
                                          Konnte ich Dir helfen? Dann benutze bitte das Voting unten rechts im Beitrag

                                          M 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          571

                                          Online

                                          32.7k

                                          Users

                                          82.4k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe