Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Gerät per Mac Adr & Blockly ansprechen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst] Gerät per Mac Adr & Blockly ansprechen

    This topic has been deleted. Only users with topic management privileges can see it.
    • liv-in-sky
      liv-in-sky @Aphofis last edited by liv-in-sky

      @Aphofis

      hast du arp installiert ? ist z.b. bei mir nicht installiert https://www.computerhope.com/unix/arp.htm

      ich hätte ein script, mit dem habe ich über Nmap ein liste (json) mit ip und macadresse von meinem netzwerk erzeugt wird - falls interesse - die liste könnte man dann auch abfragen - wobei die lösung von @fastfoot recht gut finde - dieses script kommt als "ausschuß" von dieser tabelle: https://forum.iobroker.net/topic/30057/ip-devices-im-netzwerk-html-tabelle-vis-iqontrol

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

        @liv-in-sky
        Klingt gut!
        Das über Blockly finde ich Top nur gibt die Ausgabe nicht den gewünschten effekt Also das soll doch die IP adresse zu der abgefragten MAC Adresse raus oder nicht
        Nein ARP habe ich nicht installiert! Was denn das für ein Adapter kenne ich nicht

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

          @Aphofis

          kein adapter

          sein blockly nutzt exec - das bedeutet, es ruft einen linux befehl auf - das blockly geht auf die linux ebene !

          und bitte kontrollieren:
          hast du exec im javascript-instanz aktiviert ?

          Image 2.png

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

            @liv-in-sky
            Ja na klar EXEC ist aktiv! Ich habe mehrere von meinen aktiven 117 Aquarium Blockly Steuerungen die per EXEC Abfragen empfangen bzw senden.

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

              @Aphofis wenn du mal eine console auf deinem server öffnest (nehme an linux?) , dann gib mal arp ein - dann siehst du, ob es installiert ist

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

                @liv-in-sky
                moment
                ...........
                ist es richtog, das arp alle verbundenen Geräte mit MAC adresse auflistet!?

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

                  @Aphofis

                  also ich habe das mal bei einen meiner server auf console aufgerufen - bei mir findet arp nur ein paar geräte- da müßtest du mal googleln, was das genau macht oder evtl weiß es hier jmd, wie der befehl genau funktioniert - mußte bis jetzt nie was mit arp machen

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

                    @Aphofis
                    was ich noch gefunden habe ist arp-scan - da sind dann wohl alle drin

                    auf dieser seite - weiter unten - https://www.elektronik-kompendium.de/sites/net/1910051.htm ist das erklärt

                    wenn ich arp-scan --localnet eingebe, kommen alle geräte im netz

                    vielleicht hilft das - das könnte man auch nehmen um ein blockly mit exec zu machen

                    1 Reply Last reply Reply Quote 1
                    • F
                      fastfoot last edited by

                      @Aphofis
                      Probiere doch mal arp -a auf der Konsole, das listet alle gespeicherten Geräte mit MAC und IP. das Format könnte anders sein als bei meinem. Poste doch mal das Ergebnis. Wenn arp nicht in deinem Linux installiert ist dann macht es aber eh keinen Sinn. Und ja, das Blockly-Exec gibt als Rückgabe genau die gefundene IP zurück, daraus bastele ich dann die URL die du so in deinem Request verwenden kannst. arp listet nicht zwangsläufig alle Geräte, sondern nur die zuletzt Traffic im Netzwerk hatten. Es wären also mehrere Ursachen für eine leere Rückgabe denkbar.

                      Dein Setup des TP-Link habe ich nicht verstanden, du schreibst so als hättest du dort 'nur' den MAC-Filter eingestellt, der vergibt aber keine IP Adressen. Falls der noch einen DHCP-Server hat würde ich den unbedingt ausschalten, die Fritzbox jedenfalls vergibt immer die gleichen Afressen

                      Aphofis liv-in-sky 2 Replies Last reply Reply Quote 1
                      • Aphofis
                        Aphofis @fastfoot last edited by Aphofis

                        @fastfoot
                        für das getestete Gerät ist die arp ausgabe

                        Aqua-Control.fritz.box (192.168.0.57) auf 2c:f4:32:57:b7:14 [ether] auf eth0
                        
                        

                        Nein TP Link hat keinen DHCP am laufen das wäre kontra produktiv
                        IPs vergint nur die Fritzbox ich meine ich habe im WLAN des TP Link nur die Geräte erlaubt per MAC adresse die da auch was zu suchen haben. Da mein Meerwasser Aquarium ein geschlossenes System ist.

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

                          @fastfoot also ich bekome bei arp -a genau 5 geräte angezeigt

                          mit arp-scan --localnet sind es alle

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

                            @liv-in-sky sagte in Gerät per Mac Adr & Blockly ansprechen:

                            arp-scan

                            nein nein also es werden viele Geräte angezeigt

                            1 Reply Last reply Reply Quote 0
                            • F
                              fastfoot @Aphofis last edited by

                              @Aphofis
                              dann müsste es eigentlich funktionieren. Probiere mal arp -a|grep DEINE_MAC| cut -f1 -d" ". Das müsste dir den Namen zurückgeben. arp -a|grep DEINE_MAC|cut -f2 -d" "|cut -f2|cut -c2-16|cut -f1 -d ")" die IP Adresse.

                              1 Reply Last reply Reply Quote 1
                              • haselchen
                                haselchen Most Active last edited by

                                Stehe ich aufm Schlauch oder müsste @Aphofis nicht einfach 2 verschiedene Adressbereiche in seinen Routern vergeben , um das Problem zu lösen ?
                                Z.B.
                                Fritzbox 192.168.2... .
                                Tp Link 192.168.0......

                                Aphofis F 2 Replies Last reply Reply Quote 0
                                • Aphofis
                                  Aphofis last edited by

                                  Bei abfrage arp-scan -localnet kommt das

                                  pi@AquaPi:~ $ arp-scan -localnet
                                  -bash: arp-scan: Kommando nicht gefunden.
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    fastfoot @liv-in-sky last edited by

                                    @liv-in-sky sagte in Gerät per Mac Adr & Blockly ansprechen:

                                    @fastfoot also ich bekome bei arp -a genau 5 geräte angezeigt

                                    mit arp-scan --localnet sind es alle

                                    arp-scan ist kein Standardprogramm. Ich schrieb ja dass nur die Geräte gelistet werden welche Traffic hatten. Mit ping fehlende_ip-adresse kannst du das prüfen

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

                                      @haselchen
                                      nein DHCP ist Fritzbox vergibt adressen
                                      Fritzbox 192.168.0.1
                                      Aqua_Net 192.168.0.2
                                      Aqua_Repeater 192.168.0.33
                                      alle Geräte bekommen von der Fritzbox ihre IP die auch fixiert ist.
                                      jeweils alle Geräte die nur ins Aqua_Net dürfen sind per MAC adresse deklariert!
                                      Ich sage ja nihct das alle Geräte ständig sporadisch eine neue IP bekommen es sind nur 3 NodeMCU die mucken machen und ausgetauscht habe ich die auch schon

                                      haselchen 1 Reply Last reply Reply Quote 0
                                      • Aphofis
                                        Aphofis @fastfoot last edited by

                                        @fastfoot
                                        Ich hatte in der abfrage die Mac adresse eingegeben von dem Gerät was ich auslesen wollte.
                                        dann kommt dies in der Log dabei raus

                                        javascript.0	2020-06-23 20:52:29.139	info	(31412) script.js.ESP_Reboot.Aqu_Control_IP_Abfrage: http:///cm?user=admin&mein_benutzer=mein_passwort
                                        javascript.0	2020-06-23 20:52:29.094	info	(31412) script.js.ESP_Reboot.Aqu_Control_IP_Abfrage: registered 0 subscriptions and 0 schedules
                                        javascript.0	2020-06-23 20:52:29.036	info	(31412) Start javascript script.js.ESP_Reboot.Aqu_Control_IP_Abfrage
                                        javascript.0	2020-06-23 20:52:27.575	info	(31412) Stop script script.js.ESP_Reboot.Aqu_Control_IP_Abfrage
                                        
                                        F 1 Reply Last reply Reply Quote 0
                                        • F
                                          fastfoot @haselchen last edited by

                                          @haselchen
                                          er schrieb doch dass das gleiche Netz benutzt wird...

                                          Aphofis 1 Reply Last reply Reply Quote 0
                                          • Aphofis
                                            Aphofis @fastfoot last edited by

                                            @fastfoot
                                            ein zweites subnetz habe ich getestet! dann ist alles völlig durcheinander !!!
                                            so ist es besser mit einem DHCP

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            776
                                            Online

                                            31.6k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            8
                                            158
                                            9261
                                            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