Hallo Fritzbox-Experten,
ich probiere mit einem Pythonscript über die TR-64 Schnittstelle die Anruferliste auszulesen.
Das Script schreibt alles mögliche in eine Logdatei. Meine Vermutung aber nicht wissen ist, dass der Aufruf zum Abruf der URL in der dann die Anruferliste drinsteht
nicht mit Port 80 sondern auch mit Port 49000 gemacht werden muss.
Wirklich wissen tue ich es nicht. Und ich wüsste auch nicht was ich im Code ändern müsste um den Port auf 49000 zu ändern.
Bei meiner Internetrecherche habe ich nur uralt Artikel (2013 ) dazu gefunden.
Kennt jemand ein funktionierendes Script das mit aktuellem FritzOS 8.03 funktioniert?
Kann mir jemand sagen was ich an meinem Pythonscript ändern müsste um es ans laufen zu bringen?
Hier ist die Ausgabe aus der Logdatei:
Das Pythonscript verursachte den Fehler mehr als 10000 Zeichen.
Versuche es als TXT anzuhängen
Hier links zur Doku der TR-64-API
TR-64 API Übersicht
Erste Schritte
ich probiere mit einem Pythonscript über die TR-64 Schnittstelle die Anruferliste auszulesen.
Das Script schreibt alles mögliche in eine Logdatei. Meine Vermutung aber nicht wissen ist, dass der Aufruf zum Abruf der URL in der dann die Anruferliste drinsteht
nicht mit Port 80 sondern auch mit Port 49000 gemacht werden muss.
Wirklich wissen tue ich es nicht. Und ich wüsste auch nicht was ich im Code ändern müsste um den Port auf 49000 zu ändern.
Bei meiner Internetrecherche habe ich nur uralt Artikel (2013 ) dazu gefunden.
Kennt jemand ein funktionierendes Script das mit aktuellem FritzOS 8.03 funktioniert?
Kann mir jemand sagen was ich an meinem Pythonscript ändern müsste um es ans laufen zu bringen?
Hier ist die Ausgabe aus der Logdatei:
Code:
2025-08-08 09:49:11 - INFO - === Script Start ===
2025-08-08 09:49:11 - DEBUG - Starting new HTTP connection (1): 192.168.178.1:49000
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /igddesc.xml HTTP/1.1" 200 3475
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /tr64desc.xml HTTP/1.1" 200 13825
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /any.xml HTTP/1.1" 200 293
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /igdicfgSCPD.xml HTTP/1.1" 200 9433
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /igddslSCPD.xml HTTP/1.1" 200 4130
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /igdconnSCPD.xml HTTP/1.1" 200 14813
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /igd2ipv6fwcSCPD.xml HTTP/1.1" 200 5426
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /deviceinfoSCPD.xml HTTP/1.1" 200 4339
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /deviceconfigSCPD.xml HTTP/1.1" 200 5864
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /layer3forwardingSCPD.xml HTTP/1.1" 200 7947
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /lanconfigsecuritySCPD.xml HTTP/1.1" 200 3975
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /mgmsrvSCPD.xml HTTP/1.1" 200 6016
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /timeSCPD.xml HTTP/1.1" 200 2863
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /userifSCPD.xml HTTP/1.1" 200 9657
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_storageSCPD.xml HTTP/1.1" 200 4580
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_webdavSCPD.xml HTTP/1.1" 200 2047
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_upnpSCPD.xml HTTP/1.1" 200 1150
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_speedtestSCPD.xml HTTP/1.1" 200 4861
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_remoteSCPD.xml HTTP/1.1" 200 6804
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_myfritzSCPD.xml HTTP/1.1" 200 7583
2025-08-08 09:49:11 - DEBUG - http://192.168.178.1:49000 "GET /x_voipSCPD.xml HTTP/1.1" 200 35952
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_contactSCPD.xml HTTP/1.1" 200 18626
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_dectSCPD.xml HTTP/1.1" 200 4101
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_tamSCPD.xml HTTP/1.1" 200 5229
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_appsetupSCPD.xml HTTP/1.1" 200 22136
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_homeautoSCPD.xml HTTP/1.1" 200 16925
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_homeplugSCPD.xml HTTP/1.1" 200 3479
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_filelinksSCPD.xml HTTP/1.1" 200 6210
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_authSCPD.xml HTTP/1.1" 200 1805
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_hostfilterSCPD.xml HTTP/1.1" 200 2463
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_mediaSCPD.xml HTTP/1.1" 200 2751
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /x_uspcontrollerSCPD.xml HTTP/1.1" 200 14995
2025-08-08 09:49:12 - DEBUG - http://192.168.178.1:49000 "GET /wlanconfigSCPD.xml HTTP/1.1" 200 33192
2025-08-08 09:49:13 - DEBUG - http://192.168.178.1:49000 "GET /wlanconfigSCPD.xml HTTP/1.1" 200 33192
2025-08-08 09:49:14 - DEBUG - http://192.168.178.1:49000 "GET /wlanconfigSCPD.xml HTTP/1.1" 200 33192
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /hostsSCPD.xml HTTP/1.1" 200 15594
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /ethifconfigSCPD.xml HTTP/1.1" 200 2848
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /lanhostconfigmgmSCPD.xml HTTP/1.1" 200 6255
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /wancommonifconfigSCPD.xml HTTP/1.1" 200 8556
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /x_wanmobileconnSCPD.xml HTTP/1.1" 200 12633
2025-08-08 09:49:15 - DEBUG - http://192.168.178.1:49000 "GET /wanethlinkconfigSCPD.xml HTTP/1.1" 200 548
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:49000 "GET /wanpppconnSCPD.xml HTTP/1.1" 200 21580
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:49000 "GET /wanipconnSCPD.xml HTTP/1.1" 200 15086
2025-08-08 09:49:16 - DEBUG - [get_call_list] FritzConnection Adresse: Unbekannt, Port: Unbekannt
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:49000 "POST /upnp/control/x_contact HTTP/1.1" 401 170
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:49000 "POST /upnp/control/x_contact HTTP/1.1" 200 374
2025-08-08 09:49:16 - DEBUG - API Response GetCallList: {'NewCallListURL': 'http://192.168.178.1:49000/calllist.lua?sid=3298cd430082fcd7'}
2025-08-08 09:49:16 - INFO - Anrufliste wird von URL geladen: http://192.168.178.1:49000/calllist.lua?sid=3298cd430082fcd7
2025-08-08 09:49:16 - DEBUG - [fetch_calllist_from_url_via_fc] FritzConnection verwendet Host: Unbekannt, Port: Unbekannt
2025-08-08 09:49:16 - DEBUG - Pfad: calllist.lua, Query-Parameter: {'sid': '3298cd430082fcd7'}
2025-08-08 09:49:16 - DEBUG - Starting new HTTP connection (1): 192.168.178.1:80
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "GET /login_sid.lua?version=2 HTTP/1.1" 200 None
2025-08-08 09:49:16 - DEBUG - Resetting dropped connection: 192.168.178.1
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "POST /login_sid.lua?version=2 HTTP/1.1" 200 None
2025-08-08 09:49:16 - DEBUG - Resetting dropped connection: 192.168.178.1
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "GET /webservices/homeautoswitch.lua?switchcmd=calllist.lua&ain=sid&sid=484d18a907e4e2f9 HTTP/1.1" 400 0
2025-08-08 09:49:16 - DEBUG - Resetting dropped connection: 192.168.178.1
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "GET /login_sid.lua?version=2 HTTP/1.1" 200 None
2025-08-08 09:49:16 - DEBUG - Resetting dropped connection: 192.168.178.1
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "POST /login_sid.lua?version=2 HTTP/1.1" 200 None
2025-08-08 09:49:16 - DEBUG - Resetting dropped connection: 192.168.178.1
2025-08-08 09:49:16 - DEBUG - http://192.168.178.1:80 "GET /webservices/homeautoswitch.lua?switchcmd=calllist.lua&ain=sid&sid=c58ba5ae2bd05a34 HTTP/1.1" 400 0
2025-08-08 09:49:16 - ERROR - Fehler beim Abrufen der Anrufliste von URL über FritzConnection: Request failed: http error code '400', payload: {'switchcmd': 'calllist.lua', 'ain': {'sid': '3298cd430082fcd7'}, 'sid': 'c58ba5ae2bd05a34'}
2025-08-08 09:49:16 - ERROR - Anrufliste aus der Fritzbox auslesen fehlgeschlagen: Leere oder keine Antwort von der CallList URL
2025-08-08 09:49:16 - INFO - === Script Ende wegen leerer Anrufliste ===
Das Pythonscript verursachte den Fehler mehr als 10000 Zeichen.
Versuche es als TXT anzuhängen
Hier links zur Doku der TR-64-API
TR-64 API Übersicht
Erste Schritte