mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 07:16:03 +00:00
FRITZBOX: Error = error
git-svn-id: https://svn.fhem.de/fhem/trunk@13889 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7ae9c16583
commit
c6c2fe879a
@ -1250,7 +1250,6 @@ sub FRITZBOX_Readout_Run_Web($)
|
||||
my $startTime = time();
|
||||
my $runNo;
|
||||
my $sid;
|
||||
my $Error;
|
||||
|
||||
#Start update
|
||||
FRITZBOX_Log $hash, 4, "Prepare query string for luaQuery.";
|
||||
@ -1324,12 +1323,9 @@ sub FRITZBOX_Readout_Run_Web($)
|
||||
$result = FRITZBOX_Web_Query( $hash, $queryStr) ;
|
||||
|
||||
# Abbruch wenn Fehler beim Lesen der Fritzbox-Antwort
|
||||
$Error = undef;
|
||||
$Error = $result->{Error} if defined $result->{Error};
|
||||
$Error = $result->{error} if defined $result->{error};
|
||||
if (defined $Error) {
|
||||
FRITZBOX_Log $hash, 2, "Error: ".$Error;
|
||||
my $returnStr = "Error|" . $Error;
|
||||
if ( defined $result->{Error} ) {
|
||||
FRITZBOX_Log $hash, 2, "Error: ".$result->{Error};
|
||||
my $returnStr = "Error|" . $result->{Error};
|
||||
$returnStr .= "|fhem->sidTime|0" if defined $result->{ResetSID};
|
||||
$returnStr .= "|" . join('|', @roReadings ) if int @roReadings;
|
||||
return $name."|".encode_base64($returnStr,"");
|
||||
@ -4615,6 +4611,7 @@ sub FRITZBOX_Web_Query($$@)
|
||||
$jsonResult = JSON->new->latin1->decode( $jsonText );
|
||||
}
|
||||
$jsonResult->{sid} = $sid;
|
||||
$jsonResult->{Error} = $jsonResult->{error} if defined $jsonResult->{error};
|
||||
return $jsonResult;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user