Telegram instant messaging TelegramBot - Empfangen und Senden per FHEM

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

Vorheriges Thema - Nächstes Thema

viegener

#150
Ich habe soeben nochmals eine neue Fassung (Version 0.8 ) des 50_TelegramBot hochgeladen (in github und im ersten Post).

Die grössten Änderungen betreffen erweiterte Kommands und Favoriten und letzte Komandos, ausserdem habe ich verschiedene set-Kommandos mit weiteren Namen versehen, um kompatibler mit anderen Messaging-Modulen zu sein. Zusätzlich sind einige Fehler behoben.

Gruss,
Johannes



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

Maista

#151
Hallo Johannes,

TelegramBot macht bei mir nun nichts mehr :(
Nach dem ich das PM kopiert hatte, habe ich ein "shutdown restart" gemacht.
Ich sehe zwar das die Befehle von Telegram-Client eingehen, aber sie lösen nichts mehr aus.

Den Restart-Event habe ich wieder aktiviert. Erfolgt aber keine Ausgabe.
Zitat
sentMsgResult WAITING
sentMsgText    Fhem wurde neu gestartet!

Verbose habe ich auf 5 gesetzt und neu gestartet
Zitat
2015.10.10 15:34:41 1: Including /opt/fhem/FHEM/TelegramBot.cfg
2015.10.10 15:34:41 3: TelegramBot_Define myfhemBot: called
.
.
2015.10.10 15:36:18 4: TelegramBot_State Contacts hash has now :2:
.
2015.10.10 15:36:26 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:36:26 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( message )
2015.10.10 15:36:26 4: TelegramBot_Set myfhemBot: start message send
2015.10.10 15:36:26 5: TelegramBot_SendIt myfhemBot: called
2015.10.10 15:36:26 5: TelegramBot_Set myfhemBot: message done succesful:
.
.
2015.10.10 15:36:26 4: TelegramBot_ResetPolling myfhemBot: called
2015.10.10 15:36:26 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:36:26 4: TelegramBot_ResetPolling myfhemBot: finished
.
.
2015.10.10 15:36:54 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:36:54 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:36:54 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:36:54 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:36:54 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:04 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:04 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:37:04 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:37:04 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:04 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
.
.
2015.10.10 15:37:14 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:14 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:37:14 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:37:14 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:14 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:25 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:25 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:37:25 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:37:25 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:25 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:34 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:34 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[{"update_id":816793229,
"message":{"message_id":762,"from":{"id":13363079,"first_name":"Banane","username":"Banane"},"chat":{"id":13363079,"first_name":"Banane","username":"Banane","type":"private"},"date":1444484254,"text":"\/hey"}}]}:
2015.10.10 15:37:34 5: UpdatePoll myfhemBot: number of results 1
2015.10.10 15:37:34 5: UpdatePoll myfhemBot: parse result
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:34 4: TelegramBot_ContactUpdate # Contacts in hash before :2:
2015.10.10 15:37:34 4: TelegramBot_ContactUpdate # Contacts in hash after :2:
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:34 5: TelegramBot_checkAllowedPeer myfhemBot: called with 13363079
2015.10.10 15:37:34 3: TelegramBot_ReadHandleCommand myfhemBot: cmd found ::
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:34 5: TelegramBot_ReadHandleCommand cmd correct peer
2015.10.10 15:37:34 5: TelegramBot_ReadHandleCommand final cmd for analyze ::
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:37:34 4: TelegramBot_AddStoredCommands :/hey
:
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:34 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:34 5: TelegramBot_ExecuteCommand final cmd for analyze ::
2015.10.10 15:37:34 5: TelegramBot_ExecuteCommand result for analyze :<undef>:
2015.10.10 15:37:34 5: TelegramBot_ExecuteCommand myfhemBot: TelegramBot fhem cmd :: result OK:
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( messageTo )
2015.10.10 15:37:34 4: TelegramBot_Set myfhemBot: start message send
2015.10.10 15:37:34 5: TelegramBot_SendIt myfhemBot: called
2015.10.10 15:37:34 3: TelegramBot_SendIt myfhemBot: add send to queue :13363079: -:TelegramBot fhem cmd :: result OK: - :<undef>:
2015.10.10 15:37:34 5: TelegramBot_Set myfhemBot: messageTo done succesful:
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:34 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:37:34 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:34 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:45 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:45 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:37:45 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:37:45 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:45 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:46 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:46 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[{"update_id":816793230,
"message":{"message_id":763,"from":{"id":13363079,"first_name":"Banane","username":"Banane"},"chat":{"id":13363079,"first_name":"Banane","username":"Banane","type":"private"},"date":1444484266,"text":"#"}}]}:
2015.10.10 15:37:46 5: UpdatePoll myfhemBot: number of results 1
2015.10.10 15:37:46 5: UpdatePoll myfhemBot: parse result
2015.10.10 15:37:46 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:46 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:46 4: TelegramBot_ContactUpdate # Contacts in hash before :2:
2015.10.10 15:37:46 4: TelegramBot_ContactUpdate # Contacts in hash after :2:
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:37:46 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:37:46 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:37:46 5: TelegramBot_checkAllowedPeer myfhemBot: called with 13363079
2015.10.10 15:37:46 5: TelegramBot_SentFavorites cmd correct peer
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( messageTo )
2015.10.10 15:37:46 4: TelegramBot_Set myfhemBot: start message send
2015.10.10 15:37:46 5: TelegramBot_SendIt myfhemBot: called
2015.10.10 15:37:46 3: TelegramBot_SendIt myfhemBot: add send to queue :13363079: -:TelegramBot fhem : (13363079)
Favorites

1
/hey aussen
2
/hey aussen1
3
/hey buero
4
/hey buero1
5
/hey get OWX_26_ECC2A1010000 reading
6
/hey get OWX_28_736020050000 temperature
7
/hey get OWX_28_60BFC3040000 temperature
8
/hey get FIRMATA firmware
9
/hey get OWio2 devices
10
/hey get OWio3 devices
11
/hey get OWio5 devices
12
/hey get OWio6 devices
13
/hey get OWio7 devices
14
/hey get OWX_1D_A2D984000002 counters
: - :<undef>:
2015.10.10 15:37:46 5: TelegramBot_Set myfhemBot: messageTo done succesful:
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:37:46 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:37:46 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:46 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:37:56 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:37:56 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:37:56 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:37:56 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:37:56 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:06 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:06 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:06 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:06 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:06 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:06 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:06 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[{"update_id":816793231,
"message":{"message_id":764,"from":{"id":13363079,"first_name":"Banane","username":"Banane"},"chat":{"id":13363079,"first_name":"Banane","username":"Banane","type":"private"},"date":1444484286,"text":"#2"}}]}:
2015.10.10 15:38:06 5: UpdatePoll myfhemBot: number of results 1
2015.10.10 15:38:06 5: UpdatePoll myfhemBot: parse result
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:38:06 4: TelegramBot_ContactUpdate # Contacts in hash before :2:
2015.10.10 15:38:06 4: TelegramBot_ContactUpdate # Contacts in hash after :2:
2015.10.10 15:38:06 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:38:06 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:38:06 5: TelegramBot_checkAllowedPeer myfhemBot: called with 13363079
2015.10.10 15:38:06 5: TelegramBot_SentFavorites cmd correct peer
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:38:06 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:38:06 5: TelegramBot_ExecuteCommand final cmd for analyze :aussen1:
2015.10.10 15:38:07 5: TelegramBot_ExecuteCommand result for analyze :OWMULTI: OWX_26_A2D984000007.reading => humidity:  90.6 % (T:   8.8 °C):
2015.10.10 15:38:07 5: TelegramBot_ExecuteCommand myfhemBot: TelegramBot fhem cmd :aussen1: result :OWMULTI: OWX_26_A2D984000007.reading => humidity:  90.6 % (T:   8.8 °C)::
2015.10.10 15:38:07 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:38:07 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( messageTo )
2015.10.10 15:38:07 4: TelegramBot_Set myfhemBot: start message send
2015.10.10 15:38:07 5: TelegramBot_SendIt myfhemBot: called
2015.10.10 15:38:07 3: TelegramBot_SendIt myfhemBot: add send to queue :13363079: -:TelegramBot fhem cmd :aussen1: result :OWMULTI: OWX_26_A2D984000007.reading => humidity: 90.6 % (T: 8.8 °C):: - :<undef>:
2015.10.10 15:38:07 5: TelegramBot_Set myfhemBot: messageTo done succesful:
2015.10.10 15:38:07 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:38:07 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:38:07 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:07 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:17 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:17 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:17 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:17 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:17 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:26 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:38:26 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:38:26 5: TelegramBot_Get myfhemBot: called
2015.10.10 15:38:26 5: TelegramBot_Get myfhemBot: Processing TelegramBot_Get( ? )
2015.10.10 15:38:28 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:28 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:28 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:28 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:28 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:39 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:39 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:39 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:39 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:39 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:49 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:49 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:49 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:49 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:49 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:38:59 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:38:59 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:38:59 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:38:59 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:38:59 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:39:09 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:39:09 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:39:09 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:39:09 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:39:09 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:39:19 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:39:19 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:39:19 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:39:19 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:39:19 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:39:30 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:39:30 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:39:30 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:39:30 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:39:30 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:39:40 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:39:40 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:39:40 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:39:40 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:39:40 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:39:50 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:39:50 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:39:50 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:39:50 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:39:50 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:00 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:00 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:00 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:00 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:00 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:10 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:10 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:10 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:10 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:10 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:20 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:20 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:20 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:20 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:20 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:31 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:31 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:31 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:31 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:31 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:41 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:41 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:41 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:41 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:41 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:40:51 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:40:51 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:40:51 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:40:51 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:40:51 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:01 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:01 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:41:01 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:41:01 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:01 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:11 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:11 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:41:11 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:41:11 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:11 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:22 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:22 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:41:22 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:41:22 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:22 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:32 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:32 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:41:32 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:41:32 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:32 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:43 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:43 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[]}:
2015.10.10 15:41:43 5: UpdatePoll myfhemBot: number of results 0
2015.10.10 15:41:43 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:43 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling
2015.10.10 15:41:44 5: TelegramBot_Callback myfhemBot: called from Polling
2015.10.10 15:41:44 5: TelegramBot_ParseUpdate myfhemBot: data returned :{"ok":true,"result":[{"update_id":816793232,
"message":{"message_id":765,"from":{"id":13363079,"first_name":"Banane","username":"Banane"},"chat":{"id":13363079,"first_name":"Banane","username":"Banane","type":"private"},"date":1444484504,"text":"\/hey"}}]}:
2015.10.10 15:41:44 5: UpdatePoll myfhemBot: number of results 1
2015.10.10 15:41:44 5: UpdatePoll myfhemBot: parse result
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:41:44 4: TelegramBot_ContactUpdate # Contacts in hash before :2:
2015.10.10 15:41:44 4: TelegramBot_ContactUpdate # Contacts in hash after :2:
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:41:44 5: TelegramBot_checkAllowedPeer myfhemBot: called with 13363079
2015.10.10 15:41:44 3: TelegramBot_ReadHandleCommand myfhemBot: cmd found ::
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:41:44 5: TelegramBot_ReadHandleCommand cmd correct peer
2015.10.10 15:41:44 5: TelegramBot_ReadHandleCommand final cmd for analyze ::
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # Contacts is 1xxxxxxx9:Banane:@Banane:
2015.10.10 15:41:44 4: TelegramBot_GetFullnameForContact # name is Banane
2015.10.10 15:41:44 5: TelegramBot_ExecuteCommand final cmd for analyze ::
2015.10.10 15:41:44 5: TelegramBot_ExecuteCommand result for analyze :<undef>:
2015.10.10 15:41:44 5: TelegramBot_ExecuteCommand myfhemBot: TelegramBot fhem cmd :: result OK:
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( messageTo )
2015.10.10 15:41:44 4: TelegramBot_Set myfhemBot: start message send
2015.10.10 15:41:44 5: TelegramBot_SendIt myfhemBot: called
2015.10.10 15:41:44 3: TelegramBot_SendIt myfhemBot: add send to queue :13363079: -:TelegramBot fhem cmd :: result OK: - :<undef>:
2015.10.10 15:41:44 5: TelegramBot_Set myfhemBot: messageTo done succesful:
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: called
2015.10.10 15:41:44 3: TelegramBot_Set myfhemBot: Processing TelegramBot_Set( ? )
2015.10.10 15:41:44 5: TelegramBot_UpdatePoll myfhemBot: called
2015.10.10 15:41:44 5: TelegramBot_Callback myfhemBot: resulted in :SUCCESS: from Polling

CFG von TelegramBot schaut so aus

define myBot TelegramBot 1xxxxxxxxx5:Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxk # :)
attr myBot cmdFavorites #
attr myBot cmdKeyword /hey
attr myBot cmdRestrictedPeer 1xxxxxxxxx9 3xxxxxxxx6
attr myBot cmdSentCommands /last cmd
attr myBot defaultPeer @Banane
attr myBot favorites aussen;;aussen1;;buero;;buero1;;get OWX_26_ECC2A1010000 reading;;get OWX_28_736020050000 temperature;;get OWX_28_60BFC3040000 temperature;;get FIRMATA firmware;;get OWio2 devices;;get OWio3 devices;;get OWio5 devices;;get OWio6 devices;;get OWio7 devices;;get OWX_1D_A2D984000002 counters
attr myBot pollingTimeout 10
attr myBot room Ereignisse,System
attr myBot verbose 5


Antwort kommt keine an !?
Irgend welche Einträge zusätzlich erforderlich?

Von FHEM aus kann ich nichts verschicken.

Den Verbingungsaufbau zur API sieht man nicht mehr im Log?!

Gruss Gerd

Edit1: Habe beide Notifys entfernt. Danach funktioniert der Bot wieder?!

viegener

Hallo Gerd,
aus dem Logfile ist ersichtlich, dass Deine Kommandos eingehen und die Antworten in die Queue gestellt werden. Insofern ist an der Konfiguration soweit alles in Ordnung. Ich vermute, dass nochmal wie schon vorher irgendetwas in der Kommunikation schiefgelaufen ist. Wie vorher schonmal beschrieben gibt es für den Fall gibt es das set-Kommando "reset".

Mach doch bitte mal

set <telegrambotdevice> reset

Danach sollte es wiedergehen.

Nochmals: Das Verhalten hat wohl nichts mit den Notifys oder den Log-Meldungen zu tun.

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

Maista

Hallo Johannes,

okay, bin hier grad an 1Wire testen.
Werde es dann bald noch mal probieren.
Hab die Notifys deaktiviert und dann läuft das neue PM aber.

Ich melde mich wieder.

Gruss Gerd

speex

Hallöchen zusammen,

ich wollte mich auch mal mit telegram beschäftigen.

Ich würde gerne den Telegrambot einsetzen allerdings gelingt mir die Inbetriebnahme nicht. Ich habe die Dateien aus Github geladen und 50_TelegramBot sowie HTTPutil und testHTTPutil nach opt/fhem/FHEM/ kpoiert rechte gesetzt und fhem neugestartet allerdings erscheint bei mir kein Eintrag in der Commandref, liegt hier schon der fehler wo finde ich den die entsprechende Dokumentation?

Dann habe ich zusätzlich noch das 70_telegram modul dazu kopiert und entsprechend die rechte gesetzt allerdings tut sich auch da nichts.

Der tipp von Maista zum erzeugen des Hilfe eintrags von Seite 8, funktioniert bei mir leider nicht.
perl contrib/commandref_join.pl
Der Befehl wirft immer folgende Fehlermeldung:
Unknown command perl, try help.


viegener

Zitat von: Maista am 10 Oktober 2015, 21:54:52
Hallo Johannes,

okay, bin hier grad an 1Wire testen.
Werde es dann bald noch mal probieren.
Hab die Notifys deaktiviert und dann läuft das neue PM aber.

Ich melde mich wieder.

Gruss Gerd

Hallo Gerd,
ich habe die Fehlerbehandlung überarbeitet, damit sollte das Verhalten bei Dir stabiler werden. Es gibt jetzt auch weniger Laufzeitabhängigkeiten. Bitte damit nochmal probieren.
Version ist in github und auch im ersten Post angehängt.
Gruss,
Johannes
Kein Support über PM - Anfragen gerne im Forum - Damit auch andere profitieren und helfen können

viegener

Zitat von: speex am 11 Oktober 2015, 14:52:12
Hallöchen zusammen,

ich wollte mich auch mal mit telegram beschäftigen.

Ich würde gerne den Telegrambot einsetzen allerdings gelingt mir die Inbetriebnahme nicht. Ich habe die Dateien aus Github geladen und 50_TelegramBot sowie HTTPutil und testHTTPutil nach opt/fhem/FHEM/ kpoiert rechte gesetzt und fhem neugestartet allerdings erscheint bei mir kein Eintrag in der Commandref, liegt hier schon der fehler wo finde ich den die entsprechende Dokumentation?

Dann habe ich zusätzlich noch das 70_telegram modul dazu kopiert und entsprechend die rechte gesetzt allerdings tut sich auch da nichts.

Der tipp von Maista zum erzeugen des Hilfe eintrags von Seite 8, funktioniert bei mir leider nicht.
perl contrib/commandref_join.pl
Der Befehl wirft immer folgende Fehlermeldung:
Unknown command perl, try help.

Hallo speex,
Die Doku wird nur dann ins Commandref aufgenommen, wenn man den obigen Befehl eingibt, allerdings ist das kein FHEM-Befehl sondern ein Kommandozeilenbefehl (Shell-Befehl). Also entweder auf der shell als fhem-Benutzer anmelden oder das Kommand in " einschliessen. Am besten dazu mal in der commandref unter: "FHEM Befehlstypen" nachschauen.

Ansonsten musst Du zuerst einen Device erzeugen, das geht bei telegrambot relativ einfach durch Angabe des authtokens, dass Du vom Botfather bekommst --> siehe telegram webseite

Also z.B. so:

define teleBot TelegramBot 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw

Allerdings musst Du natürlich in der Definition DEIN authtoken verwenden.

Sobald Du das Device hast, kannst Du in fhemweb über Devce pecific help auch direkt auf die Doku zugreifen.

Achso: 70_Telegram ist nicht erforderlich wenn Du den Bot verwenden willst.

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

UweH

Moin Moin,

ich benutze weiterhin den TelegramBot und bisher funktioniert alles - zumindest das, was ich verstanden habe - bis auf...
1. ich hab's wahrscheinlich irgendwo überlesen...wie schicke ich eine Nachricht an mehrere Empfänger?
2. cmdFavorites und favorites <list of commands> verstehe ich nicht. Könnte ich da vielleicht ein verständliches Beispiel bekommen?

Danke und Gruß
Uwe

viegener

Zitat von: UweH am 11 Oktober 2015, 18:58:56
ich benutze weiterhin den TelegramBot und bisher funktioniert alles - zumindest das, was ich verstanden habe - bis auf...
1. ich hab's wahrscheinlich irgendwo überlesen...wie schicke ich eine Nachricht an mehrere Empfänger?
2. cmdFavorites und favorites <list of commands> verstehe ich nicht. Könnte ich da vielleicht ein verständliches Beispiel bekommen?
zu 1) Momentan kann man den bot zwar in eine Gruppe packen und damit auch eine Nachricht an einen Gruppe mit dem Bot senden, aber eine Gruppe kann man bisher in meinem Modul noch nicht angeben. Da muss ich erst noch ein paar Experimente mit dem API machen, denn die Gruppen-ID kommt nicht da an, wo sie meiner Meinung nach sollte.

Also heutiger Workaround, mehrere Befehle hintereinander abschicken, ich nehme mal die Liste von IDs auf meine Todo-Liste. Allerdings gibt das Bot-API dass nicht her, so dass ich das dann in meinem Modul als mehrere getrennte Operationen realisieren.

zu 2) Für die Favoriten schreibe ich mal noch ein Beispiel auf

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

Maista

Hallo Johannes,

beim Kurztest hat sich am Verhalten nichts geändert.
Das Notify zum shutdown restart wurde nicht gesendet.
Ich habe dann, wie von Dir vorgeschlagen, ein Reset gemacht.
Danach konnte ich dann auch wieder ein Befehl an den Bot schicken.

Aber probiere ich noch mal genauer.
Mal schauen wann ich dazu komme.

Bis dahin , schönen Sonntag

Gerd

UweH


viegener

Zitat von: UweH am 11 Oktober 2015, 18:58:56
2. cmdFavorites und favorites <list of commands> verstehe ich nicht. Könnte ich da vielleicht ein verständliches Beispiel bekommen?

Ich habe endlich mal die Seite im fhemwiki für den TelegramBot erzeugt. Dabei habe ich auch ein paar Beispiele hinzugefügt:

http://www.fhemwiki.de/wiki/TelegramBot

Ein Beispiel befasst sich relativ ausführlich (für meine Verhältnisse) mit den Favoriten. Vielleicht hilft das weiter.

Feedback zum wiki und Vorschläge für weiterer Beispiele (oder selber schreiben?) ist erwünscht.

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

UweH


speex

#163
Hallo vielen Dank für den Wiki Eintrag, dennoch ist mir die einrichtung noch nicht korrekt gelungen.

EDIT. wer lesen kann ist klar im vorteil habe mich irgendwie bei dem pollingtimeout attribut verlesen bishierhin hat es jetzt geklappt werde weiter rum basteln, und berichten :)

UweH

Ha, wollte Dir gerade antworten...an der Stelle hab ich auch zuerst das >0 überlesen...  ;D

Gruß
Uwe