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. ioBroker Allgemein
  4. Iphone verliert immer das wlan???

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.8k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.2k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.3k

Iphone verliert immer das wlan???

Scheduled Pinned Locked Moved ioBroker Allgemein
ping adapter
65 Posts 10 Posters 6.4k Views 7 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.
  • OliverIOO OliverIO

    @oliverio

    noch kleine korrektur
    den befehl zum testen muss man ebenfalls mit sudo ausführen,
    da der arp befehl nur für root ist

    sudo /opt/iobroker/cmd/iphone.sh
    

    aber am besten postest du alle deine ausgaben, welche dir komisch vorkommen

    D Offline
    D Offline
    denjo
    wrote on last edited by
    #21

    @oliverio mir kommen alle komisch vor weil Linux nicht mein perfektes Gebiet ist ;) ja werde ich morgen machen. Habe nachtschicht jetzt. Danke erst mal

    Thomas BraunT 1 Reply Last reply
    0
    • D denjo

      @oliverio mir kommen alle komisch vor weil Linux nicht mein perfektes Gebiet ist ;) ja werde ich morgen machen. Habe nachtschicht jetzt. Danke erst mal

      Thomas BraunT Online
      Thomas BraunT Online
      Thomas Braun
      Most Active
      wrote on last edited by Thomas Braun
      #22

      @denjo @OliverIO
      Ihr gestattet...

      sudo apt install hping3
      sudo -u iobroker mkdir /opt/iobroker/cmd
      sudo -u iobroker touch /opt/iobroker/cmd/iphone.sh
      sudo -u iobroker nano /opt/iobroker/cmd/iphone.sh
      

      Das skript in nano reinkopieren (geht in meiner shell mit der rechten Maustaste...)

      sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
      

      Et voilà:

      echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
      -rwxr-xr--+ 1 iobroker iobroker 678 Dec  2 00:03 /opt/iobroker/cmd/iphone.sh
      

      Funktioniert nur nicht, weil ich das skript nicht weiter angepasst habe:

      echad@chet:/opt/iobroker/cmd $ ./iphone.sh
      PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
      ^C
      --- 192.168.1.209 ping statistics ---
      1 packets transmitted, 0 received, 100% packet loss, time 0ms
      
      Phone 192.168.1.209 is not present
      

      Man macht für den iobroker keine shell auf (oder gar eine root-shell...)

      Linux-Werkzeugkasten:
      https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
      NodeJS Fixer Skript:
      https://forum.iobroker.net/topic/68035/iob-node-fix-skript
      iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

      OliverIOO 1 Reply Last reply
      0
      • Thomas BraunT Thomas Braun

        @denjo @OliverIO
        Ihr gestattet...

        sudo apt install hping3
        sudo -u iobroker mkdir /opt/iobroker/cmd
        sudo -u iobroker touch /opt/iobroker/cmd/iphone.sh
        sudo -u iobroker nano /opt/iobroker/cmd/iphone.sh
        

        Das skript in nano reinkopieren (geht in meiner shell mit der rechten Maustaste...)

        sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
        

        Et voilà:

        echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
        -rwxr-xr--+ 1 iobroker iobroker 678 Dec  2 00:03 /opt/iobroker/cmd/iphone.sh
        

        Funktioniert nur nicht, weil ich das skript nicht weiter angepasst habe:

        echad@chet:/opt/iobroker/cmd $ ./iphone.sh
        PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
        ^C
        --- 192.168.1.209 ping statistics ---
        1 packets transmitted, 0 received, 100% packet loss, time 0ms
        
        Phone 192.168.1.209 is not present
        

        Man macht für den iobroker keine shell auf (oder gar eine root-shell...)

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

        @thomas-braun sagte in Iphone verliert immer das wlan???:

        @denjo @OliverIO
        Ihr gestattet...

        sudo apt install hping3
        sudo -u iobroker mkdir /opt/iobroker/cmd
        sudo -u iobroker touch /opt/iobroker/cmd/iphone.sh
        sudo -u iobroker nano /opt/iobroker/cmd/iphone.sh
        

        Das skript in nano reinkopieren (geht in meiner shell mit der rechten Maustaste...)

        sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
        

        Et voilà:

        echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
        -rwxr-xr--+ 1 iobroker iobroker 678 Dec  2 00:03 /opt/iobroker/cmd/iphone.sh
        

        Funktioniert nur nicht, weil ich das skript nicht weiter angepasst habe:

        echad@chet:/opt/iobroker/cmd $ ./iphone.sh
        PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
        ^C
        --- 192.168.1.209 ping statistics ---
        1 packets transmitted, 0 received, 100% packet loss, time 0ms
        
        Phone 192.168.1.209 is not present
        

        Man macht für den iobroker keine shell auf (oder gar eine root-shell...)

        Funktioniert schon, aber halt kein Handy gerade da unter der IP :)

        was denkst du wo der fehler herkommt? Im speziellen an der Stelle mit dem ^M

        bash: /opt/iobroker/cmd/iphone.sh: /bin/bash^M: Defekter Interpreter: Datei oder Verzeichnis nicht gefunden
        

        Ich tippe darauf, das er es aus einer Windows-Textdatei eingefügt hat, und die falschen Zeilenumbrüche drin sind.
        Von daher ist das einfügen in Nano der beste Weg

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

        Thomas BraunT D 2 Replies Last reply
        0
        • OliverIOO OliverIO

          @thomas-braun sagte in Iphone verliert immer das wlan???:

          @denjo @OliverIO
          Ihr gestattet...

          sudo apt install hping3
          sudo -u iobroker mkdir /opt/iobroker/cmd
          sudo -u iobroker touch /opt/iobroker/cmd/iphone.sh
          sudo -u iobroker nano /opt/iobroker/cmd/iphone.sh
          

          Das skript in nano reinkopieren (geht in meiner shell mit der rechten Maustaste...)

          sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
          

          Et voilà:

          echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
          -rwxr-xr--+ 1 iobroker iobroker 678 Dec  2 00:03 /opt/iobroker/cmd/iphone.sh
          

          Funktioniert nur nicht, weil ich das skript nicht weiter angepasst habe:

          echad@chet:/opt/iobroker/cmd $ ./iphone.sh
          PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
          ^C
          --- 192.168.1.209 ping statistics ---
          1 packets transmitted, 0 received, 100% packet loss, time 0ms
          
          Phone 192.168.1.209 is not present
          

          Man macht für den iobroker keine shell auf (oder gar eine root-shell...)

          Funktioniert schon, aber halt kein Handy gerade da unter der IP :)

          was denkst du wo der fehler herkommt? Im speziellen an der Stelle mit dem ^M

          bash: /opt/iobroker/cmd/iphone.sh: /bin/bash^M: Defekter Interpreter: Datei oder Verzeichnis nicht gefunden
          

          Ich tippe darauf, das er es aus einer Windows-Textdatei eingefügt hat, und die falschen Zeilenumbrüche drin sind.
          Von daher ist das einfügen in Nano der beste Weg

          Thomas BraunT Online
          Thomas BraunT Online
          Thomas Braun
          Most Active
          wrote on last edited by Thomas Braun
          #24

          @oliverio sagte in Iphone verliert immer das wlan???:

          Funktioniert schon, aber halt kein Handy gerade da unter der IP

          Falsch ausgedrückt von mir. Ich wollte sagen, dass es lediglich deswegen nicht funktioniert, weil ich den Inhalt des Skriptes nicht noch weiter angepasst habe.

          Ich tippe darauf, das er es aus einer Windows-Textdatei eingefügt hat, und die falschen Zeilenumbrüche drin sind.

          Keine Ahnung, da sind aber so einige komische Dinge zu finden. Auch die unbekannte gid da ist merkwürdig. Wo die her kommt? Keinen Schimmer.

          Linux-Werkzeugkasten:
          https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
          NodeJS Fixer Skript:
          https://forum.iobroker.net/topic/68035/iob-node-fix-skript
          iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

          D 1 Reply Last reply
          0
          • Thomas BraunT Thomas Braun

            @oliverio sagte in Iphone verliert immer das wlan???:

            Funktioniert schon, aber halt kein Handy gerade da unter der IP

            Falsch ausgedrückt von mir. Ich wollte sagen, dass es lediglich deswegen nicht funktioniert, weil ich den Inhalt des Skriptes nicht noch weiter angepasst habe.

            Ich tippe darauf, das er es aus einer Windows-Textdatei eingefügt hat, und die falschen Zeilenumbrüche drin sind.

            Keine Ahnung, da sind aber so einige komische Dinge zu finden. Auch die unbekannte gid da ist merkwürdig. Wo die her kommt? Keinen Schimmer.

            D Offline
            D Offline
            denjo
            wrote on last edited by
            #25

            @thomas-braun ich habe sie über filezilla eingefügt und vorher sie von txt in sh Datei gebracht.

            1 Reply Last reply
            0
            • OliverIOO OliverIO

              @thomas-braun sagte in Iphone verliert immer das wlan???:

              @denjo @OliverIO
              Ihr gestattet...

              sudo apt install hping3
              sudo -u iobroker mkdir /opt/iobroker/cmd
              sudo -u iobroker touch /opt/iobroker/cmd/iphone.sh
              sudo -u iobroker nano /opt/iobroker/cmd/iphone.sh
              

              Das skript in nano reinkopieren (geht in meiner shell mit der rechten Maustaste...)

              sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
              

              Et voilà:

              echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
              -rwxr-xr--+ 1 iobroker iobroker 678 Dec  2 00:03 /opt/iobroker/cmd/iphone.sh
              

              Funktioniert nur nicht, weil ich das skript nicht weiter angepasst habe:

              echad@chet:/opt/iobroker/cmd $ ./iphone.sh
              PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
              ^C
              --- 192.168.1.209 ping statistics ---
              1 packets transmitted, 0 received, 100% packet loss, time 0ms
              
              Phone 192.168.1.209 is not present
              

              Man macht für den iobroker keine shell auf (oder gar eine root-shell...)

              Funktioniert schon, aber halt kein Handy gerade da unter der IP :)

              was denkst du wo der fehler herkommt? Im speziellen an der Stelle mit dem ^M

              bash: /opt/iobroker/cmd/iphone.sh: /bin/bash^M: Defekter Interpreter: Datei oder Verzeichnis nicht gefunden
              

              Ich tippe darauf, das er es aus einer Windows-Textdatei eingefügt hat, und die falschen Zeilenumbrüche drin sind.
              Von daher ist das einfügen in Nano der beste Weg

              D Offline
              D Offline
              denjo
              wrote on last edited by
              #26

              @oliverio "sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh" sagtest du nicht 0755???

              OliverIOO 1 Reply Last reply
              0
              • D denjo

                @oliverio "sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh" sagtest du nicht 0755???

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

                @denjo
                ja
                0755
                So ist es bei mir

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

                D 2 Replies Last reply
                0
                • OliverIOO OliverIO

                  @denjo
                  ja
                  0755
                  So ist es bei mir

                  D Offline
                  D Offline
                  denjo
                  wrote on last edited by
                  #28

                  @oliverio okay, weil du in deiner neuen Anleitung dieses geschrieben hattest:

                  "sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh"

                  Werde es gleich nochmal ausprobieren wenn ich Feierabend habe bevor ich ins Bett gehe.

                  Besten Dank erst mal

                  1 Reply Last reply
                  0
                  • OliverIOO OliverIO

                    @denjo
                    ja
                    0755
                    So ist es bei mir

                    D Offline
                    D Offline
                    denjo
                    wrote on last edited by denjo
                    #29

                    @oliverio so ich habe jetzt alles genau so gemacht die datei hat 755 und besitzer und gruppe sind iobroker die datei sieht so aus

                    #!/bin/bash
                     #Enter your ip of your device here
                    DEVICES="192.168.178.82"
                     
                    for i in `echo $DEVICES`; do
                     
                        ping $i -c 1 
                        hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1
                        sleep 1
                        # Only arp specific device, grep for a mac-address
                        status=`arp -an $i | awk '{print $4}' | grep "..:..:..:..:..:.."`
                        #A mac will be 17 characters including the ":"
                        IP=${i//./-}
                        if [ ${#status} -eq 17 ]; then
                            echo "Phone $i is detected!"
                     		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=1
                        else
                            echo "Phone $i is not present"
                     		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=0
                        fi
                    done
                    

                    am script habe ich nur die zahl auf 3 min geändert

                    function wakeIphone() {
                        exec("bash /opt/iobroker/cmd/iphone.sh")
                    }
                     
                    schedule ("*/3 * * * *", function(){
                            wakeIphone();  
                    });
                     
                    

                    wenn ich folgendes eingebe kommt das:

                    pi@raspberrypi:~ $ echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
                    -bash: echad@chet:/opt/iobroker/cmd: Datei oder Verzeichnis nicht gefunden
                    pi@raspberrypi:~ $
                    

                    wobei datei und ordner da sind sehe ich ja über filezilla

                    und im log vom iobroker kommt wieder mal

                    
                    javascript.0
                    2099	2021-12-02 06:33:00.015	info	script.js.Test.iphone_anwesenheit: exec is not available. Please enable "Enable Exec" option in instance settings
                    
                    javascript.0
                    2099	2021-12-02 06:33:00.014	error	exec is not available. Please enable "Enable Exec" option in instance settings
                    

                    jetzt habe ich im java adapter die option exec erlauben aktiviert und es kommt im log keine fehler meldung mehr

                    Thomas BraunT OliverIOO 2 Replies Last reply
                    0
                    • D denjo

                      @oliverio so ich habe jetzt alles genau so gemacht die datei hat 755 und besitzer und gruppe sind iobroker die datei sieht so aus

                      #!/bin/bash
                       #Enter your ip of your device here
                      DEVICES="192.168.178.82"
                       
                      for i in `echo $DEVICES`; do
                       
                          ping $i -c 1 
                          hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1
                          sleep 1
                          # Only arp specific device, grep for a mac-address
                          status=`arp -an $i | awk '{print $4}' | grep "..:..:..:..:..:.."`
                          #A mac will be 17 characters including the ":"
                          IP=${i//./-}
                          if [ ${#status} -eq 17 ]; then
                              echo "Phone $i is detected!"
                       		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=1
                          else
                              echo "Phone $i is not present"
                       		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=0
                          fi
                      done
                      

                      am script habe ich nur die zahl auf 3 min geändert

                      function wakeIphone() {
                          exec("bash /opt/iobroker/cmd/iphone.sh")
                      }
                       
                      schedule ("*/3 * * * *", function(){
                              wakeIphone();  
                      });
                       
                      

                      wenn ich folgendes eingebe kommt das:

                      pi@raspberrypi:~ $ echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
                      -bash: echad@chet:/opt/iobroker/cmd: Datei oder Verzeichnis nicht gefunden
                      pi@raspberrypi:~ $
                      

                      wobei datei und ordner da sind sehe ich ja über filezilla

                      und im log vom iobroker kommt wieder mal

                      
                      javascript.0
                      2099	2021-12-02 06:33:00.015	info	script.js.Test.iphone_anwesenheit: exec is not available. Please enable "Enable Exec" option in instance settings
                      
                      javascript.0
                      2099	2021-12-02 06:33:00.014	error	exec is not available. Please enable "Enable Exec" option in instance settings
                      

                      jetzt habe ich im java adapter die option exec erlauben aktiviert und es kommt im log keine fehler meldung mehr

                      Thomas BraunT Online
                      Thomas BraunT Online
                      Thomas Braun
                      Most Active
                      wrote on last edited by Thomas Braun
                      #30

                      @denjo sagte in Iphone verliert immer das wlan???:

                      wobei datei und ordner da sind sehe ich ja über filezilla

                      Du hast ja auch mein Login prompt als Befehl eingegeben. Das funktioniert natürlich nicht.

                      chmod 0754

                      Hatte ich bewusst so gesetzt. Das Skript muss nicht für User außerhalb des iobrokers ausführbar sein.

                      Linux-Werkzeugkasten:
                      https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
                      NodeJS Fixer Skript:
                      https://forum.iobroker.net/topic/68035/iob-node-fix-skript
                      iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

                      D 1 Reply Last reply
                      0
                      • D denjo

                        @oliverio so ich habe jetzt alles genau so gemacht die datei hat 755 und besitzer und gruppe sind iobroker die datei sieht so aus

                        #!/bin/bash
                         #Enter your ip of your device here
                        DEVICES="192.168.178.82"
                         
                        for i in `echo $DEVICES`; do
                         
                            ping $i -c 1 
                            hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1
                            sleep 1
                            # Only arp specific device, grep for a mac-address
                            status=`arp -an $i | awk '{print $4}' | grep "..:..:..:..:..:.."`
                            #A mac will be 17 characters including the ":"
                            IP=${i//./-}
                            if [ ${#status} -eq 17 ]; then
                                echo "Phone $i is detected!"
                         		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=1
                            else
                                echo "Phone $i is not present"
                         		curl http://192.168.178.98:8081/set/0_userdata.0.Anwesenheit.$IP?value=0
                            fi
                        done
                        

                        am script habe ich nur die zahl auf 3 min geändert

                        function wakeIphone() {
                            exec("bash /opt/iobroker/cmd/iphone.sh")
                        }
                         
                        schedule ("*/3 * * * *", function(){
                                wakeIphone();  
                        });
                         
                        

                        wenn ich folgendes eingebe kommt das:

                        pi@raspberrypi:~ $ echad@chet:/opt/iobroker/cmd $ ls -la /opt/iobroker/cmd/iphone.sh
                        -bash: echad@chet:/opt/iobroker/cmd: Datei oder Verzeichnis nicht gefunden
                        pi@raspberrypi:~ $
                        

                        wobei datei und ordner da sind sehe ich ja über filezilla

                        und im log vom iobroker kommt wieder mal

                        
                        javascript.0
                        2099	2021-12-02 06:33:00.015	info	script.js.Test.iphone_anwesenheit: exec is not available. Please enable "Enable Exec" option in instance settings
                        
                        javascript.0
                        2099	2021-12-02 06:33:00.014	error	exec is not available. Please enable "Enable Exec" option in instance settings
                        

                        jetzt habe ich im java adapter die option exec erlauben aktiviert und es kommt im log keine fehler meldung mehr

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

                        @denjo
                        Du hast bei den curl Befehlen den falschen Port eingetragen. Simple api horcht bei mir auf 8087

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

                        OliverIOO 1 Reply Last reply
                        0
                        • Thomas BraunT Thomas Braun

                          @denjo sagte in Iphone verliert immer das wlan???:

                          wobei datei und ordner da sind sehe ich ja über filezilla

                          Du hast ja auch mein Login prompt als Befehl eingegeben. Das funktioniert natürlich nicht.

                          chmod 0754

                          Hatte ich bewusst so gesetzt. Das Skript muss nicht für User außerhalb des iobrokers ausführbar sein.

                          D Offline
                          D Offline
                          denjo
                          wrote on last edited by
                          #32

                          @thomas-braun

                          sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
                          

                          habe das jetzt nochmal ausgeführt nun sind die rechte auf 754
                          und den port habe ich auf 5663 wie im adapter steht geämdert.

                          was soll ich jetzt genau eingeben zum testen?

                          Thomas BraunT 1 Reply Last reply
                          0
                          • D denjo

                            @thomas-braun

                            sudo -u iobroker chmod 0754 /opt/iobroker/cmd/iphone.sh
                            

                            habe das jetzt nochmal ausgeführt nun sind die rechte auf 754
                            und den port habe ich auf 5663 wie im adapter steht geämdert.

                            was soll ich jetzt genau eingeben zum testen?

                            Thomas BraunT Online
                            Thomas BraunT Online
                            Thomas Braun
                            Most Active
                            wrote on last edited by
                            #33

                            @denjo sagte in Iphone verliert immer das wlan???:

                            /opt/iobroker/cmd/iphone.sh

                            Du kannst jetzt z. B. in das Verzeichnis wechseln und das skript auf der Konsole ausführen:

                            cd /opt/iobroker/cmd/iphone.sh
                            ./iphone.sh
                            

                            Dann siehst du schon mal ob es drundsätzlich läuft.
                            Das dann ggf. in den ioBroker einweben ist der nächste Step.
                            Kann dir @OliverIO bestimmt noch helfen.

                            Linux-Werkzeugkasten:
                            https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten
                            NodeJS Fixer Skript:
                            https://forum.iobroker.net/topic/68035/iob-node-fix-skript
                            iob_diag: curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh

                            D 1 Reply Last reply
                            0
                            • Thomas BraunT Thomas Braun

                              @denjo sagte in Iphone verliert immer das wlan???:

                              /opt/iobroker/cmd/iphone.sh

                              Du kannst jetzt z. B. in das Verzeichnis wechseln und das skript auf der Konsole ausführen:

                              cd /opt/iobroker/cmd/iphone.sh
                              ./iphone.sh
                              

                              Dann siehst du schon mal ob es drundsätzlich läuft.
                              Das dann ggf. in den ioBroker einweben ist der nächste Step.
                              Kann dir @OliverIO bestimmt noch helfen.

                              D Offline
                              D Offline
                              denjo
                              wrote on last edited by
                              #34

                              @thomas-braun
                              habe jetzt die meldung

                              pi@raspberrypi:/opt/iobroker/cmd $ ./iphone.sh
                              PING 192.168.178.82 (192.168.178.82) 56(84) bytes of data.
                              From 192.168.178.98 icmp_seq=1 Destination Host Unreachable
                              
                              --- 192.168.178.82 ping statistics ---
                              1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
                              
                              Phone 192.168.178.82 is not present
                              curl: (52) Empty reply from server
                              pi@raspberrypi:/opt/iobroker/cmd $
                              
                              

                              das iphone ist gerade nicht da

                              1 Reply Last reply
                              0
                              • OliverIOO OliverIO

                                @denjo
                                Du hast bei den curl Befehlen den falschen Port eingetragen. Simple api horcht bei mir auf 8087

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

                                @denjo sagte in Iphone verliert immer das wlan???:

                                curl: (52) Empty reply from server

                                hast du den simple api adapter installiert?
                                hast du die portnummer angepasst?
                                hast du datenpunkte angelegt, wo der status eingetragen werden soll?
                                hast du die ggfs datenpunktbezeichnungen in den zeilen mit curl angepasst?

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

                                D 1 Reply Last reply
                                0
                                • OliverIOO OliverIO

                                  @denjo sagte in Iphone verliert immer das wlan???:

                                  curl: (52) Empty reply from server

                                  hast du den simple api adapter installiert?
                                  hast du die portnummer angepasst?
                                  hast du datenpunkte angelegt, wo der status eingetragen werden soll?
                                  hast du die ggfs datenpunktbezeichnungen in den zeilen mit curl angepasst?

                                  D Offline
                                  D Offline
                                  denjo
                                  wrote on last edited by
                                  #36

                                  @oliverio ja alles gemacht

                                  OliverIOO 1 Reply Last reply
                                  0
                                  • D denjo

                                    @oliverio ja alles gemacht

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

                                    @denjo

                                    dann dein angepasstes script hier nochmal posten

                                    deine Ausgabe sollte ungefähr so aussehen. Hier mit 2 IP-Adressen.
                                    eine erreichbar, eine nicht erreichbar

                                    PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
                                    From 192.168.1.85 icmp_seq=1 Destination Host Unreachable
                                    
                                    --- 192.168.1.209 ping statistics ---
                                    1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
                                    
                                    Phone 192.168.1.209 is not present
                                    {"id":"0_userdata.0.Anwesenheit.192-168-1-209","value":0,"val":0}PING 192.168.1.225 (192.168.1.225) 56(84) bytes of data.
                                    
                                    --- 192.168.1.225 ping statistics ---
                                    1 packets transmitted, 0 received, 100% packet loss, time 0ms
                                    
                                    Phone 192.168.1.225 is detected!
                                    

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

                                    D 1 Reply Last reply
                                    0
                                    • OliverIOO OliverIO

                                      @denjo

                                      dann dein angepasstes script hier nochmal posten

                                      deine Ausgabe sollte ungefähr so aussehen. Hier mit 2 IP-Adressen.
                                      eine erreichbar, eine nicht erreichbar

                                      PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
                                      From 192.168.1.85 icmp_seq=1 Destination Host Unreachable
                                      
                                      --- 192.168.1.209 ping statistics ---
                                      1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
                                      
                                      Phone 192.168.1.209 is not present
                                      {"id":"0_userdata.0.Anwesenheit.192-168-1-209","value":0,"val":0}PING 192.168.1.225 (192.168.1.225) 56(84) bytes of data.
                                      
                                      --- 192.168.1.225 ping statistics ---
                                      1 packets transmitted, 0 received, 100% packet loss, time 0ms
                                      
                                      Phone 192.168.1.225 is detected!
                                      
                                      D Offline
                                      D Offline
                                      denjo
                                      wrote on last edited by
                                      #38

                                      @OliverIO

                                      function wakeIphone() {
                                          exec("bash /opt/iobroker/cmd/iphone.sh")
                                      }
                                       
                                      schedule ("*/3 * * * *", function(){
                                              wakeIphone();  
                                      });
                                       
                                      
                                      OliverIOO 1 Reply Last reply
                                      0
                                      • D denjo

                                        @OliverIO

                                        function wakeIphone() {
                                            exec("bash /opt/iobroker/cmd/iphone.sh")
                                        }
                                         
                                        schedule ("*/3 * * * *", function(){
                                                wakeIphone();  
                                        });
                                         
                                        
                                        OliverIOO Offline
                                        OliverIOO Offline
                                        OliverIO
                                        wrote on last edited by
                                        #39

                                        @denjo

                                        ok und jetzt nochmal iphone.sh
                                        nur da musstest du ja etwas anpassen

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

                                        D 1 Reply Last reply
                                        0
                                        • OliverIOO OliverIO

                                          @denjo

                                          ok und jetzt nochmal iphone.sh
                                          nur da musstest du ja etwas anpassen

                                          D Offline
                                          D Offline
                                          denjo
                                          wrote on last edited by denjo
                                          #40

                                          @oliverio

                                          #!/bin/bash
                                           #Enter your ip of your device here
                                          DEVICES="192.168.178.82"
                                           
                                          for i in `echo $DEVICES`; do
                                           
                                              ping $i -c 1 
                                              hping3 -2 -c 10 -p 5353 -i u1 $i -q >/dev/null 2>&1
                                              sleep 1
                                              # Only arp specific device, grep for a mac-address
                                              status=`arp -an $i | awk '{print $4}' | grep "..:..:..:..:..:.."`
                                              #A mac will be 17 characters including the ":"
                                              IP=${i//./-}
                                              if [ ${#status} -eq 17 ]; then
                                                  echo "Phone $i is detected!"
                                           		curl http://192.168.178.98:5663/set/0_userdata.0.Anwesenheit.$IP?value=1
                                              else
                                                  echo "Phone $i is not present"
                                           		curl http://192.168.178.98:5663/set/0_userdata.0.Anwesenheit.$IP?value=0
                                              fi
                                          done
                                          
                                          

                                          das ist der erstellte datenpunkt

                                          "_id": "0_userdata.0.Anwesenheit",
                                          
                                          pi@raspberrypi:/opt/iobroker/cmd $ pi@raspberrypi:/opt/iobroker/cmd $ ./iphone.sh
                                          
                                          --- 192.168.178.82 ping statistics ---
                                          1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
                                          -bash: pi@raspberrypi:/opt/iobroker/cmd: Datei oder Verzeichnis nicht gefunden
                                          
                                          Phone 192.168.178.82 is not present
                                          curl: (52) Empty reply from server
                                          
                                          
                                          OliverIOO 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
                                          FAQ Cloud / IOT
                                          HowTo: Node.js-Update
                                          HowTo: Backup/Restore
                                          Downloads
                                          BLOG

                                          887

                                          Online

                                          32.4k

                                          Users

                                          81.5k

                                          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