mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 02:10:32 +00:00
93_DbRep: contrib Testversion
git-svn-id: https://svn.fhem.de/fhem/trunk@26810 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
168adcc171
commit
cef7c9d544
@ -4363,12 +4363,12 @@ sub DbRep_diffval {
|
|||||||
Log3 ($name, 5, "DbRep $name - data of row_array result assigned to fields:\n");
|
Log3 ($name, 5, "DbRep $name - data of row_array result assigned to fields:\n");
|
||||||
|
|
||||||
for my $row (@row_array) {
|
for my $row (@row_array) {
|
||||||
my @a = split "[ \t][ \t]*", $row, 6;
|
my @a = split /\s+/x, $row, 6;
|
||||||
my $runtime_string = decode_base64($a[0]);
|
my $runtime_string = decode_base64($a[0]);
|
||||||
$lastruntimestring = $runtime_string if ($i == 1);
|
$lastruntimestring = $runtime_string if ($i == 1);
|
||||||
my $timestamp = $a[2] ? $a[1]."_".$a[2] : $a[1];
|
my $timestamp = $a[2] ? $a[1]."_".$a[2] : $a[1];
|
||||||
my $value = $a[3] ? $a[3] : 0;
|
my $value = $a[3] ? $a[3] : 0;
|
||||||
my $diff = $a[4] ? sprintf("%.4f",$a[4]) : 0;
|
my $diff = $a[4] ? $a[4] : 0;
|
||||||
|
|
||||||
$timestamp =~ s/\s+$//g; # Leerzeichen am Ende $timestamp entfernen
|
$timestamp =~ s/\s+$//g; # Leerzeichen am Ende $timestamp entfernen
|
||||||
|
|
||||||
@ -4531,10 +4531,10 @@ sub DbRep_diffvalDone {
|
|||||||
|
|
||||||
my %rh = split("§", $rowlist);
|
my %rh = split("§", $rowlist);
|
||||||
|
|
||||||
Log3 ($name, 4, "DbRep $name - print result of diffValue calculation after decoding ...");
|
#Log3 ($name, 4, "DbRep $name - print result of diffValue calculation after decoding ...");
|
||||||
for my $key (sort(keys(%rh))) {
|
#for my $key (sort(keys(%rh))) {
|
||||||
Log3 ($name, 4, "DbRep $name - runtimestring Key: $key, value: ".$rh{$key});
|
# Log3 ($name, 4, "DbRep $name - runtimestring Key: $key, value: ".$rh{$key});
|
||||||
}
|
#}
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
|
|
||||||
@ -12362,7 +12362,7 @@ sub DbRep_calcount {
|
|||||||
my %ncp = ();
|
my %ncp = ();
|
||||||
|
|
||||||
Log3 ($name, 4, "DbRep $name - count of values used for calc:");
|
Log3 ($name, 4, "DbRep $name - count of values used for calc:");
|
||||||
foreach my $key (sort(keys%{$ch})) {
|
for my $key (sort(keys%{$ch})) {
|
||||||
Log3 ($name, 4, "$key => ". $ch->{$key});
|
Log3 ($name, 4, "$key => ". $ch->{$key});
|
||||||
|
|
||||||
if($ch->{$key} eq "1") {
|
if($ch->{$key} eq "1") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user