Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol

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

      @Knallochse
      Gut,
      Die .24 ist im nmap scan (manuell?, mit sudo?) drin. Im DP nicht.

      Hast du die sudoers korrekt konfiguriert?

      Knallochse 1 Reply Last reply Reply Quote 0
      • Knallochse
        Knallochse @Homoran last edited by Knallochse

        @Homoran manuelle Ausführungen des nmap scan ohne sudo (läuft im Docker einer Synlogy DS) in der Konsole
        In sudoers steht es zwar drin, wird ja aber eigentlich nicht gebraucht

        liv-in-sky Homoran 2 Replies Last reply Reply Quote 0
        • liv-in-sky
          liv-in-sky @Knallochse last edited by

          @Knallochse welche version von nmap ist das

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

            @liv-in-sky

            Im Protokoll von Knallochse steht :

            Starting Nmap 7.40 ( https://nmap.org ) at 2020-02-15 10:21 CET
            

            Ich denke mal die ist aktuell für die Synology , so wie bei mir.

            nmap ist schon die neueste Version (7.40-1).
            
            liv-in-sky 1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Glasfaser last edited by

              @Glasfaser ja - hab ich dann auch gesehen 😞

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

                @Knallochse sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                manuelle Ausführungen des nmap scan ohne sudo (läuft im Docker einer Synlogy DS) in der Konsole

                sorry zu viele gleichzeitige Threads.
                Läuft ja als root und ihr habt das sudo rausgenommen.

                @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                @Knallochse welche version von nmap ist das

                Da der manuelle Scan das Ergebnis bringt, ist die Version ok.

                • Der manuelle Scan läuft durch!
                • der manuelle RegEx findet es auch:
                  laptop_gefunden.png

                Woran es jetzt liegt ist eine ganz andere Frage.

                Wenn nach löschen der Datenpunkte der Eintrag für den Laptop wieder angelegt wird, funktioniert das Script zumindest einmalig.

                Ich habe auch solche Kandidaten, u.a. Handys und Tablets.
                Habe deswegen gestern auch mal alles neu initialisiert.
                Die Handys tauchten nicht wieder auf. Dachte erst es läge am Android10 Update, das ich gerade durchgeführt hatte, aber andere Android 10 Handys waren vorher auch zu sehen.

                Habe daraufhin die Handys rebooted, da waren sie sofort wieder drin.

                Aber nur ein paar Aufrufe. Ab dann tauchten sie in der Liste nur noch sporadisch als aktiv auf.
                Ebenso meine Galaxy-Tabs. Hier half auch kein reboot.
                Die sind mal als aktiv gekennzeichnet, mal nicht.

                Ich habe keine Ahnung warum

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

                  hi..
                  Habe zwei Sachen, die bei mir nicht richtig laufen bzw. gelaufen sind.

                  1. Der Regex Ausdruck ist in meinem Fall falsch, da mein Domain Suffix nicht fritz.box sondern mxxxxx.local lautet (Nutze PIHole inkl. DHCP)

                  Habe dafür das f entfernt, da es wohl nach "fritz" sucht...

                  myArr=myData.match(/for\s+([A-Za-z0-9-_]+).[^(]+\((\d+\.\d+\.\d+\.\d+)\)|(fritz\.\w+)\s+\((\d+\.\d+\.\d+\.\d+)\)|(\d+\.\d+\.\d+\.\d+)$/gm)
                  

                  Danach hat das Script dann auch alle meine derzeit 37 Geräte ausgegeben. Vorher waren es nur 14 und bis auf zwei nur IP Adressen.

                  1. Wenn ich mir die Sortierung anschaue, dann gibt es wohl ein Problem der Sortierung. Es wird wohl, wenn eine IP Adresse gesehen wird oder auf IP Sortierung gestellt ist, nur das letzte Octet sortiert. Da ich ein 23er Subnetz haben und somit im dritte Octet verschieden ist, sieht das ziemlich doof aus. Ausserdem wird im Namen numerisch falsch sortiert (1,2,3,4,5...10,11..20) sondern 1,10,11,2,20,3)

                  Sortierung IP Adressen
                  33d3ac50-3388-402d-aafc-47785bcae214-image.png

                  Sortierung Name
                  d78c636a-a485-4672-984f-426c123604a6-image.png

                  Da habe ich aber leider keine Lösung zu...Hat einer eine Idee?

                  Homoran liv-in-sky 3 Replies Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @msauer last edited by

                    @msauer sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                    Hat einer eine Idee?

                    Die integrierte Alias-Funktion nutzen.
                    Das ist zwar einmalig etwas Arbeit, dafür sieht es hinterher umso besser aus.

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

                      @msauer die sortierung ist richtig - aber wenn du eine ip als name hast, wird das als string sortiert und nicht nach zahl

                      bei der sortierung nach ip wird nur der letzte teil als zahl definiert und danach sortiert.

                      mit den aliasen kannst du wenigstens nach clientname sortieren

                      noch nicht fertig gedacht aber evtl kannst du die beiden letzten blöcke als eine zahl definieren und sortieren - z.b.

                      x.x.0.40 wäre 40
                      x.x.1.144 wäre 1144
                      x.x.1.33 wäre 1033
                      x.x.3.222 wäre 3222
                      x.x.2.1 wäre 2001
                      x.x.0.144 wäre 144
                      x.x.0.256 wäre 256

                      sortiert:

                      x.x.0.40
                      x.x.0.144
                      x.x.0.256
                      x.x.1.33
                      x.x.1.144
                      x.x.2.1
                      x.x.3.222

                      müßte in der sort-function angeglichen werden

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

                        @msauer

                        ohne jeder gewähr - bin in eile:

                        ersetze mal die sortierung damit

                        if (!sortiereClient){ 
                                    myObj.sort(function (alpha, beta) {
                                     //   if (parseFloat(beta[1].replace(/.+\.(.+)$/,"$1")) > parseFloat(alpha[1].replace(/.+\.(.+)$/,"$1")))
                                      if ((parseFloat(beta[1].replace(/.+\.(.+)$/,"$1")))+(parseFloat(beta[1].replace(/.+\.(.+)\..+$/,"$1"))*1000) > (parseFloat(alpha[1].replace(/.+\.(.+)$/,"$1")))+(parseFloat(alpha[1].replace(/.+\.(.+)\..+$/,"$1"))*1000))
                                            return -1;
                                        if ((parseFloat(alpha[1].replace(/.+\.(.+)$/,"$1")))+(parseFloat(alpha[1].replace(/.+\.(.+)\..+$/,"$1"))*1000) > (parseFloat(beta[1].replace(/.+\.(.+)$/,"$1")))+(parseFloat(beta[1].replace(/.+\.(.+)\..+$/,"$1"))*1000))
                                            return 1;
                                     return 0;
                                    });  
                                    }
                        

                        Image 3.png

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

                          @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                          @msauer

                          ohne jeder gewähr - bin in eile:

                          ersetze mal die sortierung damit

                          Prima, danke.....IP Sortierung ist jetzt korrekt, nun werden auch x.x.1.x IPs richtig sortiert.

                          1 Reply Last reply Reply Quote 0
                          • sigi234
                            sigi234 Forum Testing Most Active @liv-in-sky last edited by sigi234

                            @liv-in-sky

                            Hallo, Fehler?

                            javascript.0	2020-03-05 22:15:28.932	warn	(23684) script.js.Listen.Fritz_IP9: no Array
                            

                            Ach, hatten wir ja schon.

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

                              @sigi234

                              das ist ein scriptwarning, wenn keine daten kommen - kommt ab und zu vor - ist kein eigentlicher script error, sondern wird vom script geloggt - also keine panic

                              sigi234 1 Reply Last reply Reply Quote 0
                              • sigi234
                                sigi234 Forum Testing Most Active @liv-in-sky last edited by

                                @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                @sigi234

                                das ist ein scriptwarning, wenn keine daten kommen - kommt ab und zu vor - ist kein eigentlicher script error, sondern wird vom script geloggt - also keine panic

                                Ok, aber jetzt panic

                                javascript.0	2020-03-05 22:27:15.316	error	(23540) at Timer.processTimers (timers.js:223:10)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) at listOnTimeout (timers.js:263:5)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) at tryOnTimeout (timers.js:300:5)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) at ontimeout (timers.js:438:13)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) at Timeout._onTimeout (C:\Program Files\iobroker\Test\node_modules\iobroker.javascript\lib\sandbox.js:2077:34)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) at Object.<anonymous> (script.js.Listen.Fritz_IP9:243:26)
                                javascript.0	2020-03-05 22:27:15.315	error	(23540) Error in callback: TypeError: Cannot read property 'toString' of null
                                
                                liv-in-sky 1 Reply Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky @sigi234 last edited by

                                  @sigi234 was hast du gemacht ?

                                  sigi234 1 Reply Last reply Reply Quote 0
                                  • sigi234
                                    sigi234 Forum Testing Most Active @liv-in-sky last edited by

                                    @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                    @sigi234 was hast du gemacht ?

                                    Skript neu erstellt

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

                                      @sigi234 dann hast du was verkehrt gemacht ?

                                      sigi234 1 Reply Last reply Reply Quote 0
                                      • sigi234
                                        sigi234 Forum Testing Most Active @liv-in-sky last edited by sigi234

                                        @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                        @sigi234 dann hast du was verkehrt gemacht ?

                                         //@liv-in-sky Januar 2020 11.2-18:15
                                         
                                         
                                        //HIER WIRD PFAD UND FILENAME DEFINIERT
                                        const path = "/fritzip.html";                   //FIlenamen definieren
                                        const home ='vis.0'                                 //wo soll das file im iobroker-file-system liegen ? (oder z.b auch iqontrol.meta)
                                        let   braucheEinFile=true;                          // bei true wird ein file geschrieben
                                        let   braucheEinVISWidget=true;                     // bei true wird ein html-tabelle in einen dp geschrieben - siehe nächste zeile
                                        let dpVIS="javascript.0.Eigene_Datenpunkte.TABELLEN.fritzip"         //WICHTIG wenn braucheEinVISWidget auf true gesetzt !!  dp zusätzlich für VIS-HTML-Basic-Widget
                                        let mySchedule=" */3 * * * *";                       //jede minute  -  nicht unter eine minute gehen -besser 3 oder 5 minuten nutzen !!!
                                        const domainName="fritz.box";                  // domainname in der fritzbox definiert
                                        const ipbereich="192.168.178.0/24";           //  gilt nicht für windows
                                        const dnsServer="192.168.178.1"               // gilt nicht für windows
                                        let sortiereClient=true;                     //true nach client false nach ip
                                        const waitTime=15000;                        // falls längere zeit keine daten kommen - diesen wert erhöhn um 5000 (ms)
                                        const lastZellColorSetting="lightgreen"      // farbe der zusammenfassung in der letzten zelle der tabelle 
                                        const oerationSystemchange=true;              // false ist linux, true ist windows
                                        const onlyWinEthernetIF="eth0"                // nur windows über befehl "nmap --iflist" herausfinden
                                        const farbeNichtErreichbar="#FFBF00";         // farbe für devices, die gerade nicht online sind
                                        const styleNichtErreichbar="i";             // möglich i=schräg, b ist fett und span ist normal - nur eines  davon !!!
                                        const kuerzungNamen=23;                      // länge der namen kürzen
                                         
                                        //hier eintragen für die übersetzung der standardnamen - aliase - rechte seite wird statt linker  angezeigt - die beispiele kann man raus löschen
                                        // BITTE AUF DIE KOMMAs ACHTEN
                                                           
                                        
                                        }
                                        

                                        Screenshot (1919).png

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

                                          @sigi234

                                          probier mal

                                          script stop
                                          javascript.0.Tabellen.IPDevices.Device_Collection - datenpunkt löschen
                                          script start

                                          sigi234 1 Reply Last reply Reply Quote 0
                                          • sigi234
                                            sigi234 Forum Testing Most Active @liv-in-sky last edited by

                                            @liv-in-sky sagte in IP Devices im Netzwerk - HTML Tabelle vis, Iqontrol:

                                            @sigi234

                                            probier mal

                                            script stop
                                            javascript.0.Tabellen.IPDevices.Device_Collection - datenpunkt löschen
                                            script start

                                            Schaut gut aus.

                                            liv-in-sky 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            351
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript template
                                            26
                                            493
                                            66412
                                            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