mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
98_CDCOpenData.pm: Version 01.12b
git-svn-id: https://svn.fhem.de/fhem/trunk@28292 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
afb810138e
commit
8cd6e738ed
@ -54,7 +54,7 @@ use warnings;
|
|||||||
use Blocking;
|
use Blocking;
|
||||||
use HttpUtils;
|
use HttpUtils;
|
||||||
|
|
||||||
my $ModulVersion = "01.12";
|
my $ModulVersion = "01.12b";
|
||||||
my $missingModul = "";
|
my $missingModul = "";
|
||||||
|
|
||||||
sub CDCOpenData_Log($$$);
|
sub CDCOpenData_Log($$$);
|
||||||
@ -1173,6 +1173,19 @@ sub CDCOpenData_get_RegenRadar_atLocations($$$$) {
|
|||||||
# get handle to the remote file "DE1200_RV_LATEST.tar.bz2":
|
# get handle to the remote file "DE1200_RV_LATEST.tar.bz2":
|
||||||
my $remote_tar_bz2_file_handle = $ftp->retr("DE1200_RV_LATEST.tar.bz2");
|
my $remote_tar_bz2_file_handle = $ftp->retr("DE1200_RV_LATEST.tar.bz2");
|
||||||
|
|
||||||
|
unless( $remote_tar_bz2_file_handle ) {
|
||||||
|
if ($fromGet) {
|
||||||
|
$ftp->quit;
|
||||||
|
$returnStr = "ERROR: reading 'DE1200_RV_LATEST.tar.bz2' failed";
|
||||||
|
return $returnStr;
|
||||||
|
} else {
|
||||||
|
$ftp->quit;
|
||||||
|
$returnStr = "Error|reading 'DE1200_RV_LATEST.tar.bz2' failed";
|
||||||
|
$returnStr .= "|" . join('|', @roReadings ) if int @roReadings;
|
||||||
|
return $returnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# uncompress tar file in-memory and get handle to the in-memory file:
|
# uncompress tar file in-memory and get handle to the in-memory file:
|
||||||
my $uncompressed_fh;
|
my $uncompressed_fh;
|
||||||
unless ( $uncompressed_fh = IO::Uncompress::Bunzip2->new($remote_tar_bz2_file_handle) ) {
|
unless ( $uncompressed_fh = IO::Uncompress::Bunzip2->new($remote_tar_bz2_file_handle) ) {
|
||||||
@ -1359,6 +1372,12 @@ sub CDCOpenData_Readout_Run_Rain_Since_Midnight ($@) {
|
|||||||
# They fit without overlap to the 00:50 time boundaries provided by radolan's daily data files
|
# They fit without overlap to the 00:50 time boundaries provided by radolan's daily data files
|
||||||
my @files = grep /10000.........50/, $ftp->ls();
|
my @files = grep /10000.........50/, $ftp->ls();
|
||||||
|
|
||||||
|
if (! @files) {
|
||||||
|
$returnStr = "Error|grep received no files";
|
||||||
|
$returnStr .= "|" . join('|', @roReadings ) if int @roReadings;
|
||||||
|
return $returnStr;
|
||||||
|
}
|
||||||
|
|
||||||
my $remotename;
|
my $remotename;
|
||||||
my $filetime;
|
my $filetime;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user