Hallo,
habe den Aufruf
get <device> tr064Command WANIPConnection:1 wanipconnection1 ForceTermination
in der myutils.pm untergebracht.
Erhalte aber trotz erfolgreicher Ausführung ein eMeldung im log-File
Service='WANIPConnection:1' Control='wanipconnection1' Action='ForceTermination'
----------------------------------------------------------------------
$VAR1 = {
'UPnPError' => {
'errorDescription' => 'DisconnectInProgress',
'errorCode' => '707'
}
};
Warum ? Wird der Befehl von der FB mehrmals ausgeführt ?
get Fritzboxl luaFunction internet/inetstat_monitor.lua?myXhr=1&action=disconnect&useajax=1&xhr=1
Unknown argument luaFunction
Ist Dein FHEM aktuell?
Ja, habe aber nur "get ... luaQuery"
installier mal den Fritzbox fork von Wernieman.
https://forum.fhem.de/index.php/topic,118150.msg1125692.html#msg1125692
Fand ich toll, wollte aber warten, bis die beiden Module zusammen geführt werden. Trotzdem danke
@juergen012
Danke für die Blumen, aber es ist nicht von mir ....
sorry, mein Fehler! Trotzdem Super!
Habe den obigen Aufruf per AT ausführen lassen.
Auszug log:
2022.09.12 23:55:00 3: FRITZBOX: get AVMRouter tr064Command WANIPConnection:1 wanipconnection1 ForceTermination
2022.09.12 23:55:00 2: FRITZBOX AVMRouter: TR064_Cmd.4322 TR064-Error 707:DisconnectInProgress (service='WANIPConnection:1', control='wanipconnection1', action='ForceTermination')
2022.09.12 23:55:00 3: get AVMRouter tr064Command WANIPConnection:1 wanipconnection1 ForceTermination : Service='WANIPConnection:1' Control='wanipconnection1' Action='ForceTermination'
----------------------------------------------------------------------
$VAR1 = {
'UPnPError' => {
'errorCode' => '707',
'errorDescription' => 'DisconnectInProgress'
}
};
2022.09.12 23:55:00 3: FBreconnect: Service='WANIPConnection:1' Control='wanipconnection1' Action='ForceTermination'
----------------------------------------------------------------------
$VAR1 = {
'UPnPError' => {
'errorCode' => '707',
'errorDescription' => 'DisconnectInProgress'
}
};
FB hat sich neu verbunden, neue IP, aber log-Einträge
Der Aufruf steht im WiKi ... ???
Versuch mal eine '1' an as get <device> tr064Command WANIPConnection:1 wanipconnection1 ForceTermination anzuhängen, wie hier von Otto123 beschrieben:
https://forum.fhem.de/index.php/topic,118150.msg1165509.html#msg1165509, also {fhem('get <device> tr064Command WANIPConnection:1 wanipconnection1 ForceTermination',1)}
dann sollte der Logeintrag weg sein.
Leider immer noch ein Eintrag im log: :-[
sub FritzBox_reconnect() {
fhem("get AVMRouter tr064Command WANIPConnection:1 wanipconnection1 ForceTermination",1);
}
2022.09.15 09:22:17 2: FRITZBOX AVMRouter: TR064_Cmd.4322 TR064-Error 707:DisconnectInProgress (service='WANIPConnection:1', control='wanipconnection1', action='ForceTermination')
2022.09.15 09:22:17 3: FBreconnect: Service='WANIPConnection:1' Control='wanipconnection1' Action='ForceTermination'
----------------------------------------------------------------------
$VAR1 = {
'UPnPError' => {
'errorDescription' => 'DisconnectInProgress',
'errorCode' => '707'
}
};
Keiner der sich sehr gut auskennt hier ? :-\
Zitat von: R2D2_ am 12 September 2022, 09:21:00
Warum ? Wird der Befehl von der FB mehrmals ausgeführt ?
ich meine deine eingehende Vermutung stimmt. Ich kann derzeit nicht testen, aber ich meine ich habe das schon probiert. Du bekommst ja eine Fehlermeldung und keine einfache Quittung. Am Montag kann ich das mal versuchen nachzuvollziehen.
Gruß Otto
@otto123: Gibt's was neues ?
Hi R2D2_,
ich bekomme die gleiche Meldung / Rückgabe wie Du :'(
Das Ganze ist wahrscheinlich eher eine informelle Ausgabe (DisconnectInProgress) aber in Form eines Fehlers: TR064_Cmd.4322 TR064-Error 707:DisconnectInProgress - damit meldet dies das FHEM Modul auf alle Fälle mit Level 2
Die Response könnte man unterdrücken, aber die Level 2 Meldung bleibt:
sub FritzBox_reconnect() {
my $resp=fhem("get AVMRouter tr064Command WANIPConnection:1 wanipconnection1 ForceTermination",1);
return "";
}
Ich habe es mal mit curl probiert (hab ich von hier (https://wiki.ubuntuusers.de/FritzBox/Skripte/)) - Du musst deine IP Adresse der Box eintragen (oder fritz.box):
curl "http://192.168.90.1:49000/igdupnp/control/WANIPConn1" -sH "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:ForceTermination xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>" 2>&1> /dev/null
Das liefert keine Ausgabe. Ist für die Fragestellung erstmal nur ein Würgaround ;) aber für deine Sub vielleicht egal?
Den Router könntest Du so aus FHEM auslesen und die Ausgabe mit qx() unterdrücken:
Auf die Schnelle probiert
sub FritzBox_reconnect() {
my $Router=InternalVal('AVMRouter','HOST','192.168.178.1');
my $resp=qx(curl "http://$Router:49000/igdupnp/control/WANIPConn1" -sH "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination" -d "<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:ForceTermination xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>");
return '';
}
Das könnte aber FHEM blockieren, wahrscheinlich besser ein Shell Script oder den curl Aufruf mit FHEM GetFileFromURL () - je nach dem was Dir mehr liegt.
Gruß Otto