Timeout for PRESENCE_DoLocalPingScan

Begonnen von aunruh, 27 Oktober 2013, 17:27:20

Vorheriges Thema - Nächstes Thema

aunruh

Hallo zusammen.

Ich bin neu hier und beschäftige mich auch erst seit ein paar Tagen mit FHEM.

Einiges habe ich bereits probiert und am Laufen, derzeit scheitere ich grad an der Einbindung/Konfiguration von presence.

Auszug aus der fhem.cfg
Zitatdefine Note2_Andre PRESENCE lan-ping 172.24.147.34
attr Note2_Andre devStateIcon absent:WLAN_Status.0 present:WLAN_Status.1
attr Note2_Andre fp_Erdgeschoss 500,200
attr Note2_Andre room Büro

define HTC_Andre PRESENCE lan-ping 172.24.147.35 60
attr HTC_Andre devStateIcon absent:WLAN_Status.0 present:WLAN_Status.1
attr HTC_Andre fp_Erdgeschoss 540,200
attr HTC_Andre room Büro

Auszug aus dem Log:
Zitat2013.10.27 17:18:47 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10765
2013.10.27 17:18:47 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10767
2013.10.27 17:18:47 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10769
2013.10.27 17:18:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10843
2013.10.27 17:18:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10845
2013.10.27 17:18:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 10847

Auf dem Floorplan steht bei beiden Geräten lediglich active dort wo eigentlich das Icon WLAN_Status.1 bzw. WLAN_Status.0 erscheinen sollte.

Ein {qx(ping -c 1 172.24.147.34)} bringt:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=1 ttl=64 time=456 ms

--- 172.24.147.34 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 456.299/456.299/456.299/0.000 ms


Ein {qx(ping -c 1 172.24.147.60)} bringt:
PING 172.24.147.60 (172.24.147.60) 56(84) bytes of data.

--- 172.24.147.60 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Das ist soweit auch korrekt. Die Frage die sich mir stellt: Warum funktioniert das auf der Web Oberfläche nicht?

Kann ich eigentlich auch irgendwo festlegen das der default-Wert nicht active sondern inactive ist? Sprich im Falle eines Fehlers sollte das Gerät auf absent stehen.

Bin für jeden Tip dankbar  :)

Viele Grüße // André

Markus Bloch

Hallo Aunruh,

welche Version genau hast du denn im Einsatz von FHEM?

Setze mal bitte bei deinen PRESENCE Defintionen in der Oberfläche das Attribut "verbose" auf "5" oder "loglevel" auf "1", jenachdem welches Attribut es bei dir gibt.

Damit wird das ganze etwas gesprächiger im Logfile.

Bitte poste dann mal, was da rauskommt.

Vielen Dank

Gruß
Markus
Developer für Module: YAMAHA_AVR, YAMAHA_BD, FB_CALLMONITOR, FB_CALLLIST, PRESENCE, Pushsafer, LGTV_IP12, version

aktives Mitglied des FHEM e.V. (Technik)

aunruh

Hallo Markus.

Ich habe die aktuelle 5.5 im Einsatz.

....

Zitat2013.10.27 18:47:53 1: Including fhem.cfg
2013.10.27 18:47:53 3: telnetPort: port 7072 opened
2013.10.27 18:47:53 3: WEB: port 8083 opened
2013.10.27 18:47:53 3: WEBphone: port 8084 opened
2013.10.27 18:47:53 3: WEBtablet: port 8085 opened
2013.10.27 18:47:53 2: HMLAN_Parse: HMLAN1 new condition disconnected
2013.10.27 18:47:53 3: Opening HMLAN1 device 172.24.146.50:1000
2013.10.27 18:47:53 3: HMLAN1 device opened
2013.10.27 18:47:53 2: HMLAN_Parse: HMLAN1 new condition init
2013.10.27 18:47:53 3: ECMD opening NETIO_01 (protocol telnet, device 172.24.146.150:2701)
2013.10.27 18:47:53 3: ECMD device opened
2013.10.27 18:47:53 1: Including ./log/fhem.save
2013.10.27 18:47:55 5: PRESENCE_DoLocalPingScan: Note2_Andre|172.24.147.34|0|4
2013.10.27 18:47:55 5: PRESENCE_DoLocalPingScan: HTC_Andre|172.24.147.35|0|4
2013.10.27 18:47:59 5: PRESENCE (Note2_Andre) - ping command returned with output:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=2 ttl=64 time=382 ms
64 bytes from 172.24.147.34: icmp_req=3 ttl=64 time=97.9 ms
64 bytes from 172.24.147.34: icmp_req=4 ttl=64 time=736 ms

--- 172.24.147.34 ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3007ms
rtt min/avg/max/mdev = 97.959/405.482/736.161/261.059 ms
2013.10.27 18:48:08 5: PRESENCE (HTC_Andre) - ping command returned with output:
PING 172.24.147.35 (172.24.147.35) 56(84) bytes of data.

--- 172.24.147.35 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3003ms

2013.10.27 18:48:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 30943
2013.10.27 18:48:55 2: PRESENCE: Note2_Andre could not be checked (retrying in 10 seconds)
2013.10.27 18:48:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 30944
2013.10.27 18:48:55 2: PRESENCE: HTC_Andre could not be checked (retrying in 10 seconds)
2013.10.27 18:48:55 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 30947
2013.10.27 18:48:55 2: PRESENCE: Note2_Niklas could not be checked (retrying in 10 seconds)
2013.10.27 18:49:05 5: PRESENCE_DoLocalPingScan: Note2_Andre|172.24.147.34|0|4
2013.10.27 18:49:05 5: PRESENCE_DoLocalPingScan: HTC_Andre|172.24.147.35|0|4
2013.10.27 18:49:08 5: PRESENCE (Note2_Andre) - ping command returned with output:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=1 ttl=64 time=545 ms
64 bytes from 172.24.147.34: icmp_req=2 ttl=64 time=940 ms
64 bytes from 172.24.147.34: icmp_req=3 ttl=64 time=46.4 ms
64 bytes from 172.24.147.34: icmp_req=4 ttl=64 time=65.2 ms

--- 172.24.147.34 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 46.413/399.493/940.714/371.015 ms
2013.10.27 18:49:18 5: PRESENCE (HTC_Andre) - ping command returned with output:
PING 172.24.147.35 (172.24.147.35) 56(84) bytes of data.

--- 172.24.147.35 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3005ms


....hilf das irgendwie weiter?

Grüße // André

aunruh

Moin zusammen.

Da ich mit meinem Problem irgendwie nicht so recht weiter komme frage ich mich ob ich hiermit:

http://www.fhemwiki.de/wiki/PRESENCE#Beispiel_DHCP_.C3.BCberwachung_auf_Airport_Basestation

weiter kommen? Ich habe zwar kein Apfel aber eine meiner !Fritz-Boxen spielt den DHCP. Kann ich die Fritz-Box mit der Abfrage:
Zitatdefine Andre_Note2 PRESENCE function {snmpCheck("172.24.147.1","0x88329BD5FE20")} 30 30
auswerten?

Wenn das funktionieren sollte, dann soll mir das auch recht sein ::) Muß das wohl heute abend mal probieren, es sei denn irgendjemand sagt wir das ist eh zum Scheitern verurteilt auf meiner Hardwarebasis.

Danke.

Grüße // André



aunruh

...verdammt, irgendwas ist hier faul - nur was?

Ich habe mal wie oben beschrieben eine Abfrage auf snmpCheck umgestellt - falls die Fritz! das überhaupt unterstützt - am Ergebnis hat sich leider nicht geändert.

Zitat
2013.10.28 17:47:53 0: Server started with 21 defined entities (version $Id: fhem.pl 3872 2013-09-07 11:58:33Z rudolfkoenig $, os linux, user fhem, pid 1924)
2013.10.28 17:47:53 5: PRESENCE_DoLocalPingScan: Note2_Andre|172.24.147.34|0|4
2013.10.28 17:47:53 5: PRESENCE_DoLocalFunctionScan: HTC_Andre|{snmpCheck("172.24.147.1","0xBCCFCC05BD29")}|0
2013.10.28 17:49:37 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 2185
2013.10.28 17:49:37 2: PRESENCE: Note2_Andre could not be checked (retrying in 10 seconds)
2013.10.28 17:49:37 1: Timeout for PRESENCE_DoLocalFunctionScan reached, terminated process 2186
2013.10.28 17:49:37 2: PRESENCE: HTC_Andre could not be checked (retrying in 10 seconds)
2013.10.28 17:49:47 5: PRESENCE_DoLocalPingScan: Note2_Andre|172.24.147.34|0|4
2013.10.28 17:49:47 5: PRESENCE_DoLocalFunctionScan: HTC_Andre|{snmpCheck("172.24.147.1","0xBCCFCC05BD29")}|0
2013.10.28 17:49:50 5: PRESENCE (Note2_Andre) - ping command returned with output:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=1 ttl=64 time=460 ms
64 bytes from 172.24.147.34: icmp_req=2 ttl=64 time=9.45 ms
64 bytes from 172.24.147.34: icmp_req=3 ttl=64 time=13.0 ms
64 bytes from 172.24.147.34: icmp_req=4 ttl=64 time=11.8 ms

--- 172.24.147.34 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 9.458/123.674/460.350/194.384 ms

Hat irgendjemand noch eine Idee? Ich bin nun doch ein wenig am Ende.

Grüße // André

aunruh

...ups, wenn ich das richtig sehe/verstehe dann kann die Fritz7270 das von Haus aus gar nicht. Müsste also die Box freetzen - ich glaube da habe ich grad kein Bock drauf ...

NaJa, ich bastel noch ein wenig - funktioniert bei anderen ja auch mit lan-ping.

Grüße // André

aunruh

Hallo.

Ich muß nochmal wegen dem Thema nerven. Ich habe bei Null angefangen und bekommen nun:

Zitat
2013.10.25 16:03:06 0: Server started with 16 defined entities (version $Id: fhem.pl 4099 2013-10-22 20:55:35Z rudolfkoenig $, os linux, user fhem, pid 1923)
2013.10.25 16:03:08 5: PRESENCE_DoLocalPingScan: Andre|172.24.147.34|0|6
2013.10.25 16:03:08 5: PRESENCE_DoLocalPingScan: HTC|172.24.147.35|0|6
2013.10.25 16:03:13 5: PRESENCE (Andre) - ping command returned with output:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=1 ttl=64 time=98.9 ms
64 bytes from 172.24.147.34: icmp_req=2 ttl=64 time=12.1 ms
64 bytes from 172.24.147.34: icmp_req=3 ttl=64 time=10.6 ms
64 bytes from 172.24.147.34: icmp_req=4 ttl=64 time=9.08 ms
64 bytes from 172.24.147.34: icmp_req=5 ttl=64 time=11.8 ms
64 bytes from 172.24.147.34: icmp_req=6 ttl=64 time=12.0 ms

--- 172.24.147.34 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 9.087/25.798/98.982/32.746 ms
2013.10.25 16:03:14 5: PRESENCE (HTC) - ping command returned with output:
PING 172.24.147.35 (172.24.147.35) 56(84) bytes of data.
64 bytes from 172.24.147.35: icmp_req=1 ttl=64 time=385 ms
64 bytes from 172.24.147.35: icmp_req=2 ttl=64 time=104 ms
64 bytes from 172.24.147.35: icmp_req=3 ttl=64 time=23.6 ms
64 bytes from 172.24.147.35: icmp_req=4 ttl=64 time=880 ms
64 bytes from 172.24.147.35: icmp_req=5 ttl=64 time=396 ms
64 bytes from 172.24.147.35: icmp_req=6 ttl=64 time=305 ms

--- 172.24.147.35 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5001ms
rtt min/avg/max/mdev = 23.675/349.420/880.263/274.893 ms
2013.10.25 16:04:18 5: PRESENCE_DoLocalPingScan: Andre|172.24.147.34|0|6
2013.10.25 16:04:18 5: PRESENCE_DoLocalPingScan: HTC|172.24.147.35|0|6
2013.10.25 16:04:23 5: PRESENCE (Andre) - ping command returned with output:
PING 172.24.147.34 (172.24.147.34) 56(84) bytes of data.
64 bytes from 172.24.147.34: icmp_req=1 ttl=64 time=457 ms
64 bytes from 172.24.147.34: icmp_req=2 ttl=64 time=11.2 ms
64 bytes from 172.24.147.34: icmp_req=3 ttl=64 time=10.1 ms
64 bytes from 172.24.147.34: icmp_req=4 ttl=64 time=8.68 ms
64 bytes from 172.24.147.34: icmp_req=5 ttl=64 time=11.6 ms
64 bytes from 172.24.147.34: icmp_req=6 ttl=64 time=9.86 ms

--- 172.24.147.34 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 8.681/84.808/457.226/166.553 ms
2013.10.25 16:04:33 5: PRESENCE (HTC) - ping command returned with output:
PING 172.24.147.35 (172.24.147.35) 56(84) bytes of data.

--- 172.24.147.35 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5008ms

...das ist ja schon mal nicht schlecht.

In der .cfg habe ich:

Zitat

# Anwesenheitserkennung Mobiletelefone
define Andre PRESENCE lan-ping 172.24.147.34 60
attr Andre comment Note2 Andre
attr Andre devStateIcon present:WLAN_Status.1 absent:WLAN_Status.0
attr Andre fp_3_Erdgeschoss 500,200
attr Andre ping_count 6
attr Andre verbose 5

define HTC PRESENCE lan-ping 172.24.147.35 60
attr HTC devStateIcon present:WLAN_Status.1 absent:WLAN_Status.0
attr HTC fp_3_Erdgeschoss 560,200
attr HTC ping_count 6
attr HTC verbose 5


Wenn ich unter dem Reiter Everything schaue, dann sehe ich:

PRESENCE
Andre defined
HTC   active

Wähle ich nun die Geräte jeweils aus sehe ich unter Internals das bei dem einen bei STATE defined steht und bei dem anderen active.
Diesen Zustand sehe ich auch statt der Icons.

Was habe ich falsch gemacht? In der .cfg sind doch beide gleich definiert. Wie kann ich das ändern bzw. was muß ich ändern.

Vielen Dank an alle :-)

Grüße // André


Markus Bloch

Hallo Andre,

auf Basis deiner Logs sieht es so aus, als gäbe es Probleme bei der Übermittlung der Ergebnisse aus den Ping-Checks an FHEM. Dazu wird eine lokale Telnetverbindung zu FHEM geschaltet, über die das Ergebniss gesendet wird.

Offenbar scheint es dabei ein Problem zu geben, was aber nicht ein PRESENCE Problem ist, sondern genereller Natur ist. Daher würde ich dich bitten einmal die Konfiguration deiner Telnet-Instanz(en) zu posten und einmal das globale "verbose"-Attribut auf 5 setzen, einmal neu starten und dann wieder das Log Posten.

Bitte umbedingt anschließend den global verbose wieder zurückschrauben, damit dir (je nach größe deines Systems) nicht der Speicherplatz ausgeht.

Vielen Dank

Gruß
Markus
Developer für Module: YAMAHA_AVR, YAMAHA_BD, FB_CALLMONITOR, FB_CALLLIST, PRESENCE, Pushsafer, LGTV_IP12, version

aktives Mitglied des FHEM e.V. (Technik)

aunruh

#8
Hallo.

Sorry weil ich lange nicht geantwortet habe, die Zeit war einfach nicht da in den letzten Tagen.

Ich habe gestern abend/nacht noch mal ein wenig gebastelt. Ich habe den FHEM komplett neu aufgesetzt und siehe da alles funktionierte - auch die Handy-Erkennung.

Dann habe ich den FHEM von DHCP auf Static-IP umgestellt und es ging plötzlich nicht mehr. Die Handys - drei Stück an der Zahl - wurden ständig als Online angezeigt obwohl die IPs definitiv nicht pingbar waren.
Meine interfaces sah so aus:
Zitat
## Ethernet Schnittstelle 0
auto eth0 
# Beim Bootvorgang automatisch starten
iface eth0 inet static
    address 172.24.147.100   
    netmask 255.255.252.0 
    gateway 172.24.147.1

Ich habe (noch) relativ wenig Ahnung von Linux im allgemeinen, aber mir erscheint sicher das hier der Fehler zu suchen ist. Wenn ich auf DHCP umstelle ist alles wieder schön. Gut, ich könnte auch damit leben da ich per Fritz-Box ja sicherstellen kann das der FHEM immer dieselbe IP zugewiesen bekommt. Evtl. hat aber doch jemand einen Tip auf Lager.

Drei Fragen sind derzeit noch offen welche nicht im direkten Zusammenhang mit PRESENCE stehen.

Ich lasse mir den Status der Handys unter anderem so anzeigen:
Zitatattr Andre fp_03_Erdgeschoss 400, 850
Wie erreiche ich das sich rechts neben dem Icon eine Beschriftung befindet?

Wie kann ich erreichen - falls überhaupt möglich - das der Handy Status Zeitabhängig geändert wird? Sprich: Das Handy sollte Online angezeigt werden nach dem ersten erfolgreichen Ping aber erst Offline gehen wenn es 5 Minuten nicht pingbar war.

Des weiteren - gehört eigentlich nicht hier rein - habe ich auf meinem Floorplan ganz oben links in der Ecke ein "Initialized" stehen. Wie finde ich herraus wo das herkommt? Ich habe zur Zeit drei Floorplans und es erscheint nur auf einem.

Ich bin ab morgen für zwei Wochen auf Dienstreise und werde daher in dieser Zeit nichts testen können. Ich schaue dennoch ab und zu mal rein  ;)

Vielen herzlichen Dank an alle  :D

Grüße // André


DerTom

Hallo,

ich muss diesen Fred nochmal nach oben holen.
Ich bin von einer Fritte auf einen Cubietruck umgezogen und stehe nun vor einem PRESENCE-Problem. Habe umgerüstet auf lan-ping.

define Handy_Thomas PRESENCE lan-ping 192.168.200.13

Bekomme aber ständig folgende Meldungen im Logfile mit verbose 5

2014.09.30 22:08:24.579 5: PRESENCE (Handy_Thomas) - stopping timer
2014.09.30 22:08:24.580 5: PRESENCE (Handy_Thomas) - starting blocking call for mode lan-ping
2014.09.30 22:08:24.640 5: PRESENCE (Handy_Thomas) - starting ping scan: Handy_Thomas|192.168.200.13|0|4
2014.09.30 22:08:27.802 5: PRESENCE (Handy_Thomas) - ping command returned with output:
PING 192.168.200.13 (192.168.200.13) 56(84) bytes of data.
64 bytes from 192.168.200.13: icmp_req=1 ttl=255 time=44.8 ms
64 bytes from 192.168.200.13: icmp_req=2 ttl=255 time=69.4 ms
64 bytes from 192.168.200.13: icmp_req=3 ttl=255 time=90.7 ms
64 bytes from 192.168.200.13: icmp_req=4 ttl=255 time=113 ms

--- 192.168.200.13 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 44.887/79.565/113.240/25.318 ms
2014.09.30 22:09:24.637 1: Timeout for PRESENCE_DoLocalPingScan reached, terminated process 3256


Geschrieben wurde mal folgendes:

Zitatsieht es so aus, als gäbe es Probleme bei der Übermittlung der Ergebnisse aus den Ping-Checks an FHEM. Dazu wird eine lokale Telnetverbindung zu FHEM geschaltet, über die das Ergebniss gesendet wird.

Offenbar scheint es dabei ein Problem zu geben, was aber nicht ein PRESENCE Problem ist, sondern genereller Natur ist. Daher würde ich dich bitten einmal die Konfiguration deiner Telnet-Instanz(en) zu posten und einmal das globale "verbose"-Attribut auf 5 setzen, einmal neu starten und dann wieder das Log Posten.

Wenn ich das globale Attribut verbose auf 5 setze, zeigen sich leider keine weiteren Informationen, die ein Problem aufzeigen.

Hat da noch einer eine Idee wo ich schauen kann, warum die Anwesenheit des Gerätes nicht zu FHEM übermittelt wird?

Beste Grüße
Thomas