mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +00:00
93_DbRep: fix Perl Warnings
git-svn-id: https://svn.fhem.de/fhem/trunk@27340 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
494398d811
commit
bcc5f6a564
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 93_DbRep: fix Perl Warnings
|
||||||
- bugfix: 72_FRITZBOX: Pruefung Attr FritzBoxIP um URL erweitert
|
- bugfix: 72_FRITZBOX: Pruefung Attr FritzBoxIP um URL erweitert
|
||||||
Umlaute auf HTML Namen umgestellt
|
Umlaute auf HTML Namen umgestellt
|
||||||
get <name> tr064Command gehärtet
|
get <name> tr064Command gehärtet
|
||||||
|
@ -59,6 +59,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Version History intern
|
# Version History intern
|
||||||
my %DbRep_vNotesIntern = (
|
my %DbRep_vNotesIntern = (
|
||||||
|
"8.52.1" => "19.03.2023 fix Perl Warnings ",
|
||||||
"8.52.0" => "17.02.2023 get utf8mb4 info by connect db and set connection collation accordingly, new setter migrateCollation ",
|
"8.52.0" => "17.02.2023 get utf8mb4 info by connect db and set connection collation accordingly, new setter migrateCollation ",
|
||||||
"8.51.6" => "11.02.2023 fix execute DbRep_afterproc after generating readings ".
|
"8.51.6" => "11.02.2023 fix execute DbRep_afterproc after generating readings ".
|
||||||
"Forum: https://forum.fhem.de/index.php/topic,53584.msg1262970.html#msg1262970 ".
|
"Forum: https://forum.fhem.de/index.php/topic,53584.msg1262970.html#msg1262970 ".
|
||||||
@ -3526,8 +3527,10 @@ sub _DbRep_avgDailyMeanGWS {
|
|||||||
|
|
||||||
my @wsf = split " ", $runtime_string_first;
|
my @wsf = split " ", $runtime_string_first;
|
||||||
my @wsn = split " ", $runtime_string_next;
|
my @wsn = split " ", $runtime_string_next;
|
||||||
|
my $wsft = $wsf[1] ? '_'.$wsf[1] : q{};
|
||||||
|
my $wsnt = $wsn[1] ? '_'.$wsn[1] : q{};
|
||||||
|
|
||||||
$wrstr .= $runtime_string."#".$sum."#".$wsf[0]."_".$wsf[1]."#".$wsn[0]."_".$wsn[1]."|"; # Kombi zum Rückschreiben in die DB
|
$wrstr .= $runtime_string."#".$sum."#".$wsf[0].$wsft."#".$wsn[0].$wsnt."|"; # Kombi zum Rückschreiben in die DB
|
||||||
|
|
||||||
### Grünlandtemperatursumme lt. https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme ###
|
### Grünlandtemperatursumme lt. https://de.wikipedia.org/wiki/Gr%C3%BCnlandtemperatursumme ###
|
||||||
my ($y,$m,$d) = split "-", $runtime_string;
|
my ($y,$m,$d) = split "-", $runtime_string;
|
||||||
@ -3654,7 +3657,7 @@ sub _DbRep_avgTimeWeightMean {
|
|||||||
|
|
||||||
my @twm_array = map { $_->[0]."_ESC_".$_->[1] } @{$sth->fetchall_arrayref()};
|
my @twm_array = map { $_->[0]."_ESC_".$_->[1] } @{$sth->fetchall_arrayref()};
|
||||||
|
|
||||||
if ($bin_end) { # der letzte Datenwert aus dem vorherigen Bin wird dem aktuellen Bin vorangestellt,
|
if ($bin_end && $val1) { # der letzte Datenwert aus dem vorherigen Bin wird dem aktuellen Bin vorangestellt,
|
||||||
unshift @twm_array, $bin_end.'_ESC_'.$val1; # wobei das vorherige $bin_end als Zeitstempel verwendet wird
|
unshift @twm_array, $bin_end.'_ESC_'.$val1; # wobei das vorherige $bin_end als Zeitstempel verwendet wird
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3691,8 +3694,8 @@ sub _DbRep_avgTimeWeightMean {
|
|||||||
Log3 ($name, 5, "DbRep $name - time sum: $tsum, delta time: $dt, value: $val1, twm: ".($tsum ? $val1*($dt/$tsum) : 0));
|
Log3 ($name, 5, "DbRep $name - time sum: $tsum, delta time: $dt, value: $val1, twm: ".($tsum ? $val1*($dt/$tsum) : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
$dt = timelocal($secf, $minf, $hhf, $ddf, $mmf-1, $yyyyf-1900) - $to; # die Zeitspanne des letzten Datenwertes in diesem Bin wird für diesen Bin berücksichtigt
|
$dt = timelocal($secf, $minf, $hhf, $ddf, $mmf-1, $yyyyf-1900); # die Zeitspanne des letzten Datenwertes in diesem Bin wird für diesen Bin berücksichtigt
|
||||||
# $dt ist das Zeitgewicht des letzten Wertes in diesem Bin
|
$dt -= $to if ($to); # $dt ist das Zeitgewicht des letzten Wertes in diesem Bin
|
||||||
$tsum += $dt;
|
$tsum += $dt;
|
||||||
$sum += $val1 * $dt if ($val1);
|
$sum += $val1 * $dt if ($val1);
|
||||||
$sum /= $tsum if ($tsum > 0);
|
$sum /= $tsum if ($tsum > 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user