2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_WeekdayTimer, 98_Heating_Control: a new Version of the functionality of "overtaking timer" and the blocking by a windowSensor(Heating_Control)

git-svn-id: https://svn.fhem.de/fhem/trunk@9335 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dietmar63 2015-09-30 18:57:59 +00:00
parent 27d11f5c3a
commit b35c437101

View File

@ -153,8 +153,9 @@ sub WeekdayTimer_Define($$) {
$hash->{TYPE} = $type;
$hash->{NAME} = $name;
$hash->{DEVICE} = $device;
$hash->{STILLDONETIME} = 0;
$hash->{SWITCHINGTIMES} = \@switchingtimes;
$attr{$name}{verbose} = 4 if (!defined $attr{$name}{verbose} && $name =~ m/^tst.*/ );
$attr{$name}{verbose} = 5 if (!defined $attr{$name}{verbose} && $name =~ m/^tst.*/ );
#$attr{$name}{verbose} = 4;
$modules{$hash->{TYPE}}{defptr}{$hash->{NAME}} = $hash;
@ -585,8 +586,15 @@ sub WeekdayTimer_Update($) {
# Schaltparameter ermitteln
my $tage = $hash->{profil}{$idx}{TAGE};
my $time = $hash->{profil}{$idx}{TIME};
my $epoch = $hash->{profil}{$idx}{EPOCH};
my $newParam = $hash->{profil}{$idx}{PARA};
if ($hash->{STILLDONETIME} > $epoch ) {
Log3 $hash, 3, "[$name] Timer $time overwritten by " . FmtDateTime($hash->{STILLDONETIME});
return;
}
$hash->{STILLDONETIME} = $epoch;
# Fenserkontakte abfragen - wenn einer im Status closed, dann Schaltung um 60 Sekunden verzögern
if (WeekdayTimer_FensterOffen($hash, $newParam, $idx)) {
readingsSingleUpdate ($hash, "state", "open window", 1);
@ -599,12 +607,6 @@ sub WeekdayTimer_Update($) {
my ($indx, $aktTime, $aktParameter, $nextTime, $nextParameter) =
WeekdayTimer_searchAktNext($hash, time()+5);
#if ($newParam ne $aktParameter ) {
# #Log3 $hash, 3, "[$name]*Update - $newParam overwritten by $aktParameter (" . FmtDateTime($aktTime). ")";
# Log3 $hash, 3, "[$name] Update - $newParam overwritten by $aktParameter (" . FmtDateTime($aktTime). ")" if($activeTimer);
# $newParam = $aktParameter;
#}
# ggf. Device schalten
WeekdayTimer_Device_Schalten($hash, $newParam, $tage) if($activeTimer);