diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index b5686cc4d..532e41db7 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -1475,7 +1475,7 @@ sub Delete { my $error = FileDelete($file); if ($error) { - Log3 ($name, 2, qq{$name - ERROR deleting cache file "$file": $error}); + Log3 ($name, 1, qq{$name - ERROR deleting cache file "$file": $error}); } $error = qq{}; @@ -1483,7 +1483,7 @@ sub Delete { $error = FileDelete($file); if ($error) { - Log3 ($name, 2, qq{$name - ERROR deleting cache file "$file": $error}); + Log3 ($name, 1, qq{$name - ERROR deleting cache file "$file": $error}); } return; @@ -1717,7 +1717,7 @@ sub writeCacheToFile { if ($error) { my $err = qq{ERROR writing cache file "$file": $error}; - Log3 ($name, 2, "$name - $err"); + Log3 ($name, 1, "$name - $err"); readingsSingleUpdate($hash, "state", "ERROR writing cache file $file - $error", 1); return $err; } @@ -1796,12 +1796,12 @@ sub _additionalActivities { delete $hash->{HELPER}{INITFEEDTOTAL}; delete $data{$type}{$name}{pvhist}{$day}; # den (alten) aktuellen Tag löschen - Log3($name, 3, qq{$name - history day "$day" deleted}); + Log3 ($name, 3, qq{$name - history day "$day" deleted}); for my $c (keys %{$data{$type}{$name}{consumers}}) { deleteConsumerPlanning ($hash, $c); my $calias = ConsumerVal ($hash, $c, "alias", ""); - Log3($name, 3, qq{$name - Consumer planning of "$calias" deleted}); + Log3 ($name, 3, qq{$name - Consumer planning of "$calias" deleted}); } deleteReadingspec ($hash, "consumer.*_planned.*"); @@ -1850,7 +1850,7 @@ sub _transferDWDForecastValues { my $fh2 = $fh1 == 24 ? 23 : $fh1; my $rad = ReadingsVal($raname, "fc${fd}_${fh2}_Rad1h", 0); - Log3($name, 5, "$name - collect Radiation data: device=$raname, rad=fc${fd}_${fh2}_Rad1h, Rad1h=$rad"); + Log3 ($name, 5, "$name - collect Radiation data: device=$raname, rad=fc${fd}_${fh2}_Rad1h, Rad1h=$rad"); my $params = { hash => $hash, @@ -1954,7 +1954,7 @@ sub _transferWeatherValues { my $txt = ReadingsVal($fcname, "fc${fd}_${fh2}_wwd", ''); - Log3($name, 5, "$name - collect Weather data: device=$fcname, wid=fc${fd}_${fh1}_ww, val=$wid, txt=$txt, cc=$neff, rp=$r101, t=$temp"); + Log3 ($name, 5, "$name - collect Weather data: device=$fcname, wid=fc${fd}_${fh1}_ww, val=$wid, txt=$txt, cc=$neff, rp=$r101, t=$temp"); $time_str = "NextHour".sprintf "%02d", $num; $data{$type}{$name}{nexthours}{$time_str}{weatherid} = $wid; @@ -2023,7 +2023,7 @@ sub _transferInverterValues { return if(!$pvread || !$edread); - Log3($name, 5, "$name - collect Inverter data: device=$indev, pv=$pvread ($pvunit), etotal=$edread ($etunit)"); + Log3 ($name, 5, "$name - collect Inverter data: device=$indev, pv=$pvread ($pvunit), etotal=$edread ($etunit)"); my $pvuf = $pvunit =~ /^kW$/xi ? 1000 : 1; my $pv = ReadingsNum ($indev, $pvread, 0) * $pvuf; # aktuelle Erzeugung (W) @@ -2102,7 +2102,7 @@ sub _transferMeterValues { $gfunit //= $gcunit; $gcunit //= $gfunit; - Log3($name, 5, "$name - collect Meter data: device=$medev, gcon=$gc ($gcunit), gfeedin=$gf ($gfunit) ,contotal=$gt ($ctunit), feedtotal=$ft ($ftunit)"); + Log3 ($name, 5, "$name - collect Meter data: device=$medev, gcon=$gc ($gcunit), gfeedin=$gf ($gfunit) ,contotal=$gt ($ctunit), feedtotal=$ft ($ftunit)"); my ($gco,$gfin); @@ -2430,7 +2430,7 @@ sub __planSwitchTimes { } #for my $o (sort{$a<=>$b} keys %max) { # nur für Debugging - # Log3($name, 1, "$name - maxkey: $maxkey, $o, $max{$o}{surplus}, $max{$o}{starttime}, $max{$o}{nexthour}, $max{$o}{today}"); + # Log3 ($name, 1, "$name - maxkey: $maxkey, $o, $max{$o}{surplus}, $max{$o}{starttime}, $max{$o}{nexthour}, $max{$o}{today}"); #} my $epiece1 = (~0 >> 1); @@ -2483,7 +2483,7 @@ sub __planSwitchTimes { } my $planstate = ConsumerVal ($hash, $c, "planstate", ""); - Log3($name, 3, qq{$name - Consumer "$calias" $planstate}) if($planstate); + Log3 ($name, 3, qq{$name - Consumer "$calias" $planstate}) if($planstate); return; } @@ -2527,7 +2527,7 @@ sub __switchConsumer { $data{$type}{$name}{consumers}{$c}{planswitchon} = $t; $data{$type}{$name}{consumers}{$c}{planswitchoff} = $t + $stopdiff; $state = qq{Consumer "$calias" switched on}; - Log3($name, 3, "$name - $state"); + Log3 ($name, 2, "$name - $state"); } } @@ -2539,7 +2539,7 @@ sub __switchConsumer { (undef,undef,undef,$stoptime) = timestampToTimestring ($t); $data{$type}{$name}{consumers}{$c}{planstate} = "switched off: ".$stoptime; $state = qq{Consumer "$calias" switched off}; - Log3($name, 3, "$name - $state"); + Log3 ($name, 2, "$name - $state"); } $paref->{state} = $state; @@ -2571,7 +2571,7 @@ sub _transferBatteryValues { $pounit //= $piunit; $piunit //= $pounit; - Log3($name, 5, "$name - collect Battery data: device=$badev, pin=$pin ($piunit), pout=$pou ($pounit)"); + Log3 ($name, 5, "$name - collect Battery data: device=$badev, pin=$pin ($piunit), pout=$pou ($pounit)"); my ($pbi,$pbo); @@ -2676,7 +2676,7 @@ sub _estConsumptionForecast { my $tomavg = int (($totcon/$dnum)-$ddiff); $data{$type}{$name}{current}{tomorrowconsumption} = $tomavg; # Durchschnittsverbrauch aller (gleicher) Wochentage - Log3($name, 4, "$name - estimated Consumption for tomorrow: $tomavg, days for avg: $dnum, hist. consumption registered consumers: $consumerco"); + Log3 ($name, 4, "$name - estimated Consumption for tomorrow: $tomavg, days for avg: $dnum, hist. consumption registered consumers: $consumerco"); } else { $data{$type}{$name}{current}{tomorrowconsumption} = "Wait for more days with a consumption figure"; @@ -2743,7 +2743,7 @@ sub _estConsumptionForecast { delete $paref->{histname}; } - Log3($name, 4, "$name - estimated Consumption for $nhday -> starttime: $nhtime, con: $conavg, days for avg: $dnum, hist. consumption registered consumers: $consumerco"); + Log3 ($name, 4, "$name - estimated Consumption for $nhday -> starttime: $nhtime, con: $conavg, days for avg: $dnum, hist. consumption registered consumers: $consumerco"); } } @@ -3090,7 +3090,7 @@ sub FwFn { my $al = AttrVal($d, "autoRefresh", 0); if($al) { InternalTimer(gettimeofday()+$al, \&pageRefresh, $hash, 0); - Log3($d, 5, "$d - next start of autoRefresh: ".FmtDateTime(gettimeofday()+$al)); + Log3 ($d, 5, "$d - next start of autoRefresh: ".FmtDateTime(gettimeofday()+$al)); } return $ret; @@ -3109,7 +3109,7 @@ sub pageRefresh { if($al) { InternalTimer(gettimeofday()+$al, \&pageRefresh, $hash, 0); - Log3($d, 5, "$d - next start of autoRefresh: ".FmtDateTime(gettimeofday()+$al)); + Log3 ($d, 5, "$d - next start of autoRefresh: ".FmtDateTime(gettimeofday()+$al)); } else { RemoveInternalTimer($hash, \&pageRefresh); @@ -3590,7 +3590,7 @@ sub forecastGraphic { else { $_ .= ":24:24"; } - Log3($name, 4, "$name - Consumer planned data: $_"); + Log3 ($name, 4, "$name - Consumer planned data: $_"); } $maxVal = !$maxVal ? $hfcg->{0}{beam1} : $maxVal; # Startwert wenn kein Wert bereits via attr vorgegeben ist @@ -3658,7 +3658,7 @@ sub forecastGraphic { $minDif = $hfcg->{$i}{diff} if ($hfcg->{$i}{diff} < $minDif); } - #Log3($hash,3,Dumper($hfcg)); + #Log3 ($hash,3,Dumper($hfcg)); ###################################### # Tabellen Ausgabe erzeugen ###################################### @@ -3700,14 +3700,14 @@ sub forecastGraphic { # ToDo : weather_icon sollte im Fehlerfall Title mit der ID besetzen um in FHEMWEB sofort die ID sehen zu können if (exists($hfcg->{$i}{weather}) && defined($hfcg->{$i}{weather})) { my ($icon_name, $title) = $hfcg->{$i}{weather} > 100 ? weather_icon($hfcg->{$i}{weather}-100) : weather_icon($hfcg->{$i}{weather}); - Log3($name, 4, "$name - unknown weather id: ".$hfcg->{$i}{weather}.", please inform the maintainer") if($icon_name eq 'unknown'); + Log3 ($name, 4, "$name - unknown weather id: ".$hfcg->{$i}{weather}.", please inform the maintainer") if($icon_name eq 'unknown'); $icon_name .= ($hfcg->{$i}{weather} < 100 ) ? '@'.$colorw : '@'.$colorwn; $val = FW_makeImage($icon_name); if ($val eq $icon_name) { # passendes Icon beim User nicht vorhanden ! ( attr web iconPath falsch/prüfen/update ? ) $val = '???'; - Log3($name, 3, qq{$name - the icon $hfcg->{$i}{weather} not found. Please check attribute "iconPath" of your FHEMWEB instance and/or update your FHEM software}); + Log3 ($name, 2, qq{$name - the icon $hfcg->{$i}{weather} not found. Please check attribute "iconPath" of your FHEMWEB instance and/or update your FHEM software}); } $ret .= "