FRITZBOX - Fritz!Box und Fritz!Fon sprechen - Jetzt auch ohne Telnet

Begonnen von tupol, 28 November 2014, 23:46:54

Vorheriges Thema - Nächstes Thema

nephdrasil

Hallo in die Runde,

ich bekomme das Modul nicht zum laufen.

Problem ist state bringt immer nur Old SID not valid anymore

Internals:
   APICHECKED 1
   HOST       fritz.box
   INTERVAL   300
   LUAQUERY   1
   M3U_LOCAL  ./www/images/FritzBox.m3u
   M3U_URL    http://192.168.178.24:8084/fhem/images/FritzBox.m3u
   NAME       FritzBox
   NR         99
   REMOTE     1
   SECPORT    49443
   STATE      Old SID not valid anymore.
   TELNET     0
   TR064      1
   TYPE       FRITZBOX
   WEBCM      0
   Readings:
     2016-10-27 16:07:35   box_fwVersion   113.06.60
     2016-10-27 16:07:35   box_model       FRITZ!Box 7490 [avm]
     2016-10-27 16:07:45   lastReadout     Old SID not valid anymore.
     2016-10-27 16:07:45   state           Old SID not valid anymore.
   Fhem:
     LOCAL      0
     definedHost undefined
     is_double_wlan -1
     lastHour   0
     modulVersion $Date: 2016-09-29 20:30:14 +0200 (Thu, 29 Sep 2016) $
     sidTime    0
   Helper:
     TimerCmd   FritzBox.Cmd
     TimerReadout FritzBox.Readout
Attributes:
   allowTR064Command 1
   verbose    5 


2016.10.27 16:07:45 2: FRITZBOX FritzBox: Readout_Run_Web.1320 Error: Old SID not valid anymore.
2016.10.27 16:10:11 3: FRITZBOX: set FritzBox checkAPIs
2016.10.27 16:10:11 4: FRITZBOX FritzBox: Readout_Start.671 Fork process FRITZBOX_API_Check_Run
2016.10.27 16:10:11 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->REMOTE: 1
2016.10.27 16:10:11 4: FRITZBOX FritzBox: API_Check_Run.720 FRITZBOX modul runs in remote mode.
2016.10.27 16:10:11 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->WEBCM: 0
2016.10.27 16:10:11 4: FRITZBOX FritzBox: API_Check_Run.740 API webcm does not exist (404 Not Found)
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->LUAQUERY: 1
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.748 API luaQuery found (200).
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->TR064: 1
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.764 API TR-064 found.
2016.10.27 16:10:12 4: FRITZBOX FritzBox: TR064_Init.4295 Open TR-064 connection and ask for security port
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->SECPORT: 49443
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.769 TR-064-SecurePort is 49443.
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.791 Created m3u file './www/images/FritzBox.m3u'.
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->M3U_LOCAL: ./www/images/FritzBox.m3u
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.799 Try to get my IP address.
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.805 Try to get a FHEMWEB port.
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.817 Try to get 'http://192.168.178.24:8084/fhem/images/FritzBox.m3u'
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->M3U_URL: http://192.168.178.24:8084/fhem/images/FritzBox.m3u
2016.10.27 16:10:12 5: FRITZBOX FritzBox: API_Check_Run.832 Read 'jason_boxinfo'
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 box_model: FRITZ!Box 7490
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 box_oem: avm
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 box_fwVersion: 113.06.60
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->TELNET: 0
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.887 Could not open telnet connection to fritz.box: Verbindungsaufbau abgelehnt
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Add_Reading.1872 ->APICHECKED: 1
2016.10.27 16:10:12 4: FRITZBOX FritzBox: API_Check_Run.901 Captured 14 values
2016.10.27 16:10:12 5: FRITZBOX FritzBox: API_Check_Run.902 Handover to main process (263): ->REMOTE|1|->WEBCM|0|->LUAQUERY|1|->TR064|1|->SECPORT|49443|->M3U_LOCAL|./www/images/FritzBox.m3u|->M3U_URL|http://192.168.178.24:8084/fhem/images/FritzBox.m3u|box_model|FRITZ!Box 7490|box_oem|avm|box_fwVersion|113.06.60|->TELNET|0|->APICHECKED|1|readoutTime|0.60
2016.10.27 16:10:12 4: FRITZBOX FritzBox: Readout_Done.1597 Back at main process
2016.10.27 16:10:12 4: FRITZBOX FritzBox: Readout_Process.1619 Processing 13 readouts.
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Process.1693 SET box_model = 'FRITZ!Box 7490 [avm]'
2016.10.27 16:10:12 5: FRITZBOX FritzBox: Readout_Process.1693 SET box_fwVersion = '113.06.60'
2016.10.27 16:10:12 4: FRITZBOX FritzBox: Readout_Process.1743 13 values captured in 0.60 s
2016.10.27 16:10:16 3: FRITZBOX: set FritzBox update
2016.10.27 16:10:16 4: FRITZBOX FritzBox: Readout_Start.671 Fork process FRITZBOX_Readout_Run_Web
2016.10.27 16:10:16 4: FRITZBOX FritzBox: Readout_Run_Web.1253 Prepare query string for luaQuery.
2016.10.27 16:10:16 5: FRITZBOX FritzBox: readPassword.4557 Read FritzBox password from file
2016.10.27 16:10:16 4: FRITZBOX FritzBox: Web_OpenCon.4350 Open Web connection to fritz.box
2016.10.27 16:10:16 4: FRITZBOX FritzBox: Web_OpenCon.4354 Web session opened with 241bcf63eb431f87
2016.10.27 16:10:16 5: FRITZBOX FritzBox: Web_Query.4473 Request data via API luaQuery.
2016.10.27 16:10:17 5: FRITZBOX FritzBox: Web_Query.4481 Response: 200 OK
{
"pid": "logout"
}
2016.10.27 16:10:17 2: FRITZBOX FritzBox: Readout_Run_Web.1320 Error: Old SID not valid anymore.
2016.10.27 16:10:17 4: FRITZBOX FritzBox: Readout_Done.1597 Back at main process
2016.10.27 16:10:17 4: FRITZBOX FritzBox: Readout_Process.1619 Processing 2 readouts.
2016.10.27 16:10:17 4: FRITZBOX FritzBox: Readout_Process.1628 Reset SID


Ich habe mal ein List und ein log angehängt. Vielleicht kann mir jemand helfen.

Danke im Voraus.
FHEM 5.5 + Fritz Box 7390 + HM-CFG-USB + HM-CC-RT-DN

tupol

Hast Du evtl. einen User angegeben? Bei einigen hatte der User nicht ausreichend Rechte.
Eigentlich scheint alles sauber zu laufen. Du kriegst eine frische sid aber dann wird sie plötzlich doch nicht akzeptiert. Seltsam.

nephdrasil

Nein ich habe keinen User angegeben bzw. angelegt. Nur ein Passwort.

Wenn ich einen User anlege bekomme ich Didn't get a session ID.


FHEM 5.5 + Fritz Box 7390 + HM-CFG-USB + HM-CC-RT-DN

nephdrasil

So habe die FritzBox auf Werkseinstellungen zurückgesetzt jetzt geht es
FHEM 5.5 + Fritz Box 7390 + HM-CFG-USB + HM-CC-RT-DN

blackbite

Hallo zusammen,
kann mir bitte jemand auf die Sprünge helfen...
Ich habe das Modul nun nach Studen der Suche am Laufen, aber:

das Reading für M3U_URL bleibt auf unknown, da ich den Zugriff auf FHEMWEB mit User + Kennwort eingestellt habe. Der Standardpfad für die M3U-Datei ist bei mir ./www/images/FritzBox.m3u.
Das FritzFon kann aber die Datei nicht abspielen - klar wegen attr allowed_WEB basicAuth *****.
Wenn ich die basicAuth rausnehme, kommt das FritzFon an die m3u-Datei und kann diese natürlich auch abspielen. Auch über set FRITZBOX ring 610 8 say:Hallo klappt dann alles.
Frage daher: wie kann ich den Zugriff auf die M3U-Datei in FHEM erlauben, ohne die Authentifizierung abschalten zu müssen? Etwa eine weitere Web-Instanz ohne auth?

Danke für Eure Hilfe!

VG
Blackbite
Blackbite


blackbite

Blackbite

tupol

Aufgrund der Beschränkungen von FHEMWEB ist es empfehlenswert, die Datei über das Attribute m3uFileLocal selber vorzugeben. Am besten auf einem Webserver, der auf dem FHEM-Server läuft und dessen Seiten-Verzeichnis durch FHEM beschreibbar ist.
attr Fritzbox m3uFileLocal /var/www/mp3/Fritzbox.m3u

blackbite

Das Attribut hab ich natürlich mitgegeben, aber außer den FHEMWEB-Inststanzen auf Port 8083 8084 und 8085 hab ich sonst nichts mehr laufen auf dem RPI. Einen eigenen Webserver nur für das eine Modul...?
Blackbite

tupol


blackbite

Na dann muss ich mich wohl mal mit Lighttpd vertraut machen. Ich hatte zum Test mal eine weitere Web-Instanz in FHEM auf Port 8086 in die fhem.cfg gepflanzt und diesen Port ohne Auth. und auf readonly gesetzt (mit allowed-commands=blank). Das hat zwar funktioniert, ist aber vielleicht nicht die saubere Art. Würdest Du mir zu Lighttpd oder zu etwas anderem raten. Apache wäre für das kleine Vorhaben sicher übertrieben.

Nochmals Danke und Grüße
Blackbite
Blackbite

tupol


blackbite

Ok, danke.
Ich werd mich wohl auch mal einreihen in die Feature Request Liste für die Erweiterung der TR.064 Befehle bei AVM. Die Welt könnte ja so einfach sein...

Grüße
Blackbite
Blackbite

Bartimaus

Hallo,

danke für das tolle Modul. Es läuft bei mir auf einer UnitymediaFB 6490.

Gibt es eigentlich was neues in Sachen "Kindersicherung" ? Ich habe verschiedene Profile für meine Jungs angelegt, die ich gerne automatisch per FHEM und Schulferienkalender umstellen möchte. Ich habe in diesem Fred nur auf Seite 38 etwas hierzu gefunden.

LG
LG
B.


FHEM@AMD-Ryzen7-5700U@Debian-LXC (ProxmoxHOST), CUL1101,FS20,IT,DS18B20,DS2413(Heizungslogger),DS2423(Stromlogger)Homematic,HM-LAN,ZWave,MiniCULs,Shelly

tupol

Leider nein. AVM hat die Box dicht gemacht und TR064 hat nur sehr rudimentäre Funktionalitäten. AVM hat kein Interesse an einer Community wie uns.