2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

93_DbRep: 7.15.2, Internal MODEL is set, minor fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@16595 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-04-12 19:22:50 +00:00
parent e032306c44
commit 2e5007c592
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# 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.
- bugfix: 93_DbRep: 7.15.2, Internal MODEL is set, minor fixes
- change: 93_DbRep: 7.15.1, sqlCmd accept widget textField-long,
Internal MODEL is set
- feature: 72_FB_CALLMONITOR: new attribute "sendKeepAlive" to send cyclic

View File

@ -37,6 +37,7 @@
###########################################################################################################################
# Versions History:
#
# 7.15.2 12.04.2018 fix in setting MODEL, prevent fhem from crash if wrong timestamp "0000-00-00" found in db
# 7.15.1 11.04.2018 sqlCmd accept widget textField-long, Internal MODEL is set
# 7.15.0 24.03.2018 new command sqlSpecial
# 7.14.8 21.03.2018 fix no save into database if value=0 (DbRep_OutputWriteToDB)
@ -333,7 +334,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
sub DbRep_Main($$;$);
sub DbLog_cutCol($$$$$$$); # DbLog-Funktion nutzen um Daten auf maximale Länge beschneiden
my $DbRepVersion = "7.15.1";
my $DbRepVersion = "7.15.2";
my %dbrep_col = ("DEVICE" => 64,
"TYPE" => 64,
@ -433,6 +434,7 @@ sub DbRep_Define($@) {
$hash->{LASTCMD} = " ";
$hash->{ROLE} = AttrVal($name, "role", "Client");
$hash->{MODEL} = $hash->{ROLE};
$hash->{HELPER}{DBLOGDEVICE} = $a[2];
$hash->{VERSION} = $DbRepVersion;
$hash->{NOTIFYDEV} = "global,".$name; # nur Events dieser Devices an DbRep_Notify weiterleiten
@ -1602,6 +1604,11 @@ sub DbRep_createTimeArray($$$) {
# absolute Auswertungszeiträume statische und dynamische (Beginn / Ende) berechnen
######################################################################################
if($hash->{HELPER}{MINTS} && $hash->{HELPER}{MINTS} =~ m/0000-00-00/) {
Log3 ($name, 1, "DbRep $name - ERROR - wrong timestamp \"$hash->{HELPER}{MINTS}\" found in database. Please delete it !");
delete $hash->{HELPER}{MINTS};
}
my $mints = $hash->{HELPER}{MINTS}?$hash->{HELPER}{MINTS}:"1970-01-01 01:00:00"; # Timestamp des 1. Datensatzes verwenden falls ermittelt
$tsbegin = AttrVal($name, "timestamp_begin", $mints);
$tsbegin = DbRep_formatpicker($tsbegin);