Telegram instant messaging TelegramBot - Empfangen und Senden per FHEM

Begonnen von viegener, 20 Juni 2015, 18:59:41

Vorheriges Thema - Nächstes Thema

UweH

Diese ganzen Probleme habe ich zwar nicht, dafür aber sind die anderen Kontakte verschwunden...ebenso meine mühselig eingerichtete Gruppe.

Gruß
Uwe

Maista

Hallo zusammen,

ich habe gestern per Update den bot aktualisiert.
Bei mir funktioniert noch alles.
Allerdings habe ich nicht wirklich viel eingerichtet. Bisher nur drei Kontakte und ein paar Favoriten.
Nach dem Update stehen nun zwar viele Fehlermeldungen im Log, diese haben aber scheinbar nichts mit dem TelegramBot zu tun.

Zitat2015.10.21 19:42:15 1: Error: 1 has no TYPE

Diese Meldung taucht alle paar Sekunden auf, aber nicht erkennbar wer das erzeugt.

Schönen Sonntag

Gerd

Edit1: Gerade neu gestartet, kommen keine Meldungen (mehr)
Edit2: In der CFG war beim Zähler DS2423 folgendes gesetzt:
Zitat
attr OWX_1D_A2D984000002 LogM 1
attr OWX_1D_A2D984000002 LogY 1
Das entfernt und keine Massen-Meldungen mehr im Log

viegener

Zitat von: speex am 25 Oktober 2015, 06:18:54
Hallo ihr lieben, also ein riesen Problem telegramBot mach bei mir nur noch Probleme.

Der Server wird praktisch jede minute neu gestartet weil sich das telegrammodul nicht mehr fängt.

Angefangen hat das ganze bei mir seitdem ich mir den TeleGramBot + HTTPUtils über den update command geholt habe, seitdem wird nicht mehr gepollt und er kackt immer beim letzten an telegrambot verschicken command ab. Das geht inzwischen soweit das ich das system praktisch nicht mehr anrühren kann alles sielt verrückt.#


2015.10.25 06:09:20 1: HMLAN_Parse: HMLAN1 new condition ok
2015.10.25 06:09:20 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.25 06:09:20 3: ipc RPiFronthem:127.0.0.1:41942 (ws): ws alive with pid 18599
2015.10.25 06:09:58 3: TelegramBot_ReadHandleCommand teleBot: cmd found :list global:
2015.10.25 06:09:58 3: TelegramBot_SendIt teleBot: add send to queue :xxxxxxxxx: -:TelegramBot fhem cmd :list global: result :Internals:
DEF <no definition>
NAME global
NR 1
STATE <no definition>
TYPE Global
currentlogfile ./log/fhem-2015-10.log
logfile ./log/fhem-%Y-%m.log
Attributes:
autoload_undefined_devices 1
configfile fhem.cfg
latitude 51.229455
logfile ./log/fhem-%Y-%m.log
longitude 6.760991
modpath .
motd SecurityCheck:

WEB,WEBphone,WEBtablet has no basicAuth attribute.
telnetPort has no password/globalpassword attribute.

Restart FHEM for a new check if the problem is fixed,
or set the global attribute motd to none to supress this message.

statefile ./log/fhem.save
updateInBackground 1
userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
verbose 3
version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $
:: - :<undef>:
2015.10.25 06:09:58 3: TelegramBot_ReadHandleCommand teleBot: cmd found :shutdown restart:
2015.10.25 06:09:58 1: in SHUTDOWN
2015.10.25 06:09:58 1: in SHUTDOWN
2015.10.25 06:09:58 1: in SHUTDOWN
2015.10.25 06:09:58 1: in SHUTDOWN
2015.10.25 06:09:58 1: in SHUTDOWN
2015.10.25 06:09:58 0: Server shutdown
2015.10.25 06:10:01 1: Including fhem.cfg
2015.10.25 06:10:01 3: telnetPort: port 7072 opened
2015.10.25 06:10:01 3: WEB: port 8083 opened
2015.10.25 06:10:01 3: WEBphone: port 8084 opened
2015.10.25 06:10:01 3: WEBtablet: port 8085 opened
2015.10.25 06:10:01 2: eventTypes: loaded 1350 events from ./log/eventTypes.txt
2015.10.25 06:10:02 3: fl_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:02 3: wz_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:02 3: wz_SchreibtischLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:02 3: master_LED_Define: I/O device is MilightBridge
2015.10.25 06:10:02 1: HMLAN_Parse: HMLAN1 new condition disconnected
2015.10.25 06:10:02 3: Opening HMLAN1 device 192.168.1.111:1000
2015.10.25 06:10:02 3: HMLAN1 device opened
2015.10.25 06:10:02 1: HMLAN_Parse: HMLAN1 new condition init
2015.10.25 06:10:03 2: RPiFronthem: ipc listener opened at port 16384
2015.10.25 06:10:04 3: TelegramBot_Define teleBot: called
2015.10.25 06:10:04 1: Including ./log/fhem.save
2015.10.25 06:10:05 3: Device fl_Dor_Sensor added to ActionDetector with 028:00 time
2015.10.25 06:10:05 3: Device fl_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:10:05 3: Device wz_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:10:05 3: Device wz_HK2 added to ActionDetector with 000:10 time
2015.10.25 06:10:05 1: in INITIALIZED
2015.10.25 06:10:05 1: in INITIALIZED
2015.10.25 06:10:05 1: in INITIALIZED
2015.10.25 06:10:05 1: in INITIALIZED
2015.10.25 06:10:05 1: in INITIALIZED
2015.10.25 06:10:05 1: usb create starting
2015.10.25 06:10:05 3: Probing CUL device /dev/ttyAMA0
2015.10.25 06:10:05 3: Probing TCM_ESP3 device /dev/ttyAMA0
2015.10.25 06:10:06 3: Probing FRM device /dev/ttyAMA0
2015.10.25 06:10:11 1: usb create end
2015.10.25 06:10:11 1: PERL WARNING: Use of uninitialized value $devname in hash element at ./FHEM/31_MilightDevice.pm line 2097.
2015.10.25 06:10:11 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.10.25 06:10:11 0: Featurelevel: 5.6
2015.10.25 06:10:11 0: Server started with 80 defined entities (version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $, os linux, user fhem, pid 18609)
2015.10.25 06:10:11 1: HMLAN_Parse: HMLAN1 new condition ok
2015.10.25 06:10:11 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.25 06:10:11 3: ipc RPiFronthem:127.0.0.1:41951 (ws): ws alive with pid 18611
2015.10.25 06:10:49 3: TelegramBot_ReadHandleCommand teleBot: cmd found :list global:
2015.10.25 06:10:50 3: TelegramBot_SendIt teleBot: add send to queue :xxxxxxxxx: -:TelegramBot fhem cmd :list global: result :Internals:
DEF <no definition>
NAME global
NR 1
STATE <no definition>
TYPE Global
currentlogfile ./log/fhem-2015-10.log
logfile ./log/fhem-%Y-%m.log
Attributes:
autoload_undefined_devices 1
configfile fhem.cfg
latitude 51.229455
logfile ./log/fhem-%Y-%m.log
longitude 6.760991
modpath .
motd SecurityCheck:

WEB,WEBphone,WEBtablet has no basicAuth attribute.
telnetPort has no password/globalpassword attribute.

Restart FHEM for a new check if the problem is fixed,
or set the global attribute motd to none to supress this message.

statefile ./log/fhem.save
updateInBackground 1
userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
verbose 3
version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $
:: - :<undef>:
2015.10.25 06:10:50 3: TelegramBot_ReadHandleCommand teleBot: cmd found :shutdown restart:
2015.10.25 06:10:50 1: in SHUTDOWN
2015.10.25 06:10:50 1: in SHUTDOWN
2015.10.25 06:10:50 1: in SHUTDOWN
2015.10.25 06:10:50 1: in SHUTDOWN
2015.10.25 06:10:50 1: in SHUTDOWN
2015.10.25 06:10:50 0: Server shutdown
2015.10.25 06:10:52 1: Including fhem.cfg
2015.10.25 06:10:52 3: telnetPort: port 7072 opened
2015.10.25 06:10:53 3: WEB: port 8083 opened
2015.10.25 06:10:53 3: WEBphone: port 8084 opened
2015.10.25 06:10:53 3: WEBtablet: port 8085 opened
2015.10.25 06:10:53 2: eventTypes: loaded 1350 events from ./log/eventTypes.txt
2015.10.25 06:10:53 3: fl_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:53 3: wz_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:53 3: wz_SchreibtischLampe_Define: I/O device is MilightBridge
2015.10.25 06:10:53 3: master_LED_Define: I/O device is MilightBridge
2015.10.25 06:10:53 1: HMLAN_Parse: HMLAN1 new condition disconnected
2015.10.25 06:10:53 3: Opening HMLAN1 device 192.168.1.111:1000
2015.10.25 06:10:53 3: HMLAN1 device opened
2015.10.25 06:10:53 1: HMLAN_Parse: HMLAN1 new condition init
2015.10.25 06:10:55 2: RPiFronthem: ipc listener opened at port 16384
2015.10.25 06:10:55 3: TelegramBot_Define teleBot: called
2015.10.25 06:10:56 1: Including ./log/fhem.save
2015.10.25 06:10:56 3: Device fl_Dor_Sensor added to ActionDetector with 028:00 time
2015.10.25 06:10:56 3: Device fl_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:10:56 3: Device wz_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:10:56 3: Device wz_HK2 added to ActionDetector with 000:10 time
2015.10.25 06:10:56 1: in INITIALIZED
2015.10.25 06:10:56 1: in INITIALIZED
2015.10.25 06:10:56 1: in INITIALIZED
2015.10.25 06:10:56 1: in INITIALIZED
2015.10.25 06:10:56 1: in INITIALIZED
2015.10.25 06:10:56 1: usb create starting
2015.10.25 06:10:57 3: Probing CUL device /dev/ttyAMA0
2015.10.25 06:10:57 3: Probing TCM_ESP3 device /dev/ttyAMA0
2015.10.25 06:10:57 3: Probing FRM device /dev/ttyAMA0
2015.10.25 06:11:02 1: usb create end
2015.10.25 06:11:02 1: PERL WARNING: Use of uninitialized value $devname in hash element at ./FHEM/31_MilightDevice.pm line 2097.
2015.10.25 06:11:02 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.10.25 06:11:02 0: Featurelevel: 5.6
2015.10.25 06:11:02 0: Server started with 80 defined entities (version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $, os linux, user fhem, pid 18621)
2015.10.25 06:11:03 1: HMLAN_Parse: HMLAN1 new condition ok
2015.10.25 06:11:03 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.25 06:11:03 3: ipc RPiFronthem:127.0.0.1:41960 (ws): ws alive with pid 18622
2015.10.25 06:11:41 3: TelegramBot_ReadHandleCommand teleBot: cmd found :list global:
2015.10.25 06:11:41 3: TelegramBot_SendIt teleBot: add send to queue :xxxxxxxxx: -:TelegramBot fhem cmd :list global: result :Internals:
DEF <no definition>
NAME global
NR 1
STATE <no definition>
TYPE Global
currentlogfile ./log/fhem-2015-10.log
logfile ./log/fhem-%Y-%m.log
Attributes:
autoload_undefined_devices 1
configfile fhem.cfg
latitude 51.229455
logfile ./log/fhem-%Y-%m.log
longitude 6.760991
modpath .
motd SecurityCheck:

WEB,WEBphone,WEBtablet has no basicAuth attribute.
telnetPort has no password/globalpassword attribute.

Restart FHEM for a new check if the problem is fixed,
or set the global attribute motd to none to supress this message.

statefile ./log/fhem.save
updateInBackground 1
userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
verbose 3
version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $
:: - :<undef>:
2015.10.25 06:11:41 3: TelegramBot_ReadHandleCommand teleBot: cmd found :shutdown restart:
2015.10.25 06:11:41 1: in SHUTDOWN
2015.10.25 06:11:41 1: in SHUTDOWN
2015.10.25 06:11:41 1: in SHUTDOWN
2015.10.25 06:11:41 1: in SHUTDOWN
2015.10.25 06:11:41 1: in SHUTDOWN
2015.10.25 06:11:41 0: Server shutdown
2015.10.25 06:11:44 1: Including fhem.cfg
2015.10.25 06:11:44 3: telnetPort: port 7072 opened
2015.10.25 06:11:44 3: WEB: port 8083 opened
2015.10.25 06:11:44 3: WEBphone: port 8084 opened
2015.10.25 06:11:44 3: WEBtablet: port 8085 opened
2015.10.25 06:11:44 2: eventTypes: loaded 1350 events from ./log/eventTypes.txt
2015.10.25 06:11:45 3: fl_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:11:45 3: wz_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:11:45 3: wz_SchreibtischLampe_Define: I/O device is MilightBridge
2015.10.25 06:11:45 3: master_LED_Define: I/O device is MilightBridge
2015.10.25 06:11:45 1: HMLAN_Parse: HMLAN1 new condition disconnected
2015.10.25 06:11:45 3: Opening HMLAN1 device 192.168.1.111:1000
2015.10.25 06:11:45 3: HMLAN1 device opened
2015.10.25 06:11:45 1: HMLAN_Parse: HMLAN1 new condition init
2015.10.25 06:11:46 2: RPiFronthem: ipc listener opened at port 16384
2015.10.25 06:11:47 3: TelegramBot_Define teleBot: called
2015.10.25 06:11:47 1: Including ./log/fhem.save
2015.10.25 06:11:48 3: Device fl_Dor_Sensor added to ActionDetector with 028:00 time
2015.10.25 06:11:48 3: Device fl_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:11:48 3: Device wz_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:11:48 3: Device wz_HK2 added to ActionDetector with 000:10 time
2015.10.25 06:11:48 1: in INITIALIZED
2015.10.25 06:11:48 1: in INITIALIZED
2015.10.25 06:11:48 1: in INITIALIZED
2015.10.25 06:11:48 1: in INITIALIZED
2015.10.25 06:11:48 1: in INITIALIZED
2015.10.25 06:11:48 1: usb create starting
2015.10.25 06:11:48 3: Probing CUL device /dev/ttyAMA0
2015.10.25 06:11:48 3: Probing TCM_ESP3 device /dev/ttyAMA0
2015.10.25 06:11:49 3: Probing FRM device /dev/ttyAMA0
2015.10.25 06:11:54 1: usb create end
2015.10.25 06:11:54 1: PERL WARNING: Use of uninitialized value $devname in hash element at ./FHEM/31_MilightDevice.pm line 2097.
2015.10.25 06:11:54 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.10.25 06:11:54 0: Featurelevel: 5.6
2015.10.25 06:11:54 0: Server started with 80 defined entities (version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $, os linux, user fhem, pid 18632)
2015.10.25 06:11:54 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.25 06:11:54 3: ipc RPiFronthem:127.0.0.1:41969 (ws): ws alive with pid 18633
2015.10.25 06:12:12 1: 192.168.1.111:1000 disconnected, waiting to reappear (HMLAN1)
2015.10.25 06:12:12 1: HMLAN_Parse: HMLAN1 new condition disconnected
2015.10.25 06:12:12 1: 192.168.1.111:1000 reappeared (HMLAN1)
2015.10.25 06:12:12 1: HMLAN_Parse: HMLAN1 new condition init
2015.10.25 06:12:12 1: HMLAN_Parse: HMLAN1 new condition ok
2015.10.25 06:12:33 3: TelegramBot_ReadHandleCommand teleBot: cmd found :list global:
2015.10.25 06:12:33 3: TelegramBot_SendIt teleBot: add send to queue :xxxxxxxxx: -:TelegramBot fhem cmd :list global: result :Internals:
DEF <no definition>
NAME global
NR 1
STATE <no definition>
TYPE Global
currentlogfile ./log/fhem-2015-10.log
logfile ./log/fhem-%Y-%m.log
Attributes:
autoload_undefined_devices 1
configfile fhem.cfg
latitude 51.229455
logfile ./log/fhem-%Y-%m.log
longitude 6.760991
modpath .
motd SecurityCheck:

WEB,WEBphone,WEBtablet has no basicAuth attribute.
telnetPort has no password/globalpassword attribute.

Restart FHEM for a new check if the problem is fixed,
or set the global attribute motd to none to supress this message.

statefile ./log/fhem.save
updateInBackground 1
userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride
verbose 3
version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $
:: - :<undef>:
2015.10.25 06:12:33 3: TelegramBot_ReadHandleCommand teleBot: cmd found :shutdown restart:
2015.10.25 06:12:33 1: in SHUTDOWN
2015.10.25 06:12:33 1: in SHUTDOWN
2015.10.25 06:12:33 1: in SHUTDOWN
2015.10.25 06:12:33 1: in SHUTDOWN
2015.10.25 06:12:33 1: in SHUTDOWN
2015.10.25 06:12:33 0: Server shutdown
2015.10.25 06:12:35 1: Including fhem.cfg
2015.10.25 06:12:35 3: telnetPort: port 7072 opened
2015.10.25 06:12:36 3: WEB: port 8083 opened
2015.10.25 06:12:36 3: WEBphone: port 8084 opened
2015.10.25 06:12:36 3: WEBtablet: port 8085 opened
2015.10.25 06:12:36 2: eventTypes: loaded 1350 events from ./log/eventTypes.txt
2015.10.25 06:12:36 3: fl_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:12:36 3: wz_DeckenLampe_Define: I/O device is MilightBridge
2015.10.25 06:12:36 3: wz_SchreibtischLampe_Define: I/O device is MilightBridge
2015.10.25 06:12:36 3: master_LED_Define: I/O device is MilightBridge
2015.10.25 06:12:36 1: HMLAN_Parse: HMLAN1 new condition disconnected
2015.10.25 06:12:36 3: Opening HMLAN1 device 192.168.1.111:1000
2015.10.25 06:12:36 3: HMLAN1 device opened
2015.10.25 06:12:36 1: HMLAN_Parse: HMLAN1 new condition init
2015.10.25 06:12:38 2: RPiFronthem: ipc listener opened at port 16384
2015.10.25 06:12:38 3: TelegramBot_Define teleBot: called
2015.10.25 06:12:39 1: Including ./log/fhem.save
2015.10.25 06:12:39 3: Device fl_Dor_Sensor added to ActionDetector with 028:00 time
2015.10.25 06:12:39 3: Device fl_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:12:39 3: Device wz_HK1 added to ActionDetector with 000:10 time
2015.10.25 06:12:39 3: Device wz_HK2 added to ActionDetector with 000:10 time
2015.10.25 06:12:39 1: in INITIALIZED
2015.10.25 06:12:39 1: in INITIALIZED
2015.10.25 06:12:39 1: in INITIALIZED
2015.10.25 06:12:39 1: in INITIALIZED
2015.10.25 06:12:39 1: in INITIALIZED
2015.10.25 06:12:39 1: usb create starting
2015.10.25 06:12:40 3: Probing CUL device /dev/ttyAMA0
2015.10.25 06:12:40 3: Probing TCM_ESP3 device /dev/ttyAMA0
2015.10.25 06:12:40 3: Probing FRM device /dev/ttyAMA0
2015.10.25 06:12:45 1: usb create end
2015.10.25 06:12:46 1: PERL WARNING: Use of uninitialized value $devname in hash element at ./FHEM/31_MilightDevice.pm line 2097.
2015.10.25 06:12:46 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no basicAuth attribute. telnetPort has no password/globalpassword attribute.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2015.10.25 06:12:46 0: Featurelevel: 5.6
2015.10.25 06:12:46 0: Server started with 80 defined entities (version $Id: fhem.pl 9581 2015-10-21 19:06:58Z rudolfkoenig $, os linux, user fhem, pid 18643)
2015.10.25 06:12:46 1: HMLAN_Parse: HMLAN1 new condition ok
2015.10.25 06:12:46 1: 192.168.1.102:9090 reappeared (wz_Kodi)


Alo hier geht gerade nichts mehr... ein set teleBot reset zeigt keine wirknug neustart nichts und der server wird jede minute neugestartet....


Ausser mir das offizielle update zu holen habe ich nichts verändert.

Das polling steht dauerhaft auf -1 und egal was ich an Polling werten vergebe und auch ein telegramBot reset hat auch keinerlei änderung erbracht.

Ich habe die ganze Hardware vom Strom getrennt und lebe jetzt momentan wieder oldschool - manuell , da merkt man dann leider wie sehr man sich daran schon gewöhnt hat.
DIe gewonnen log eriegnisse hab ich hier mal reingepackt

Desweiteren habe ich das ganze auch noch bei einem Bekannten in Betrieb genommen auch in diesem Fall ist das system nicht mehr ansprechbar.


Was mach ich denn jetzt? Hat jemand rat?


Hi,
aus dem log geht hervor, dass jemand das Kommando
shutdown restart an den Bot gesendet hat!

Das erzeugt eine Endlosschleife, denn der shutdown führt natürlich dazu, dass man das Kommando nicht mehr als erledigt markieren kann (der server ist ja weg). Beim nächsten Neustart steht das Kommando wieder an...

Die einfachste Lösung führt über eine manuelle Veränderung der fhem.cfg. Dort findet sich bei Dir mindestens ein der folgenden Zeilen:
attr teleBot cmdKeyword ...
attr teleBot cmdFavorites ...
Diese Zeile auskommentieren ('#' in die erste Spalte, dann laufen die Kommandos ins Leere und alles ist wieder normal. Die Attribute können dann wieder gesetzt werden.

Also: "shutdown" ist kein Kommando, dass über den Bot ausgeführt werden sollte...


Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Zitat von: UweH am 25 Oktober 2015, 11:13:35
Diese ganzen Probleme habe ich zwar nicht, dafür aber sind die anderen Kontakte verschwunden...ebenso meine mühselig eingerichtete Gruppe.

Gruß
Uwe

Die Kontakte sind ja als Reading angelegt, finden sich normalerweise also in fhem.save. Wenn allerdings diese Datei defekt oder unvollständig ist, so kann man immer noch die Kontakte manuell wiederherstellen aus Information im log file (log level 3 muss allerdings vorhanden sein):

Es finden sich für jeden Kontakt im log Einträge wie folgt:

2015.10.14 20:35:25 3: TelegramBot_ContactUpdate new contact :123456:Ralf_Mustermann:@ralf:
2015.10.14 20:35:25 3: TelegramBot_ContactUpdate new contact :-234567::#gruppe:
2015.10.14 20:35:25 3: TelegramBot_ContactUpdate new contact :3456789:jemand::


Von jedem dieser Einträge (suche nach "TelegramBot_ContactUpdate new contact") nimmt man den Text zwischen den äusseren Doppelpunkten (ohne diese Doppelpunkte). Fügt sie zusammen durch ein Leerzeichen getrennt.

Also im Beispiel oben sind das:

123456:Ralf_Mustermann:@ralf -234567::#gruppe 3456789:jemand:

Dann verwendet man das Kommando replaceContacts um die Kontakte neu zu setzen:

set <telebotdevice> replaceContacts <alle Kontakte durch leerzeichen getrennt>

OK und eine Möglichkeit das eleganter zu tun habe ich auf meine todo liste genommen.

Hinweis: Ein regelmässiger save ist in vielenFällen sinnvoll um einen aktuellen Status für alle Geräte zu haben, das kann man auch durch einen "at" Befehl automatisieren.

Johannes

Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Zitat von: Maista am 25 Oktober 2015, 12:44:26
Hallo zusammen,

ich habe gestern per Update den bot aktualisiert.
Bei mir funktioniert noch alles.
Allerdings habe ich nicht wirklich viel eingerichtet. Bisher nur drei Kontakte und ein paar Favoriten.
Nach dem Update stehen nun zwar viele Fehlermeldungen im Log, diese haben aber scheinbar nichts mit dem TelegramBot zu tun.

Diese Meldung taucht alle paar Sekunden auf, aber nicht erkennbar wer das erzeugt.

Schönen Sonntag

Gerd

Edit: Gerade neu gestartet, kommen keine Meldungen (mehr)

Die Meldung deutet daraufhin, dass Du eine device ohne TYPE hast. Dazu gibt es viele Lösungen hier im Forum und wie beschrieben hat das nichts mit telegramBot zu tun, solche Devices deuten daraufhin, dass irgendwo ein define unvollständig oder fehlerhaft ausgeführt wurde.
Vielleicht gibt es ein "define 1" irgendwo in Deinem fhem.cfg?

Johannes
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

speex

Vielen Dank, Johannes, läuft nun wieder.

Das ist korrekt, der Bot muss aber vorher schon aufgehört haben zu arbeiten, ich war halt verwundert nach dem ich bereits eine Weile Unterwegs war wo denn die Meldung bleiben würde über das abschalten der Verbraucher, dann habe ich probiert mir einen state per list auszugeben da kam dann halt schon nix mehr und dann habe ich es probiert mit shutdown restart, mir nix dabei gedacht. - gemerkt fürs nächste mal. :)

Ich hab das jetzt im Log bei mir auch mal eingrenzen können bin aber noch nicht richtig schlau draus geworden muss noch ein bisschen tiefere ursachen forschung betrieben.

2015.10.24 19:33:34 3: HttpUtils url=<hidden>
2015.10.24 19:33:34 3: <hidden>: HTTP response code 200
2015.10.24 19:33:34 3: HttpUtils <hidden>: Got data, length: 227
2015.10.24 19:33:36 3: HttpUtils url=<hidden>
2015.10.24 19:33:36 3: <hidden>: HTTP response code 200
2015.10.24 19:33:36 3: HttpUtils <hidden>: Got data, length: 542
2015.10.24 19:34:55 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 119.176008939743 s ago
2015.10.24 19:34:55 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:34:56 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:36:56 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.025707006454 s ago
2015.10.24 19:36:56 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:36:59 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:38:59 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.027947902679 s ago
2015.10.24 19:38:59 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:39:01 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:41:01 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.026947021484 s ago
2015.10.24 19:41:01 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:41:04 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:43:04 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.026176929474 s ago
2015.10.24 19:43:04 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:43:06 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:45:06 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.019275903702 s ago
2015.10.24 19:45:06 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:45:07 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:47:07 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.022305965424 s ago
2015.10.24 19:47:07 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:47:09 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:49:09 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.051135063171 s ago
2015.10.24 19:49:09 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:49:09 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:51:09 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.023770093918 s ago
2015.10.24 19:51:09 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:51:13 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:53:13 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.021176815033 s ago
2015.10.24 19:53:13 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:53:18 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:55:18 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.026907920837 s ago
2015.10.24 19:55:18 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:55:22 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:57:22 3: XBMC_CheckConnection: Connection lost! Last data from Kodi received 120.026036977768 s ago
2015.10.24 19:57:22 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:57:22 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:58:26 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:58:27 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 19:59:31 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 19:59:33 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:00:37 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:00:39 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:01:44 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:01:47 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:02:51 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:02:52 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:03:56 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:03:58 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:05:02 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:05:03 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:06:07 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:06:09 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:07:14 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:07:14 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:08:18 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:08:18 1: 192.168.1.102:9090 reappeared (wz_Kodi)
2015.10.24 20:09:22 1: 192.168.1.102:9090 disconnected, waiting to reappear (wz_Kodi)
2015.10.24 20:09:22 1: 192.168.1.102:9090 reappeared (wz_Kodi)
Not an ARRAY reference at ./FHEM/70_XBMC.pm line 599.
2015.10.25 05:32:59 1: reload: Error:Modul 99_IPCamNonBlockUtils deactivated:

2015.10.25 05:32:59 1: Including fhem.cfg


Um 10.24 - 19:33Uhr hab ich das letzte mal vom telegrambot eine nachricht bekommen ab danach hat offensichtlich Kodi rumgesponnen, dann bin ich zwischenzeitlich nochmal zuhausse gewesen von 21-22:30Uhr ca.. und gegen Elf uhr nachts dann war ich verwundert hatte den list befehl abgesetzt der schon keine rückmeldung mehr gab und wie erwähnt eben der shutdown restart...

Die 99_IPcam war eh nur testhalber und hab ich auch erstmal entfernt, aber gegen elf gibt es irgendwie auch keine logs mehr... ich verstehe das nicht.

Wie dem auch sei läuft erstmal wieder, vielleicht hat ja jemand von euch eine ahnung was da bei mir schief lief.

Vielen Dank euch bis hierhin.

viegener

Hi,
verdächtig erscheint mir der Eintrag:
Not an ARRAY reference at ./FHEM/70_XBMC.pm line 599.

Als erste Vermutung hätte ich das dabei fhem abstürzt, denn das klingt eher nach einem schwerwiegenden Fehler, worauf das Modul nicht vorbereitet ist (meldung kommt ja nicht als log sondern als perl-Meldung).

gruss,
Johannes
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Ich habe in github (also noch nicht in der offiziellen Verteilung) eine neue Version hochgeladen zum Testen. Diese enthält folgende Änderungen:

- Favoritenliste wird als Keyboard gesendet (siehe dazu hier: https://core.telegram.org/bots#keyboards)
- shutdown als Kommando wird herausgefiltert (auch als shutdown restart)
- Bei neuen Kontakten wird der statefile geschrieben (abschaltbar mit default an), so dass bei einem Absturz von fhem die Kontakte im statefile gesichert sind und ein log mit allen Kontakten wird erzeugt (log level 2)
- Ergebnisse von Kommandos können in der Länge beschränkt werden. Also das Resultat einer Message kann zwar beliebig lang sein, man kann aber auch eine beschränkte Grösse festlegen

Version findet sich in github hier: https://github.com/viegener/Telegram-fhem/blob/master/50_TelegramBot.pm

Rückmeldung aus Tests ist willkommen.
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

UweH

Super, vielen Dank.
Die Geschichte mit den Keyboards ist ja richtig Klasse, funktioniert. Vorbei mit dem umständlichen Tippen.

Gruß
Uwe

speex

Hallöchen hab mir auch mal die neue Gitversion besorgt funktioniert bis darauf das ich das mit dem versand des custom keyboards noch nicht verstanden habe.

Ansonsten hatte ich noch folgende neue Meldungen im Log:
2015.10.26 08:10:49 3: TelegramBot_Callback teleBot: resulted in :NonBlockingGet timed out on read from <hidden> after 29s: from Polling
2015.10.26 08:11:12 3: TelegramBot_Callback teleBot: resulted in :NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443: SSL connect attempt failed with unknown error error:00000000:lib(0):func(0):reason(0) SSL connect attempt failed with unknown error error:00000000:lib(0):func(0):reason(0): from Polling


2015.10.26 12:46:36 1: PERL WARNING: Possible unintended interpolation of <@meine-contact-id> in string at (eval 8387) line 1.

Dann wird mir noch mein Notify dazu ausgepsuckt..

2015.10.26 12:46:36 3: eval: {fhem ("set master_LED rgb 000000") } {fhem ("set teleBot message <@meine-contact-id> Licht und Medien wurden abgeschaltet!") } { if (   ReadingsVal("wz_Kodi", "type", "") eq "channel"
       || ReadingsVal("wz_Kodi", "type", "") eq "episode"
       || ReadingsVal("wz_Kodi", "type", "") eq "musicvideo"
       || ReadingsVal("wz_Kodi", "type", "") eq "picture"
       || ReadingsVal("wz_Kodi", "type", "") eq "movie") {
      if (ReadingsVal("wz_Kodi", "playStatus", "") eq "playing") {
               fhem("set wz_Kodi stop");;
            }
   } else { if (ReadingsVal("wz_Kodi", "playStatus", "") eq "playing") { \                  fhem("set wz_Kodi pause");;
            }
          }
}


Hat aber bisher trotz dieser Fehlermeldungen alles funktioniert, die neue Version habe ich heute nacht gegen 1 Uhr eingespielt...

Greets
speex

viegener

Zitat von: speex am 26 Oktober 2015, 14:41:38

Ansonsten hatte ich noch folgende neue Meldungen im Log:
2015.10.26 08:10:49 3: TelegramBot_Callback teleBot: resulted in :NonBlockingGet timed out on read from <hidden> after 29s: from Polling
2015.10.26 08:11:12 3: TelegramBot_Callback teleBot: resulted in :NonBlockingGet: returned <hidden>: Can't connect(2) to https://api.telegram.org:443: SSL connect attempt failed with unknown error error:00000000:lib(0):func(0):reason(0) SSL connect attempt failed with unknown error error:00000000:lib(0):func(0):reason(0): from Polling


2015.10.26 12:46:36 1: PERL WARNING: Possible unintended interpolation of <@meine-contact-id> in string at (eval 8387) line 1.

Dann wird mir noch mein Notify dazu ausgepsuckt..

2015.10.26 12:46:36 3: eval: {fhem ("set master_LED rgb 000000") } {fhem ("set teleBot message <@meine-contact-id> Licht und Medien wurden abgeschaltet!") } { if (   ReadingsVal("wz_Kodi", "type", "") eq "channel"
       || ReadingsVal("wz_Kodi", "type", "") eq "episode"
       || ReadingsVal("wz_Kodi", "type", "") eq "musicvideo"
       || ReadingsVal("wz_Kodi", "type", "") eq "picture"
       || ReadingsVal("wz_Kodi", "type", "") eq "movie") {
      if (ReadingsVal("wz_Kodi", "playStatus", "") eq "playing") {
               fhem("set wz_Kodi stop");;
            }
   } else { if (ReadingsVal("wz_Kodi", "playStatus", "") eq "playing") { \                  fhem("set wz_Kodi pause");;
            }
          }
}


Hat aber bisher trotz dieser Fehlermeldungen alles funktioniert, die neue Version habe ich heute nacht gegen 1 Uhr eingespielt...

Greets
speex

Die ersten Meldungen im log sind wiedermal Nichterreichbarkeit bzw. Verbindungsabbruch. Ich habe nachwievor auf meiner todo-liste diese Art Meldungen nur noch auf Wunsch auszugeben.

Die perl-Warnung deutet daraufhin, dass perl @meine-contact-id als Array interpretiert (Weil in perl @ ein array einleitet auch wenn es in einem String der mit " umschlossen ist steht). Ich nehme an Dein Notify enthält @meine-contact-id und nicht <@meine-contact-id>?

Probier doch mal @@ statt @ im notify? Das hat bereits funktioniert.

Johannes
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

speex

Hi Johannes vielen dank für deine prompten antworten und die tolle Arbeit!

Das ist so entsprechned definiert mit @@ im notify (Im log erschint es vll. nicht weil es interpretiert ist?) ich hatte ja auch unter anderem das problem das es mit einem nicht klappte... diese meldung kam halt vorher auch nicht also ich pekier mich darüber auch nicht ganz im gegenteil sollte dir nur als info über neuigkeiten seit dem update dienen, funktioniert ja alles. :)

Maista

Hallo Johannes,

kleiner Tippfehler in der Hilfe. Steht doppelt im PM.
Zitat
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 !).
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 !).

Tippfehler im Wiki
Zitat
....... Nehhmen wir mal an man möchte die Favoriten mit /short ausführen.......

Bisher bin ich noch am probieren und verstehen.
Scheint so weit zu gehen.

Gruss Gerd

viegener

Zitat von: Maista am 27 Oktober 2015, 20:37:29
kleiner Tippfehler in der Hilfe. Steht doppelt im PM.
Tippfehler im Wiki

Habe ich korrigiert,
Johannes
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

Maista

Hallo Johannes,

kann es sein das beim letzte Update vom telegramBot welches verteilt wird, die Schaltflächen nicht erzeugt werden?
Hab die Version von Git eingespielt und hier werden die Schaltflächen wieder erzeugt.

Schönes WE,

Gerd