mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
FRITZBOX: robustness improved
git-svn-id: https://svn.fhem.de/fhem/trunk@10965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
67f2109d00
commit
b17c664861
@ -37,10 +37,10 @@ package main;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Blocking;
|
use Blocking;
|
||||||
my $missingModul;
|
my $missingModul = "";
|
||||||
my $missingModulTelnet;
|
my $missingModulTelnet = "";
|
||||||
my $missingModulWeb;
|
my $missingModulWeb = "";
|
||||||
my $missingModulTR064;
|
my $missingModulTR064 = "";
|
||||||
our $FRITZBOX_TR064pwd;
|
our $FRITZBOX_TR064pwd;
|
||||||
our $FRITZBOX_TR064user;
|
our $FRITZBOX_TR064user;
|
||||||
|
|
||||||
@ -1403,7 +1403,7 @@ sub FRITZBOX_Readout_Run_Web($)
|
|||||||
$wlanCount++ if $_->{wlan} == 1;
|
$wlanCount++ if $_->{wlan} == 1;
|
||||||
}
|
}
|
||||||
# else if the device is not online anymore, set the mac readings to 'inactive' and delete at next readout
|
# else if the device is not online anymore, set the mac readings to 'inactive' and delete at next readout
|
||||||
elsif (exists $hash->{READINGS}{$rName}) {
|
elsif (exists $hash->{READINGS}{$rName}{VAL}) {
|
||||||
if ($hash->{READINGS}{$rName}{VAL} ne "inactive") {
|
if ($hash->{READINGS}{$rName}{VAL} ne "inactive") {
|
||||||
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, $rName, "inactive";
|
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, $rName, "inactive";
|
||||||
}
|
}
|
||||||
@ -1575,6 +1575,7 @@ sub FRITZBOX_Readout_Done($)
|
|||||||
sub FRITZBOX_Readout_Process($$)
|
sub FRITZBOX_Readout_Process($$)
|
||||||
{
|
{
|
||||||
my ($hash,$string) = @_;
|
my ($hash,$string) = @_;
|
||||||
|
# Fatal Error: no hash parameter handed over
|
||||||
unless (defined $hash) {
|
unless (defined $hash) {
|
||||||
Log 1, "Fatal Error: no hash parameter handed over";
|
Log 1, "Fatal Error: no hash parameter handed over";
|
||||||
return;
|
return;
|
||||||
@ -1653,7 +1654,7 @@ sub FRITZBOX_Readout_Process($$)
|
|||||||
readingsBulkUpdate( $hash, $rName, $rValue );
|
readingsBulkUpdate( $hash, $rName, $rValue );
|
||||||
FRITZBOX_Log $hash, 5, "SET $rName = '$rValue'";
|
FRITZBOX_Log $hash, 5, "SET $rName = '$rValue'";
|
||||||
}
|
}
|
||||||
elsif ( exists( $hash->{READINGS}{$rName} ) ) {
|
elsif ( exists $hash->{READINGS}{$rName} ) {
|
||||||
delete $hash->{READINGS}{$rName};
|
delete $hash->{READINGS}{$rName};
|
||||||
FRITZBOX_Log $hash, 5, "Delete reading $rName.";
|
FRITZBOX_Log $hash, 5, "Delete reading $rName.";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user