TelegramBot startet Raspi dauerhaft neu (LOOP)

Begonnen von Fixel2012, 03 Dezember 2016, 14:22:03

Vorheriges Thema - Nächstes Thema

Fixel2012

Hallo,

habe gestern abend meinen Raspi per Telegram Command neu gestartet.

Seit dem startet er in einem Loop neu!

Im log steht folgendes:
2016.12.03 13:54:47 3: TelegramBot_ReadHandleCommand teleBot: cmd found :{system ("sudo reboot")}:

Ich habe keine Ahnung wo her er diesen Command nimmt, ich hatte ihn nur einmal ganz normal gesendet:
<Befehl zum ausführen von Aktionen in Fhem> {system ("sudo reboot")

Da Fhem immer nur für ungefähr 10 sec online ist, habe ich nur wenig zeit Dinge abzufragen...

Das ist echt nervig und ich habe wie gesagt keine Ahnung wie ich den Loop entferne.

Hoffe jemand kann helfen  :-\ :'(

Edit: Habe erstmal das Attribut cmdKeyword rausgenommen, nun geht es vorrüber gehend. Würde aber gerne wieder commands über Telegram absetzen können!
Fhem 5.8 auf Raspi 3, HMLAN und 868MHz CUL mit einigen Komponenten, Z-Wave Rollladenaktoren, Tablet UI, 433 MHz CUL mit Baumarktsteckdosen und Temp Sensoren, Amazon Echo, Echo Dot, 2x SONOS  play1, 1x SONOS Connect AMP,  presence, HUE, Lightify

abc2006

SD-Karte raus, an einen Computer, und dort ganz in Ruhe arbeiten.

vermutlich steht der Befehl irgendwo im Statefile, wenn FHEM aus ist.
Oder du hast in der config einen Befehl zum Booten eingebaut.

sollte sich mit grep reboot * im Verzeichnis /opt/fhem/ recht einfach finden lassen, falls es irgendwo in den Dateien hinterlegt ist.

Grüße
Stephan
FHEM nightly auf Intel Atom (lubuntu) mit VDSL 50000 ;-)
Nutze zur Zeit OneWire und KNX

Fixel2012

Hey Stephan,

erstmal danke für deine Hilfe!

Also in meiner fhem.cfg steht nicht, dass er rebooten soll. Es muss irgendwo anders stehen :(

Den Command habe ich mal so ein gegeben, hoffe es war richtig ::)

pi@FHEM:/opt/fhem $ sudo grep reboot *
grep: alexa-fhem: Is a directory
grep: backup: Is a directory
CHANGED:  - bugfix:  correct one-time relative at commands after reboot
grep: contrib: Is a directory
grep: demolog: Is a directory
grep: docs: Is a directory
grep: FHEM: Is a directory
grep: _Inline: Is a directory
grep: log: Is a directory
grep: restoreDir: Is a directory
grep: unused: Is a directory
grep: www: Is a directory



Leider bekomme ich keine Datei mit dem Inhalt reboot als ausgabe.

Hast du noch weitere Tipps?

Grüße Felix
Fhem 5.8 auf Raspi 3, HMLAN und 868MHz CUL mit einigen Komponenten, Z-Wave Rollladenaktoren, Tablet UI, 433 MHz CUL mit Baumarktsteckdosen und Temp Sensoren, Amazon Echo, Echo Dot, 2x SONOS  play1, 1x SONOS Connect AMP,  presence, HUE, Lightify

abc2006

ah, habe überlesen, dass FHEM wieder läuft.
Schick mal bitte einen list von deinem TelegramBot.

Danke
Stephan
FHEM nightly auf Intel Atom (lubuntu) mit VDSL 50000 ;-)
Nutze zur Zeit OneWire und KNX

Fixel2012

hier das list vom teleBot, ist etwas lang, aber man sieht den command sudo reboot.

Internals:
   DEF        [PRIVAT]
   FAILS      0
   NAME       teleBot
   NR         147
   OLD_POLLING 212
   POLLING    212
   SNAME      teleBot
   STATE      Polling
   TYPE       TelegramBot
   Token      [PRIVATE BOT URL]
   UPDATER    0
   URL        https://api.telegram.org/[PRIVATE BOT URL]
   WAIT       0
   me         292717655:Bot:@Bot
   sentLastResult SUCCESS
   sentMsgId  268
   sentMsgPeer Felix
   sentMsgPeerId 229600129
   sentMsgResult SUCCESS
   sentMsgText FHEM started - just now
   Contacts:
     229600129  229600129:Felix:
   Hu_do_params:
     NAME
     addr       https://api.telegram.org:443
     boundary   TelegramBot_boundary-x0123
     buf        HTTP/1.1 200 OK

Server: nginx/1.10.0

Date: Sat, 03 Dec 2016 14:45:46 GMT

Content-Type: application/json

Content-Length: 223

Connection: close

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET, POST, OPTIONS

Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection

Strict-Transport-Security: max-age=31536000; includeSubdomains



{"ok":true,"result":{"message_id":268,"from":{"id":292717655,"first_name":"Bot","username":"Felix_Fhem_bot"},"chat":{"id":229600129,"first_name":"Felix","type":"private"},"date":1480776346,"text":"FHEM started - just now"}}
     code       200
     conn
     data
     displayurl <hidden>
     header     agent: TelegramBot/1.0

User-Agent: TelegramBot/1.0

Accept: application/json

Accept-Charset: utf-8

Content-Type: multipart/form-data; boundary=TelegramBot_boundary-x0123
     hideurl    1
     host       api.telegram.org
     httpheader HTTP/1.1 200 OK

Server: nginx/1.10.0

Date: Sat, 03 Dec 2016 14:45:46 GMT

Content-Type: application/json

Content-Length: 223

Connection: close

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET, POST, OPTIONS

Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection

Strict-Transport-Security: max-age=31536000; includeSubdomains
     hu_blocking 0
     hu_filecount 1
     loglevel   4
     method     POST
     path       [PRIVATE BOT URL]
     protocol   https
     redirects  0
     timeout    30
     url        https://api.telegram.org/[PRIVATE BOT URL]
     args:
       Felix
       FHEM started - just now

       0

       1
     Hash:
     Sslargs:
   Hu_upd_params:
     FD         24
     NAME
     addr       https://api.telegram.org:443
     buf
     code       200
     displayurl <hidden>
     header     agent: TelegramBot/1.0

User-Agent: TelegramBot/1.0

Accept: application/json

Accept-Charset: utf-8
     hideurl    1
     host       api.telegram.org
     httpheader HTTP/1.1 200 OK

Server: nginx/1.10.0

Date: Sat, 03 Dec 2016 16:31:59 GMT

Content-Type: application/json

Content-Length: 23

Connection: close

Access-Control-Allow-Origin: *

Access-Control-Allow-Methods: GET, POST, OPTIONS

Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection

Strict-Transport-Security: max-age=31536000; includeSubdomains
     hu_blocking 0
     hu_filecount 211
     isPolling  update
     loglevel   4
     method     GET
     offset     0
     path       [PRIVATE BOT URL]
     protocol   https
     redirects  0
     timeout    65
     url        https://api.telegram.org/[PRIVATE BOT URL]
     Hash:
     Sslargs:
   Readings:
     2016-11-21 10:53:37   Contacts        229600129:Felix:
     2016-12-03 00:00:27   PollingErrCount 0
     2016-11-28 16:11:59   PollingLastError NonBlockingGet: returned gethostbyname api.telegram.org failed
     2016-12-03 02:56:39   StoredCommands  mach set Test on
do set test on
do set TEST toogle
do set TEST toggle
do shutdown restart
do set teleBot send message hey
do set Lampe_Schlafzi off
do set Schlafzi_Lampe off
do {system ("sudo reboot")}

     2016-12-03 14:42:04   msgChat
     2016-12-03 14:42:04   msgFileId
     2016-12-03 14:42:04   msgId           214
     2016-12-03 14:42:04   msgPeer         Felix
     2016-12-03 14:42:04   msgPeerId       229600129
     2016-12-03 14:42:04   msgText         H
     2016-12-03 14:42:04   prevMsgChat
     2016-12-03 14:42:04   prevMsgFileId
     2016-12-03 14:42:04   prevMsgId       212
     2016-12-03 14:42:04   prevMsgPeer     Felix
     2016-12-03 14:42:04   prevMsgPeerId   229600129
     2016-12-03 14:42:04   prevMsgText     H
     2016-12-03 15:45:46   sentMsgId       268
     2016-12-03 15:45:46   sentMsgResult   SUCCESS
   sentQueue:
Attributes:
   allowUnknownContacts 0
   defaultPeer Felix
   pollingTimeout 30
   room       Telegram


Hoffe du kannst damit etwas anfangen!
Fhem 5.8 auf Raspi 3, HMLAN und 868MHz CUL mit einigen Komponenten, Z-Wave Rollladenaktoren, Tablet UI, 433 MHz CUL mit Baumarktsteckdosen und Temp Sensoren, Amazon Echo, Echo Dot, 2x SONOS  play1, 1x SONOS Connect AMP,  presence, HUE, Lightify

abc2006

#5
Also soweit ich das hier aus der Ferne beurteilen kann, ist das Problem das Reading storedCommands.
mach mal ein deletereading <deinTelegramBotName> StoredCommands
Dann sollte es wieder gehen. (hoffe ich)
Warum allerdings die StoredCommands nicht ausgeführt wurden, ist mir *noch* ein Rätsel.
^^^^^##############
Humbug... hätte ich di commandref besser gelesen:
◦StoredCommands <text>
A list of the last commands executed through TelegramBot. Maximum 10 commands are stored.

Was noch möglich wäre:

set  <deinTelegramBotName> reset


Grüße
Stephan

edit: lt Commandref:
Note: shutdown is not supported as a command (also in favorites) and will be rejected. This is needed to avoid reexecution of the shutdown command directly after restart (endless loop !).

Vllt hat das reboot das gleiche Problem...
FHEM nightly auf Intel Atom (lubuntu) mit VDSL 50000 ;-)
Nutze zur Zeit OneWire und KNX

Fixel2012

Ich Danke dir viel Mals!

deletereading <deinTelegramBotName> StoredCommands

Das war es... den Reset hatte ich schon einmal durchgeführt, hat aber nicht geholfen gehabt.

Wie gesagt, tausend Dank an dich!
Fhem 5.8 auf Raspi 3, HMLAN und 868MHz CUL mit einigen Komponenten, Z-Wave Rollladenaktoren, Tablet UI, 433 MHz CUL mit Baumarktsteckdosen und Temp Sensoren, Amazon Echo, Echo Dot, 2x SONOS  play1, 1x SONOS Connect AMP,  presence, HUE, Lightify