Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Fritzbox-> Ip von neuem Teilnehmer ermitteln

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Fritzbox-> Ip von neuem Teilnehmer ermitteln

    This topic has been deleted. Only users with topic management privileges can see it.
    • dieckfr
      dieckfr @dieckfr last edited by Homoran

      @dieckfr Vielleicht hat jemand eine Idee wie ich beim command Befehl den Input bediene...

      Folgendes funktioniert ohne Probleme über den tr064 Adapter:

      {"service":"urn:dslforum-org:service:WLANConfiguration:1","action":"GetTotalAssociations","params":{}}
      

      Als Ergebnis bekomme ich : {"NewTotalAssociations":"13"}

      ICh kriege aber das Command für die letzte IP nicht gebacken, so wie ich es verstanden habe gebe ich den Indexwert irgendwie an, und kann dann die IP ergattern... Aber seit Stunden versuche ich das Command auf die Kette zu bekommen, so siehts im Moment aus :

      var dp="tr-064.0.states.command"; //Datenpunkt command vom tr-064
      var result= "tr-064.0.states.commandResult"
       
      var command1 = { 
          "service": "urn:dslforum-org:service:WLANConfiguration:1", 
          "action": "GetGenericAssociatedDeviceInfo",
          "params": { "NewAssociatedDeviceIPAddress":"13"
          } 
          
      };
       
      var comm1=JSON.stringify(command1)  //Kommando als JSON
       
      setState(dp , comm1);
      

      MOD-EDIT: Code in code-tags gesetzt!

      Die 13 steht für das Ergebnis vom Index NewTotalAssociations...
      Als Result bekomme ich aber, auch wenn ich das Skript alleine laufen lasse:

      {"NewTotalAssociations":"13"}

      ich weiss nicht wie ich den Index PArameter sauber übergebe, und dann zur IP komme...
      MAg mir jemand helfen?

      🙂

      M 1 Reply Last reply Reply Quote 0
      • M
        MCU @dieckfr last edited by MCU

        @dieckfr
        1.
        Bitte die Codezeilen in Code-Tags
        5fc83bd4-e0cf-4064-8209-3ba42cfd5405-image.png
        Dann kann man die zeilen auch besser lesen.
        2.
        Du musst, wenn ich das richtig gelesen habe, für die Variable command1 nicht " (normale Anführungsstriche) nehmen sondern die Hochkommata ' (Shift #).

        Den Index durchgehen, also 0 bis Anzahl-1, die zurückgemeldet wurde.

        {
          "service": "urn:dslforum-org:service:WLANConfiguration:1",
          "action": "GetGenericAssociatedDeviceInfo",
          "params": {
            "NewAssociatedDeviceIndex": 12 
          }
        }
        
        // bei 13 -> 12 setzen
        
        liv-in-sky 1 Reply Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @MCU last edited by

          @mcu

          hast du da etwas mehr erfahrung? wollte mal eine abfrage nach allen ip devices - weißt du, wie das geht, komme mit den beschreibungen nicht wirklich weiter

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User @dieckfr last edited by

            @dieckfr sagte in Fritzbox-> Ip von neuem Teilnehmer ermitteln:

            suchen in den WLAN Ereignissen der Fritzbox ersparen

            Moin,

            im Adapter fb-checkpresence gibt es die blacklist, wenn neue geräter im Heimischen Netz auftauchen, sollten die auch dort auftauchen. Liste als json und html

            188377ba-aa27-4d7a-a8f7-134f2ff9cb39-grafik.png

            VG
            Bernd

            1 Reply Last reply Reply Quote 0
            • M
              MCU last edited by MCU

              @liv-in-sky Ich hab mal hier die Befehle, die bei mir Daten zurückbrachten aufgelistet. Vielleicht ist ja was dabei?
              https://mcuiobroker.gitbook.io/jarvis-infos/tipps/adapter-spezifisch/tr064#befehle-fuer-tr064.states.command
              Wenn du eine bestimmte Anleitung meinst bitte Link.

              /* Damit holt man sich die Anzahl aller Devices */
              {
                "service": "urn:dslforum-org:service:Hosts:1",
                "action": "GetHostNumberOfEntries",
                "params": {}
              }
              /* damit dann den x.ten eintrag 0- Anzahl (GetHostNmberOfEntries) -1 */
              {
                "service": "urn:dslforum-org:service:Hosts:1",
                "action": "GetGenericHostEntry",
                "params": {
                  "NewIndex": 0
                }
              }
              
              
              liv-in-sky 1 Reply Last reply Reply Quote 0
              • Gaspode
                Gaspode @dieckfr last edited by Gaspode

                @dieckfr said in Fritzbox-> Ip von neuem Teilnehmer ermitteln:

                Ich würde mir bei der neuen IoT gerne das lästige suchen in den WLAN Ereignissen der Fritzbox ersparen...

                Sowas geht sogar ganz ohne ioBroker mit dem Fritz!Box Push Service. Wenn du da "Änderungsnotiz" anhakst, bekommst du bei Neuanmeldung eines Geräts eine Push Nachricht.

                1 Reply Last reply Reply Quote 1
                • liv-in-sky
                  liv-in-sky @MCU last edited by

                  @mcu erstmal danke

                  hatte gerade überlegt:

                  habe ja ein nmap script, welches alle ip im netz scanned und in eine tabelle für die vis wandelt - wollte das hiermit auch probieren - d.h. ich müßte jedes einzelne device abfragen - also evtl knapp 255 device pro bereich (je nachdem, wieviele man hat)

                  hört sich nicht gut an, soviele anfrage auf einmal/hintereinander zu senden - dachte ich würde eine liste von devices zurückbekommen

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    MCU @liv-in-sky last edited by

                    @liv-in-sky Gibt es glaub ich irgendwie, man bekommt dann allerdings eine URL.

                    liv-in-sky 1 Reply Last reply Reply Quote 0
                    • liv-in-sky
                      liv-in-sky @MCU last edited by liv-in-sky

                      @mcu habe nur irgendwo gelesen, dass es ein file erzeugt und man einen pfad dazu bekommt - wird das wohl sein

                      Image 214.png

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        MCU @liv-in-sky last edited by

                        @liv-in-sky
                        12391aeb-b22f-47d8-8d99-830047988c9f-image.png

                        liv-in-sky 1 Reply Last reply Reply Quote 1
                        • liv-in-sky
                          liv-in-sky @MCU last edited by

                          @mcu wenn ich das eingebe kommt nix zurück

                          {
                            "service": "urn:LanDeviceHosts-com:serviceId:Hosts1",
                            "action": "X_AVM-DE_GetHostListPath",
                            "params": {}
                          }
                          

                          Image 215.png

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            MCU @liv-in-sky last edited by MCU

                            @liv-in-sky

                            let wlan = '1'; // 1 -> 2.4GHz ( für diesen Fall missverständlich )
                            let fritzCommandDP = 'tr-064.0.states.command';
                            let fritzResultDP = 'tr-064.0.states.commandResult';
                            
                            let cmdHostListPath     = {'service': 'urn:dslforum-org:service:Hosts:'+wlan,'action': 'X_AVM-DE_GetHostListPath','params': {}};
                            
                            sendCMD(JSON.stringify(cmdHostListPath));
                            
                            
                            async function sendCMD(cmd) {
                                setState(fritzCommandDP, cmd);
                                const obj = await once({ id: fritzResultDP });
                                // log("Erg: " + obj.state.val);
                                let erg = JSON.parse(obj.state.val);
                                // log(erg["NewX_AVM-DE_HostListPath"]);
                                const request = require('request');
                            
                                request('http://192.168.178.1:49000'+erg["NewX_AVM-DE_HostListPath"], { json: true }, (err, res, body) => {
                                if (err) { return console.log(err); }
                                    //console.log(body.url);
                                    //console.log(body.explanation);
                                    //console.log(res);
                                    console.log(body);
                                });  
                            }
                            
                            

                            Machst du ein JSON daraus?

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            683
                            Online

                            31.7k
                            Users

                            79.8k
                            Topics

                            1.3m
                            Posts

                            5
                            13
                            747
                            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