mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
93_DbRep: V8.2.3, check availability of DbLog-device at definition time of DbRep-device
git-svn-id: https://svn.fhem.de/fhem/trunk@17518 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ffea47cddd
commit
e10359e25e
@ -1,5 +1,7 @@
|
|||||||
# 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.
|
||||||
|
- change: 93_DbRep: V8.2.3, check availability of DbLog-device at
|
||||||
|
definition time of DbRep-device
|
||||||
- change: 93_Log2Syslog: send BSD-format changed, commandref revised
|
- change: 93_Log2Syslog: send BSD-format changed, commandref revised
|
||||||
- bugfix: 93_DbRep: fix don't get the real min timestamp in special cases
|
- bugfix: 93_DbRep: fix don't get the real min timestamp in special cases
|
||||||
- bugfix: 51_MOBILEALERTS: Fix temperature for MA10320PRO
|
- bugfix: 51_MOBILEALERTS: Fix temperature for MA10320PRO
|
||||||
|
@ -42,6 +42,7 @@ use warnings;
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %DbRep_vNotesIntern = (
|
our %DbRep_vNotesIntern = (
|
||||||
|
"8.2.3" => "07.10.2018 check availability of DbLog-device at definition time of DbRep-device ",
|
||||||
"8.2.2" => "07.10.2018 DbRep_getMinTs changed, fix don't get the real min timestamp in rare cases ",
|
"8.2.2" => "07.10.2018 DbRep_getMinTs changed, fix don't get the real min timestamp in rare cases ",
|
||||||
"8.2.1" => "07.10.2018 \$hash->{dbloghash}{HELPER}{REOPEN_RUNS_UNTIL} contains the time until DB is closed ",
|
"8.2.1" => "07.10.2018 \$hash->{dbloghash}{HELPER}{REOPEN_RUNS_UNTIL} contains the time until DB is closed ",
|
||||||
"8.2.0" => "05.10.2018 direct help for attributes ",
|
"8.2.0" => "05.10.2018 direct help for attributes ",
|
||||||
@ -486,8 +487,10 @@ sub DbRep_Define($@) {
|
|||||||
|
|
||||||
my @a = split("[ \t][ \t]*", $def);
|
my @a = split("[ \t][ \t]*", $def);
|
||||||
|
|
||||||
if(int(@a) < 2) {
|
if(!$a[2]) {
|
||||||
return "You need to specify more parameters.\n". "Format: define <name> DbRep <DbLog-Device> <Reading> <Timestamp-Begin> <Timestamp-Ende>";
|
return "You need to specify more parameters.\n". "Format: define <name> DbRep <DbLog-Device>";
|
||||||
|
} elsif (!$defs{$a[2]}) {
|
||||||
|
return "The specified DbLog-Device \"$a[2]\" doesn't exist.";
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{LASTCMD} = " ";
|
$hash->{LASTCMD} = " ";
|
||||||
@ -1473,9 +1476,9 @@ sub DbRep_getMinTs($) {
|
|||||||
# SQL-Startzeit
|
# SQL-Startzeit
|
||||||
my $st = [gettimeofday];
|
my $st = [gettimeofday];
|
||||||
|
|
||||||
# eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); };
|
eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); };
|
||||||
# eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history limit 1;"); };
|
# eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history limit 1;"); };
|
||||||
eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history order by TIMESTAMP limit 1;"); };
|
# eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history order by TIMESTAMP limit 1;"); };
|
||||||
|
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user