mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-27 20:34:52 +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:
parent
52b460338c
commit
c553894bb3
fhem
@ -1,5 +1,6 @@
|
|||||||
# 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.
|
||||||
|
- bugfix: 93_DbRep: V7.7.1, minor fix if disabled
|
||||||
- feature: 93_DbRep: V7.7.0, attribute "averageCalcForm" - select variant of
|
- feature: 93_DbRep: V7.7.0, attribute "averageCalcForm" - select variant of
|
||||||
averageValue reporting, calc of daily medium temperature
|
averageValue reporting, calc of daily medium temperature
|
||||||
according german weather service
|
according german weather service
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
###########################################################################################################################
|
###########################################################################################################################
|
||||||
# Versions History:
|
# 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
|
# 7.7.0 29.01.2018 attribute "averageCalcForm", calculation sceme "avgDailyMeanGWS", "avgArithmeticMean" for
|
||||||
# averageValue
|
# averageValue
|
||||||
# 7.6.1 27.01.2018 new attribute "sqlCmdHistoryLength" and "fetchMarkDuplicates" for highlighting multiple
|
# 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 DbRep_Main($$;$);
|
||||||
sub DbLog_cutCol($$$$$$$); # DbLog-Funktion nutzen um Daten auf maximale Länge beschneiden
|
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,
|
my %dbrep_col = ("DEVICE" => 64,
|
||||||
"TYPE" => 64,
|
"TYPE" => 64,
|
||||||
@ -1143,20 +1144,20 @@ sub DbRep_firstconnect($) {
|
|||||||
$hash->{dbloghash} = $defs{$dblogdevice};
|
$hash->{dbloghash} = $defs{$dblogdevice};
|
||||||
my $dbconn = $hash->{dbloghash}{dbconn};
|
my $dbconn = $hash->{dbloghash}{dbconn};
|
||||||
|
|
||||||
if ($init_done == 1 && !IsDisabled($name)) {
|
return if(IsDisabled($name));
|
||||||
|
if ($init_done == 1) {
|
||||||
if ( !DbRep_Connect($hash) ) {
|
if ( !DbRep_Connect($hash) ) {
|
||||||
Log3 ($name, 2, "DbRep $name - DB connect failed. Credentials of database $hash->{DATABASE} are valid and database reachable ?");
|
Log3 ($name, 2, "DbRep $name - DB connect failed. Credentials of database $hash->{DATABASE} are valid and database reachable ?");
|
||||||
ReadingsSingleUpdateValue ($hash, "state", "disconnected", 1);
|
ReadingsSingleUpdateValue ($hash, "state", "disconnected", 1);
|
||||||
|
} else {
|
||||||
|
Log3 ($name, 4, "DbRep $name - Connectiontest to db $dbconn successful");
|
||||||
|
my $dbh = $hash->{DBH};
|
||||||
|
$dbh->disconnect();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Log3 ($name, 4, "DbRep $name - Connectiontest to db $dbconn successful");
|
|
||||||
my $dbh = $hash->{DBH};
|
|
||||||
$dbh->disconnect();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
RemoveInternalTimer($hash, "DbRep_firstconnect");
|
RemoveInternalTimer($hash, "DbRep_firstconnect");
|
||||||
InternalTimer(time+1, "DbRep_firstconnect", $hash, 0);
|
InternalTimer(time+1, "DbRep_firstconnect", $hash, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user