2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-01 00:19:00 +00:00

94_PWM.pm : maxOffTime fix für P-Regler

git-svn-id: https://svn.fhem.de/fhem/trunk@23441 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jamesgo 2020-12-31 10:22:26 +00:00
parent 668839f1a6
commit 9a459157f7

View File

@ -37,6 +37,7 @@
# 30.12.19 GA fix access to ReadingsVal via $name (reported by stromer-12) # 30.12.19 GA fix access to ReadingsVal via $name (reported by stromer-12)
# 26.05.20 GA fix division by zero if minRoomsOn is >0 and roomsCounted is zero # 26.05.20 GA fix division by zero if minRoomsOn is >0 and roomsCounted is zero
# 22.12.20 GA fix maxOffTime for P calculation never activated # 22.12.20 GA fix maxOffTime for P calculation never activated
# 28.12.20 GA fix maxOffTime; maxOffTimeApply is now only set if no heating is required
############################################## ##############################################
# $Id$ # $Id$
@ -902,28 +903,28 @@ PWM_CalcRoom(@)
return ("on", $newpulse, $cycletime, $actorV); return ("on", $newpulse, $cycletime, $actorV);
} }
if ($newpulse == 0 or ($maxOffTimeApply > 0 and $room->{c_PID_useit} eq 0)) { # ----------------
# check if maxOffTime protection is activated (attribute maxOffTimeIdlePeriod is set)
# $maxOffTImeApply will only be set if no heating is required
# ---------------- if ($maxOffTimeApply > 0 and ReadingsVal($name, "maxOffTimeCalculation", "off") eq "on") {
# check if maxOffTime protection is activated (attribute maxOffTimeIdlePeriod is set)
if ($maxOffTimeApply > 0 and ReadingsVal($name, "maxOffTimeCalculation", "off") eq "on") { ## wz > 2:00
if ($maxOffTimeAct >= $maxOffTime) {
## wz > 2:00 Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F17 maxOffTime protection");
if ($maxOffTimeAct >= $maxOffTime) { return ("on_mop", $newpulse, $cycletime, $actorV);
Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F17 maxOffTime protection");
return ("on_mop", $newpulse, $cycletime, $actorV);
}
## wz > 2:00 / 2
if ($maxOffTimeAct >= $maxOffTime / 2) {
Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F18 maxOffTime protection (possible)");
return ("on_mop_maybe", $newpulse, $cycletime, $actorV);
}
} }
## wz > 2:00 / 2
if ($maxOffTimeAct >= $maxOffTime / 2) {
Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F18 maxOffTime protection (possible)");
return ("on_mop_maybe", $newpulse, $cycletime, $actorV);
}
}
if ($newpulse == 0) {
Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F11 stay off (0)"); Log3 ($hash, 3, "PWM_CalcRoom $room->{NAME}: F11 stay off (0)");
return ("", $newpulse, $cycletime, $actorV); return ("", $newpulse, $cycletime, $actorV);
} }