From 959686f2b338c8d211056fce909e4f8ffd59a595 Mon Sep 17 00:00:00 2001 From: jowiemann <> Date: Fri, 17 Nov 2023 07:14:55 +0000 Subject: [PATCH] =?UTF-8?q?98=5FCDCOpenData.pm:=20RegEx=20in=20FileLog=20g?= =?UTF-8?q?e=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.fhem.de/fhem/trunk@28180 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_CDCOpenData.pm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/fhem/FHEM/98_CDCOpenData.pm b/fhem/FHEM/98_CDCOpenData.pm index 084250b54..8881bba52 100644 --- a/fhem/FHEM/98_CDCOpenData.pm +++ b/fhem/FHEM/98_CDCOpenData.pm @@ -52,7 +52,7 @@ use warnings; use Blocking; use HttpUtils; -my $ModulVersion = "01.10c"; +my $ModulVersion = "01.10e"; my $missingModul = ""; sub CDCOpenData_Log($$$); @@ -176,12 +176,15 @@ sub CDCOpenData_Define($$) return $msg; } - $hash->{STATE} = "Initializing"; - $hash->{INTERVAL} = 300; - $hash->{TIMEOUT} = 55; - $hash->{TMPDIR} = "temp_radolan_data_" . $name; - $hash->{DWDHOST} = "opendata.dwd.de"; - $hash->{fhem}{UPDATE} = 0; + $hash->{NAME} = $name; + $hash->{VERSION} = $ModulVersion; + + $hash->{STATE} = "Initializing"; + $hash->{INTERVAL} = 300; + $hash->{TIMEOUT} = 55; + $hash->{TMPDIR} = "temp_radolan_data_" . $name; + $hash->{DWDHOST} = "opendata.dwd.de"; + $hash->{fhem}{UPDATE} = 0; $hash->{helper}{TimerReadout} = $name . ".Readout"; $hash->{helper}{TimerCmd} = $name . ".Cmd"; @@ -319,7 +322,7 @@ sub CDCOpenData_Attr($@) if ($aName eq "locations") { foreach my $location (split / /, $aVal) { $location =~ s/.*?://; - CDCOpenData_Log $hash, 2, "la,lo -> $location"; + CDCOpenData_Log $hash, 4, "la,lo -> $location"; return "The location attribute is a space-separated list of locations in the format latitude,longitude." if $location !~ /[0-9]*\.[0-9]*,[0-9]*\.[0-9]*/; } } @@ -489,7 +492,7 @@ sub CDCOpenData_Attr($@) } else { - my $dMod = 'defmod ' . $aVal . ' FileLog ./log/' . $name . '-%Y-%m.log ' . $name . ':.*?_rain_radar:.*'; + my $dMod = 'defmod ' . $aVal . ' FileLog ./log/' . $name . '-%Y-%m.log ' . $name . ':.*?_rain_radar/..:.*'; fhem($dMod, 1); $dMod = 'attr -silent ' . $aVal . ' outputFormat { return $TIMESTAMP." ".$NAME." ".$1." ".$2."\n" if $EVENT =~ /(.*?)\/.*?:\s(.*)/}'; @@ -1086,8 +1089,9 @@ sub CDCOpenData_get_RegenRadar_atLocations($$$$) { close $uncompressed_fh; } - $ftp->quit; + close $remote_tar_bz2_file_handle; + $ftp->quit; CDCOpenData_Log $name, 5, "################ End get_RegenRadar_atLocations ################";