mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
FRITZBOX: bug fixed, local mode works again
git-svn-id: https://svn.fhem.de/fhem/trunk@7171 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2a914130bf
commit
dee8c77aa4
@ -178,11 +178,11 @@ sub FRITZBOX_Define($$)
|
|||||||
FRITZBOX_Log $hash, 4, "FRITZBOX runs in local mode";
|
FRITZBOX_Log $hash, 4, "FRITZBOX runs in local mode";
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{STATE} = "Initializing";
|
$hash->{STATE} = "Initializing";
|
||||||
$hash->{fhem}{modulVersion} = '$Date$';
|
$hash->{fhem}{modulVersion} = '$Date$';
|
||||||
$hash->{INTERVAL} = 300;
|
$hash->{INTERVAL} = 300;
|
||||||
$hash->{fhem}{lastHour} = 0;
|
$hash->{fhem}{lastHour} = 0;
|
||||||
$hash->{fhem}{LOCAL} = 0;
|
$hash->{fhem}{LOCAL} = 0;
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
# Get first data after 6 seconds
|
# Get first data after 6 seconds
|
||||||
@ -433,14 +433,16 @@ FRITZBOX_Readout_Run($)
|
|||||||
|
|
||||||
my $returnStr = "$name|";
|
my $returnStr = "$name|";
|
||||||
|
|
||||||
$result = FRITZBOX_Telnet_Open( $hash );
|
if ($hash->{REMOTE})
|
||||||
if ($result)
|
|
||||||
{
|
{
|
||||||
$returnStr .= "Error|".$result;
|
$result = FRITZBOX_Telnet_Open( $hash );
|
||||||
return $returnStr;
|
if ($result)
|
||||||
|
{
|
||||||
|
$returnStr .= "Error|".$result;
|
||||||
|
return $returnStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($slowRun == 1)
|
if ($slowRun == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -636,7 +638,8 @@ FRITZBOX_Readout_Run($)
|
|||||||
$returnStr .= "|readoutTime|";
|
$returnStr .= "|readoutTime|";
|
||||||
$returnStr .= sprintf "%.2f", time()-$startTime;
|
$returnStr .= sprintf "%.2f", time()-$startTime;
|
||||||
|
|
||||||
FRITZBOX_Telnet_Close ( $hash );
|
FRITZBOX_Telnet_Close ( $hash )
|
||||||
|
if $hash->{REMOTE};
|
||||||
|
|
||||||
return $returnStr
|
return $returnStr
|
||||||
|
|
||||||
@ -688,7 +691,7 @@ FRITZBOX_Readout_Done($)
|
|||||||
readingsBulkUpdate( $hash, "lastReadout", $msg );
|
readingsBulkUpdate( $hash, "lastReadout", $msg );
|
||||||
FRITZBOX_Log $hash, 4, $msg;
|
FRITZBOX_Log $hash, 4, $msg;
|
||||||
my $newState = "WLAN: ";
|
my $newState = "WLAN: ";
|
||||||
if ($values{box_wlan_2GHz} eq "on" || $values{box_wlan_5GHz} eq "on")
|
if ($values{"box_wlan_2.4GHz"} eq "on" || $values{box_wlan_5GHz} eq "on")
|
||||||
{
|
{
|
||||||
$newState .= "on";
|
$newState .= "on";
|
||||||
}
|
}
|
||||||
@ -912,9 +915,11 @@ FRITZBOX_Ring_Run($)
|
|||||||
$msg =~ s/^msg:\s*//;
|
$msg =~ s/^msg:\s*//;
|
||||||
$msg = substr($msg, 0, 30);
|
$msg = substr($msg, 0, 30);
|
||||||
}
|
}
|
||||||
|
if ($hash->{REMOTE})
|
||||||
|
{
|
||||||
FRITZBOX_Telnet_Open($hash);
|
$result = FRITZBOX_Telnet_Open( $hash );
|
||||||
|
return "$name|0|$result" if $result;
|
||||||
|
}
|
||||||
|
|
||||||
#Preparing 1st command array
|
#Preparing 1st command array
|
||||||
@cmdArray = ();
|
@cmdArray = ();
|
||||||
@ -958,7 +963,8 @@ FRITZBOX_Ring_Run($)
|
|||||||
}
|
}
|
||||||
FRITZBOX_Exec( $hash, \@cmdArray );
|
FRITZBOX_Exec( $hash, \@cmdArray );
|
||||||
|
|
||||||
FRITZBOX_Telnet_Close( $hash );
|
FRITZBOX_Telnet_Close( $hash )
|
||||||
|
if ($hash->{REMOTE});
|
||||||
|
|
||||||
return $name."|1|Ringing done";
|
return $name."|1|Ringing done";
|
||||||
}
|
}
|
||||||
@ -1529,7 +1535,7 @@ sub FRITZBOX_fritztris($)
|
|||||||
<li><b>box_fwVersion</b> - Firmware version of the box, if outdated then '(old)' is appended</li>
|
<li><b>box_fwVersion</b> - Firmware version of the box, if outdated then '(old)' is appended</li>
|
||||||
<li><b>box_guestWlan</b> - Current state of the guest WLAN</li>
|
<li><b>box_guestWlan</b> - Current state of the guest WLAN</li>
|
||||||
<li><b>box_model</b> - Fritz!Box model</li>
|
<li><b>box_model</b> - Fritz!Box model</li>
|
||||||
<li><b>box_wlan_2GHz</b> - Current state of the 2,4 GHz WLAN</li>
|
<li><b>box_wlan_2.4GHz</b> - Current state of the 2.4 GHz WLAN</li>
|
||||||
<li><b>box_wlan_5GHz</b> - Current state of the 5 GHz WLAN</li>
|
<li><b>box_wlan_5GHz</b> - Current state of the 5 GHz WLAN</li>
|
||||||
<li><b>dect</b><i>1</i> - Name of the DECT device <i>1</i></li>
|
<li><b>dect</b><i>1</i> - Name of the DECT device <i>1</i></li>
|
||||||
<li><b>dect</b><i>1</i><b>_alarmRingTone</b> - Alarm ring tone of the DECT device <i>1</i></li>
|
<li><b>dect</b><i>1</i><b>_alarmRingTone</b> - Alarm ring tone of the DECT device <i>1</i></li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user