FRITZBOX: bugfix landevice0

git-svn-id: https://svn.fhem.de/fhem/trunk@11878 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
grompo 2016-08-02 16:15:25 +00:00
parent 509d8b7f7f
commit 97bc02e64d

View File

@ -733,11 +733,11 @@ sub FRITZBOX_API_Check_Run($)
if ($response->is_success) {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "->WEBCM", 1;
FRITZBOX_Log $hash, 4, "API webcm found.";
FRITZBOX_Log $hash, 4, "API webcm found (".$response->code.").";
}
else {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "->WEBCM", 0;
FRITZBOX_Log $hash, 4, "API webcm does not exist: ".$response->status_line;
FRITZBOX_Log $hash, 4, "API webcm does not exist (".$response->status_line.")";
}
# Check if query.lua exists
@ -745,11 +745,15 @@ sub FRITZBOX_API_Check_Run($)
if ($response->is_success) {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "->LUAQUERY", 1;
FRITZBOX_Log $hash, 4, "API luaQuery found.";
FRITZBOX_Log $hash, 4, "API luaQuery found (".$response->code.").";
}
elsif ($response->code eq "500") {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "->LUAQUERY", 1;
FRITZBOX_Log $hash, 4, "API luaQuery found but responded with: ".$response->status_line;
}
else {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, "->LUAQUERY", 0;
FRITZBOX_Log $hash, 4, "API luaQuery does not exist: ".$response->status_line;
FRITZBOX_Log $hash, 4, "API luaQuery does not exist (".$response->status_line.")";
}
# Check if tr064 specification exists and determine TR064-Port
@ -1061,8 +1065,7 @@ sub FRITZBOX_Readout_Run_Shell($)
}
# Assign data of DECT handset to DECT numbers
for (0..$handsetCount)
{
for (0..$handsetCount) {
# 0 Handset FonUser
push @readoutCmdArray, [ "", "ctlmgr_ctl r dect settings/Handset".$_."/User", "" ];
# 1 Handset manufacturer
@ -1412,6 +1415,7 @@ sub FRITZBOX_Readout_Run_Web($)
%landevice = ();
my $wlanCount = 0;
my $gWlanCount = 0;
if ( ref $result->{lanDevice} eq 'ARRAY' ) {
foreach ( @{ $result->{lanDevice} } ) {
my $dIp = $_->{ip};
my $dName = $_->{name};
@ -1445,6 +1449,7 @@ sub FRITZBOX_Readout_Run_Web($)
delete $oldLanDevice{$rName} if exists $oldLanDevice{$rName};
}
}
}
FRITZBOX_Readout_Add_Reading ($hash, \@roReadings, "box_wlanCount", $wlanCount);
FRITZBOX_Readout_Add_Reading ($hash, \@roReadings, "box_guestWlanCount", $gWlanCount);