2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

93_DbLog.pm: fixing problems by generating DbLog Plots

git-svn-id: https://svn.fhem.de/fhem/trunk@4763 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tobiasfaust 2014-01-28 18:24:09 +00:00
parent 90e1958b34
commit 2479b2b336

View File

@ -1,4 +1,5 @@
##############################################
# $Id$
#
@ -423,7 +424,7 @@ sub DbLog_Log($$) {
my $DbLogType = AttrVal($hash->{NAME}, "DbLogType", "Current/History");
#one Transaction
#eval {
eval {
for (my $i = 0; $i < $max; $i++) {
my $s = $dev->{CHANGED}[$i];
$s = "" if(!defined($s));
@ -473,7 +474,7 @@ sub DbLog_Log($$) {
}
}
#};
};
return "";
}
@ -663,12 +664,17 @@ DbLog_Get($@)
$inf = "history";
}
if($outf eq "int" && $inf eq "current") {
$inf = "history";
Log3 $hash->{NAME}, 3, "Defining DbLog SVG-Plots with :CURRENT is deprecated. Please define DbLog SVG-Plots with :HISTORY instead of :CURRENT. (define <mySVG> SVG <DbLogDev>:<gplotfile>:HISTORY)";
}
if($outf eq "int") {
$outf = "-";
$internal = 1;
} elsif($outf eq "array"){
} elsif(uc($outf) eq "webchart") {
} elsif(lc($outf) eq "webchart") {
# redirect the get request to the chartQuery function
return chartQuery($hash, @_);
}
@ -788,7 +794,7 @@ DbLog_Get($@)
$sth->bind_columns(undef, \$sql_timestamp, \$sql_device, \$sql_reading, \$sql_value, \$type, \$event, \$unit);
}
else {
$sth->bind_columns(undef, \$sql_timestamp, \$sql_value);
$sth->bind_columns(undef, \$sql_timestamp, \$sql_device, \$sql_reading, \$sql_value);
}
if ($outf =~ m/(all)/) {