FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: edition am 19 April 2020, 07:13:25

Titel: Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 07:13:25
Guten Tag

Da ich mich manchmal immer noch wie ein Anfänger fühle, habe ich das Thema einmal in diesen Teil des Forums gestellt

Ich nutze im Obergeschoss einen LG Hombot Saugroboter, der auch und FHEM eingebunden ist. Ich kann ihn über den Google Kalender starten (3 Schicht Betrieb) und wenn er fertig ist, sendet FHEM eine email.

Immer wieder geht er aber offline und ich bekomme ihn nicht zurück, ohne FHEM über die Konsole mit "sudo systemctl stop fhem / sudo systemctl start fhem" neu zu starten. Ein "shutdown restart" reicht nicht!
Im Logfile steht dann:
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884830) line 1, near ")hombotState"
2020.04.08 11:04:01 1: PERL WARNING: (Missing operator before hombotState?)
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884831) line 1, near ")hombotState"
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884832) line 1, near ")hombotState"
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884833) line 1, near ")hombotState"
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884834) line 1, near ")hombotState"
2020.04.08 11:04:01 1: PERL WARNING: Bareword found where operator expected at (eval 884835) line 1, near ")hombotState"
2020.04.08 11:10:01 1: PERL WARNING: Bareword found where operator expected at (eval 886144) line 1, near ")hombotState"
2020.04.08 11:10:01 1: PERL WARNING: Bareword found where operator expected at (eval 886145) line 1, near ")hombotState"
2020.04.08 11:10:01 1: PERL WARNING: Bareword found where operator expected at (eval 886146) line 1, near ")hombotState"
2020.04.08 11:10:01 1: PERL WARNING: Bareword found where operator expected at (eval 886147) line 1, near ")hombotState"
ssh: connect to host 192.168.0.27 port 22: Network is unreachable
2020.04.08 11:10:01 1: PERL WARNING: Bareword found where operator expected at (eval 886151) line 1, near ")hombotState"

Ich habe jetzt festgestellt, dass meine Fritzbox den Raspberry (auf dem FHEM läuft) mittels AP-Stearing z.b. vom Repeater zur Fritzbox ummeldet. In dem Moment ist FHEM ja kurz offline und der Luigi HTTP Server nicht erreichbar. Wenn in diesem Moment der Status abgefragt wird und nichts zurückkommt, geht er offline und bleibt es auch, bis ich eingreife.
Kann ich irgendetwas einbauen, was den Status abfragt und bei "offline" das Hombot Modul neustartet, oder so ähnlich? Oder muss gar das Hombot Modul geändert werden um bei "offline" nach einer gewissen Zeit nochmals eine Statusabfrage einzuleiten?

Gruß
edition
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 07:22:16
Die Meldung im Log sieht eher nach einem Notify Problem aus.
Aktiviere mal stacktrace im global Device dann sieht man mehr.

Mit der Aussage geht offline meinst Du sicherlich die Anzeige vom Modul.
Es bedarf soweit ich mich entsinne eigentlich wenigstens 3 Versuche bevor er dann tatsächlich off geht im Modul.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 07:38:00
Oh, da habe ich wohl zu viel aus dem Log reinkopiert. Die Perl Warnung ist schon behoben. Das Notify ist gelöscht. Ich meine viel mehr die ssh: connect Meldung.
Beim letzten mal (16.04.) steht nur noch die ssh: connect Meldung.

Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 07:43:29
Das ist sehr seltsam. Bei mir kann der Hombot tagelang aus sein und wenn ich ihn neu starte dann findet das Modul ihn.

Es könnte zur Fehlersuche helfen mal verbose auf 5 zu stellen im Device.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 07:44:41
Das Ummelden und wieder anmelden passiert in der selben Sekunde.

16.04.20 02:45:49 WLAN-Gerät angemeldet (5 GHz), 150 Mbit/s, FHEM, IP 192.168.0.19, MAC XX:XX:XX:XX:XX:XX.
16.04.20 02:45:49 WLAN-Gerät wurde umgemeldet (AP-Steering): Automatischer Wechsel des WLAN-Gerätes FHEM, IP 192.168.0.19, MAC XX:XX:XX:XX:XX:XX zur verbesserten Datenübertragung (von Fritz-Repeater zu fritz.box, Grund: Verbindung zu schlecht).

Wäre ja ein Unding, das genau in dem Moment eine Statusabfrage erfolgt!
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 07:47:04
Und der Raspi selbst scheint ja den Hombot erreichen zu können wenn nach einem FHEM Neustart das Modul wieder läuft. Den Raspi muss man nicht neu starten?
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:03:37
Raspi neustarten geht auch. Dann ist er auch wieder online.

Habe den Hombot gerade mal von der Ladestation genommen und ausgeschaltet. Verbose vom Hombot habe ich auf 5 gestellt.
Um 7:50 Uhr hat die Fritzbox vermerkt, das sich das Gerät abgemeldet hat.
Im FHEM Log erscheint:
2020.04.19 07:53:16 4: HOMBOT (Hombot) - NonblockingGet get URL
2020.04.19 07:53:16 4: HOMBOT (Hombot) - HOMBOT_Retrieve status.txt Information: calling Host: 192.168.0.27
2020.04.19 07:53:16 4: HOMBOT (Hombot) - NonblockingGet get URL
2020.04.19 07:53:16 4: HOMBOT (Hombot) - HOMBOT_Retrieve Schedule Information: calling Host: 192.168.0.27
2020.04.19 07:53:16 4: HOMBOT (Hombot) - NonblockingGet get URL
2020.04.19 07:53:16 4: HOMBOT (Hombot) - HOMBOT_Retrieve statistic.html Information: calling Host: 192.168.0.27
2020.04.19 07:53:16 4: HOMBOT (Hombot) - Call HOMBOT_Get_stateRequest
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Response Infomations: processed response data
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Parse_HomebotInfomations: error while request: connect to http://192.168.0.27:6260 timed out
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Response Infomations: processed response data
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Parse_HomebotInfomations: error while request: connect to http://192.168.0.27:6260 timed out
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Response Infomations: processed response data
2020.04.19 07:53:26 3: HOMBOT (Hombot) - Connecting Problem, will check Luigi HTTP Server
2020.04.19 07:53:26 4: HOMBOT (Hombot) - HOMBOT_Parse_HomebotInfomations: error while request: connect to http://192.168.0.27:6260 timed out
2020.04.19 07:53:26 3: HOMBOT (Hombot) - Start SSH Connection for check Hombot alive
ssh: connect to host 192.168.0.27 port 22: No route to host
2020.04.19 07:53:29 3: HOMBOT (Hombot) - Hombot is not online

Um 7:59 habe ich ihn wieder auf die Station gestellt und eingeschaltet. In der Fritzbox ist er wieder online. in FHEM bleibt er offline! Keine neuen Einträge im FHEM Log! Das Kontrollcenter ist erreichbar!
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 08:11:21
Da fehlen aber die Logausgaben von 7:59. Da sollte noch mehr kommen.

Gib mal bitte ein list vom Device
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:18:39
Du meinst die internals?

DEF 192.168.0.27
FUUID              5e7f0095-f33f-62ad-598c-0c2b7ecbcbc17b27
HOST               192.168.0.27
INTERVAL         750
NAME               Hombot
NR                   550
PORT               6260
PREVIOUSHOMBOTSTATE ONLINE
STATE              Homebot offline
TYPE               HOMBOT
VERSION         0.2.5
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 08:20:38
Nein in meine ein komplettes list

In der FHEMWEB Kommandozeile

list DEVICENAME

eingeben.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:22:47
Internals:
   DEF        192.168.0.27
   FUUID      5e7f0095-f33f-62ad-598c-0c2b7ecbcbc17b27
   HOST       192.168.0.27
   INTERVAL   750
   NAME       Hombot
   NR         550
   PORT       6260
   PREVIOUSHOMBOTSTATE ONLINE
   STATE      Homebot offline
   TYPE       HOMBOT
   VERSION    0.2.5
   READINGS:
     2020-04-19 07:40:46   at_0_MONDAY     
     2020-04-19 07:40:46   at_1_TUESDAY   
     2020-04-19 07:40:46   at_2_WEDNESDAY 
     2020-04-19 07:40:46   at_3_THURSDAY   
     2020-04-19 07:40:46   at_4_FRIDAY     
     2020-04-19 07:40:46   at_5_SATURDAY   
     2020-04-19 07:40:46   at_6_SUNDAY     
     2020-04-19 07:40:46   batteryPercent  100
     2020-04-19 07:40:46   cleanMode       SB
     2020-04-19 07:40:46   cpu_IDLE        74.36
     2020-04-19 07:40:46   cpu_NICE        0.00
     2020-04-19 07:40:46   cpu_SYS         16.89
     2020-04-19 07:40:46   cpu_USER        8.74
     2020-04-19 07:40:46   currentBumping  3233
     2020-04-19 07:40:46   firmware        16552
     2020-04-19 07:53:29   hombotState     OFFLINE
     2020-04-19 07:40:46   lastClean       08.04.2020 09:44
     2020-04-08 09:44:27   lastSetCommandState cmd_done
     2020-04-19 07:53:26   lastStatusRequestError connect to http://192.168.0.27:6260 timed out
     2020-04-19 07:53:26   lastStatusRequestState statusRequest_error
     2020-04-19 07:53:29   luigiHttpSrvState running
     2020-04-19 07:40:46   luigiSrvVersion lg.srv, V2.51 compiled 18.11.2016, by fx2
     2020-04-19 07:40:46   nickname        Hombot
     2020-04-19 07:40:46   numSB_Begin     128
     2020-04-19 07:40:46   numSB_Ende      9
     2020-04-19 07:40:46   numSPOT_Begin   9
     2020-04-19 07:40:46   numSPOT_Ende    5
     2020-04-19 07:40:46   numZZ_Begin     69
     2020-04-19 07:40:46   numZZ_Ende      12
     2020-04-19 07:40:46   repeat          false
     2020-04-19 07:53:29   state           Homebot offline
     2020-04-19 07:40:46   turbo           false
   helper:
     requestErrorCounter 0
     setErrorCounter 0
     sshpass    /usr/bin/sshpass
Attributes:
   icon       vacuum_bold
   interval   750
   room       09_Buero
   verbose    5
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 08:28:41
Ist der Homebot jetzt an und und FHEM zeigt ihn offline an? Wenn ja bitte noch mal ein list machen.
Und Gib mal bitte Logausgaben. Es müssten eigentlich mit verbose 5 auch bei offline Logausgaben kommen.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:33:33
Ja, der Hobot ist in FHEM offline. Am List ändert sich nichts. Im Log erscheint
2020.04.19 08:05:46 4: HOMBOT (Hombot) - Call HOMBOT_Get_stateRequest
2020.04.19 08:18:16 4: HOMBOT (Hombot) - Call HOMBOT_Get_stateRequest

alle 12 1/2 Minuten weil interval auf 750 steht.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:36:47
Gibt es einen Zusammenhang mit der known_hosts Datei und den Dateirechten, das er sich nicht wieder verbindet?

Ich habe den Raspi kürzlich mit Buster neu aufgesetzt und die Datei nur wieder zurück kopiert. Rechte stehen auf 644
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 08:37:55
Zeig bitte trotzdem ein list vom Device
Und Versuch mal den Hombot an zu pingen
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:43:29
Internals:
   DEF        192.168.0.27
   FUUID      5e7f0095-f33f-62ad-598c-0c2b7ecbcbc17b27
   HOST       192.168.0.27
   INTERVAL   750
   NAME       Hombot
   NR         550
   PORT       6260
   PREVIOUSHOMBOTSTATE ONLINE
   STATE      Homebot offline
   TYPE       HOMBOT
   VERSION    0.2.5
   READINGS:
     2020-04-19 07:40:46   at_0_MONDAY     
     2020-04-19 07:40:46   at_1_TUESDAY   
     2020-04-19 07:40:46   at_2_WEDNESDAY 
     2020-04-19 07:40:46   at_3_THURSDAY   
     2020-04-19 07:40:46   at_4_FRIDAY     
     2020-04-19 07:40:46   at_5_SATURDAY   
     2020-04-19 07:40:46   at_6_SUNDAY     
     2020-04-19 07:40:46   batteryPercent  100
     2020-04-19 07:40:46   cleanMode       SB
     2020-04-19 07:40:46   cpu_IDLE        74.36
     2020-04-19 07:40:46   cpu_NICE        0.00
     2020-04-19 07:40:46   cpu_SYS         16.89
     2020-04-19 07:40:46   cpu_USER        8.74
     2020-04-19 07:40:46   currentBumping  3233
     2020-04-19 07:40:46   firmware        16552
     2020-04-19 07:53:29   hombotState     OFFLINE
     2020-04-19 07:40:46   lastClean       08.04.2020 09:44
     2020-04-08 09:44:27   lastSetCommandState cmd_done
     2020-04-19 07:53:26   lastStatusRequestError connect to http://192.168.0.27:6260 timed out
     2020-04-19 07:53:26   lastStatusRequestState statusRequest_error
     2020-04-19 07:53:29   luigiHttpSrvState running
     2020-04-19 07:40:46   luigiSrvVersion lg.srv, V2.51 compiled 18.11.2016, by fx2
     2020-04-19 07:40:46   nickname        Hombot
     2020-04-19 07:40:46   numSB_Begin     128
     2020-04-19 07:40:46   numSB_Ende      9
     2020-04-19 07:40:46   numSPOT_Begin   9
     2020-04-19 07:40:46   numSPOT_Ende    5
     2020-04-19 07:40:46   numZZ_Begin     69
     2020-04-19 07:40:46   numZZ_Ende      12
     2020-04-19 07:40:46   repeat          false
     2020-04-19 07:53:29   state           Homebot offline
     2020-04-19 07:40:46   turbo           false
   helper:
     requestErrorCounter 0
     setErrorCounter 0
     sshpass    /usr/bin/sshpass
Attributes:
   icon       vacuum_bold
   interval   750
   room       09_Buero
   verbose    5

Ping vom Raspi:
pi@raspberrypi:~ $ ping 192.168.0.27
PING 192.168.0.27 (192.168.0.27) 56(84) bytes of data.
64 bytes from 192.168.0.27: icmp_seq=1 ttl=64 time=3.87 ms
64 bytes from 192.168.0.27: icmp_seq=2 ttl=64 time=5.15 ms
64 bytes from 192.168.0.27: icmp_seq=3 ttl=64 time=4.00 ms
64 bytes from 192.168.0.27: icmp_seq=4 ttl=64 time=3.62 ms
64 bytes from 192.168.0.27: icmp_seq=5 ttl=64 time=4.95 ms
64 bytes from 192.168.0.27: icmp_seq=6 ttl=64 time=3.28 ms
64 bytes from 192.168.0.27: icmp_seq=7 ttl=64 time=3.92 ms
64 bytes from 192.168.0.27: icmp_seq=8 ttl=64 time=3.67 ms
64 bytes from 192.168.0.27: icmp_seq=9 ttl=64 time=4.42 ms
64 bytes from 192.168.0.27: icmp_seq=10 ttl=64 time=4.44 ms
64 bytes from 192.168.0.27: icmp_seq=11 ttl=64 time=4.32 ms
64 bytes from 192.168.0.27: icmp_seq=12 ttl=64 time=3.80 ms
64 bytes from 192.168.0.27: icmp_seq=13 ttl=64 time=8.67 ms
64 bytes from 192.168.0.27: icmp_seq=14 ttl=64 time=3.78 ms
64 bytes from 192.168.0.27: icmp_seq=15 ttl=64 time=3.25 ms
64 bytes from 192.168.0.27: icmp_seq=16 ttl=64 time=3.31 ms
64 bytes from 192.168.0.27: icmp_seq=17 ttl=64 time=3.34 ms
64 bytes from 192.168.0.27: icmp_seq=18 ttl=64 time=3.06 ms
64 bytes from 192.168.0.27: icmp_seq=19 ttl=64 time=3.79 ms
64 bytes from 192.168.0.27: icmp_seq=20 ttl=64 time=3.13 ms
64 bytes from 192.168.0.27: icmp_seq=21 ttl=64 time=3.48 ms
64 bytes from 192.168.0.27: icmp_seq=22 ttl=64 time=5.52 ms
64 bytes from 192.168.0.27: icmp_seq=23 ttl=64 time=3.70 ms
64 bytes from 192.168.0.27: icmp_seq=24 ttl=64 time=3.23 ms
64 bytes from 192.168.0.27: icmp_seq=25 ttl=64 time=3.28 ms
64 bytes from 192.168.0.27: icmp_seq=26 ttl=64 time=5.79 ms
64 bytes from 192.168.0.27: icmp_seq=27 ttl=64 time=4.09 ms
64 bytes from 192.168.0.27: icmp_seq=28 ttl=64 time=3.30 ms
64 bytes from 192.168.0.27: icmp_seq=29 ttl=64 time=3.71 ms
64 bytes from 192.168.0.27: icmp_seq=30 ttl=64 time=2.59 ms
64 bytes from 192.168.0.27: icmp_seq=31 ttl=64 time=3.54 ms
64 bytes from 192.168.0.27: icmp_seq=32 ttl=64 time=4.06 ms
64 bytes from 192.168.0.27: icmp_seq=33 ttl=64 time=3.63 ms
64 bytes from 192.168.0.27: icmp_seq=34 ttl=64 time=5.48 ms
64 bytes from 192.168.0.27: icmp_seq=35 ttl=64 time=3.20 ms
64 bytes from 192.168.0.27: icmp_seq=36 ttl=64 time=3.92 ms
64 bytes from 192.168.0.27: icmp_seq=37 ttl=64 time=3.63 ms
64 bytes from 192.168.0.27: icmp_seq=38 ttl=64 time=3.02 ms
64 bytes from 192.168.0.27: icmp_seq=39 ttl=64 time=5.26 ms
64 bytes from 192.168.0.27: icmp_seq=40 ttl=64 time=2.60 ms
64 bytes from 192.168.0.27: icmp_seq=41 ttl=64 time=4.18 ms
64 bytes from 192.168.0.27: icmp_seq=42 ttl=64 time=3.00 ms
64 bytes from 192.168.0.27: icmp_seq=43 ttl=64 time=3.21 ms
64 bytes from 192.168.0.27: icmp_seq=44 ttl=64 time=3.31 ms
64 bytes from 192.168.0.27: icmp_seq=45 ttl=64 time=8.92 ms
64 bytes from 192.168.0.27: icmp_seq=46 ttl=64 time=3.15 ms
64 bytes from 192.168.0.27: icmp_seq=47 ttl=64 time=2.94 ms
64 bytes from 192.168.0.27: icmp_seq=48 ttl=64 time=4.14 ms
64 bytes from 192.168.0.27: icmp_seq=49 ttl=64 time=3.66 ms
64 bytes from 192.168.0.27: icmp_seq=50 ttl=64 time=2.92 ms
64 bytes from 192.168.0.27: icmp_seq=51 ttl=64 time=4.01 ms
64 bytes from 192.168.0.27: icmp_seq=52 ttl=64 time=3.22 ms
64 bytes from 192.168.0.27: icmp_seq=53 ttl=64 time=3.11 ms
64 bytes from 192.168.0.27: icmp_seq=54 ttl=64 time=8.58 ms
^C
--- 192.168.0.27 ping statistics ---
54 packets transmitted, 54 received, 0% packet loss, time 135ms
rtt min/avg/max/mdev = 2.588/4.020/8.919/1.348 ms

Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 08:50:08
Das hier macht mich stutzig

2020-04-19 07:53:29   luigiHttpSrvState running
2020-04-19 07:53:29   state           Homebot offline

Der Timestamp ist der selbe. Aktuell habe ich noch keine Erklärung geschweige den eine Lösung.
Ich schaue im Laufe des Tages mal in den Code.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 08:51:32
Habe gerade eine neue known_hosts Datei erstellt und nach /opt/fhem/.ssh/ verschoben. Rechte auf 777
Wer weiß, wofür das gut ist. Der Hombot hatte vorher eine andere IP Adresse und ich weiß nicht, ob ich den selben USB Stick verwendet habe.
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 09:01:21
Ich glaube, das war es!

Habe gerade den statusRequest gerade einmal manuell angestoßen, nachdem ich die known_hosts Datei getauscht habe. Jetzt ist er wieder online!
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: CoolTux am 19 April 2020, 09:14:00
Ah jetzt weiß ich erst was genau Du meinst. Es reicht wenn die Datei 644 hast, aber entscheidend ist das sich die ip des hombot geändert hat und somit gibt es in der Datei einen IP Konflikt. Das war der entscheidende Hinweis.

Grüße
Titel: Antw:Hombot Saugroboter geht offline und kommt nicht zurück
Beitrag von: edition am 19 April 2020, 09:33:19
Der Hombot war längere Zeit außer Gefecht. Zwischenzeitig hatte ich meine IP Adressen neu geordnet. Darum habe ich den WLAN Hack neu eingespielt. Um die known_hosts Datei habe ich mir keine Gedanken gemacht und sie vom alten System wieder in das Verzeichniss kopiert.
Ich schau einfach mal, was passiert, in den nächsten Tagen.
Trotzdem Danke für die Unterstützung!

edition