2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

93_DbRep: V7.7.1, minor fix if disabled

git-svn-id: https://svn.fhem.de/fhem/trunk@16073 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2018-02-03 19:43:59 +00:00
parent 52b460338c
commit c553894bb3
2 changed files with 14 additions and 12 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: V7.7.1, minor fix if disabled
- feature: 93_DbRep: V7.7.0, attribute "averageCalcForm" - select variant of
averageValue reporting, calc of daily medium temperature
according german weather service

View File

@ -37,6 +37,7 @@
###########################################################################################################################
# Versions History:
#
# 7.7.1 03.02.2018 minor fix in DbRep_firstconnect if IsDisabled
# 7.7.0 29.01.2018 attribute "averageCalcForm", calculation sceme "avgDailyMeanGWS", "avgArithmeticMean" for
# averageValue
# 7.6.1 27.01.2018 new attribute "sqlCmdHistoryLength" and "fetchMarkDuplicates" for highlighting multiple
@ -303,7 +304,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.6.1";
my $DbRepVersion = "7.7.1";
my %dbrep_col = ("DEVICE" => 64,
"TYPE" => 64,
@ -1143,20 +1144,20 @@ sub DbRep_firstconnect($) {
$hash->{dbloghash} = $defs{$dblogdevice};
my $dbconn = $hash->{dbloghash}{dbconn};
if ($init_done == 1 && !IsDisabled($name)) {
if ( !DbRep_Connect($hash) ) {
Log3 ($name, 2, "DbRep $name - DB connect failed. Credentials of database $hash->{DATABASE} are valid and database reachable ?");
ReadingsSingleUpdateValue ($hash, "state", "disconnected", 1);
return if(IsDisabled($name));
if ($init_done == 1) {
if ( !DbRep_Connect($hash) ) {
Log3 ($name, 2, "DbRep $name - DB connect failed. Credentials of database $hash->{DATABASE} are valid and database reachable ?");
ReadingsSingleUpdateValue ($hash, "state", "disconnected", 1);
} else {
Log3 ($name, 4, "DbRep $name - Connectiontest to db $dbconn successful");
my $dbh = $hash->{DBH};
$dbh->disconnect();
}
} else {
Log3 ($name, 4, "DbRep $name - Connectiontest to db $dbconn successful");
my $dbh = $hash->{DBH};
$dbh->disconnect();
}
} else {
RemoveInternalTimer($hash, "DbRep_firstconnect");
InternalTimer(time+1, "DbRep_firstconnect", $hash, 0);
}
}
return;
}