mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
93_PWMR.pm : desiredTempFrom now handles Homematic on/off
git-svn-id: https://svn.fhem.de/fhem/trunk@15703 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5ac84f89a1
commit
17712e9bc4
@ -45,6 +45,7 @@
|
|||||||
# 14.12.16 GA fix supply DBuffer with delta temps for usePID=2 calculation
|
# 14.12.16 GA fix supply DBuffer with delta temps for usePID=2 calculation
|
||||||
# 14.12.16 GA add implement get previousTemps
|
# 14.12.16 GA add implement get previousTemps
|
||||||
# 01.08.17 GA add documentation for attribute disable
|
# 01.08.17 GA add documentation for attribute disable
|
||||||
|
# 27.12.17 GA add handle "off" as c_tempFrostProtect and "on" as c_tempC in getDesiredTempFrom (valid form Homematic)
|
||||||
|
|
||||||
|
|
||||||
# module for PWM (Pulse Width Modulation) calculation
|
# module for PWM (Pulse Width Modulation) calculation
|
||||||
@ -152,9 +153,21 @@ PWMR_getDesiredTempFrom(@)
|
|||||||
$newTemp = $1;
|
$newTemp = $1;
|
||||||
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val)");
|
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val)");
|
||||||
|
|
||||||
} else {
|
} else { # regexp does not match
|
||||||
$newTemp = $hash->{c_tempFrostProtect};
|
|
||||||
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val) set to frostProtect");
|
if ($val =~ /^on$/) {
|
||||||
|
$newTemp = $hash->{c_tempC};
|
||||||
|
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val) set to 30");
|
||||||
|
|
||||||
|
} elsif ( $val =~ /^off$/ ) {
|
||||||
|
|
||||||
|
$newTemp = $hash->{c_tempFrostProtect};
|
||||||
|
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val) set to frostProtect");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$newTemp = $hash->{c_tempFrostProtect};
|
||||||
|
Log3 ($hash, 4, "PWMR_getDesiredTempFrom $hash->{NAME}: from $dt->{NAME} reading($d_reading) VAL($d_readingVal) regexp($d_regexpTemp) regexpVal($val) set to frostProtect");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +496,7 @@ PWMR_Set($@)
|
|||||||
if ( $cmd eq "frostProtect" ) {
|
if ( $cmd eq "frostProtect" ) {
|
||||||
my $val = $a[2];
|
my $val = $a[2];
|
||||||
if ( $val eq "on" ) {
|
if ( $val eq "on" ) {
|
||||||
$hash->{c_frostProtect} = 1;
|
$hash->{c_frostProtect} = 1;
|
||||||
$attr{$name}{frostProtect} = 1;
|
$attr{$name}{frostProtect} = 1;
|
||||||
return undef;
|
return undef;
|
||||||
} elsif ( $val eq "off" ) {
|
} elsif ( $val eq "off" ) {
|
||||||
@ -1865,7 +1878,11 @@ PWMR_valueFormat(@)
|
|||||||
If <i>regexp</i> does not match (e.g. reading is 'off') then tempFrostProtect is used.<br>
|
If <i>regexp</i> does not match (e.g. reading is 'off') then tempFrostProtect is used.<br>
|
||||||
Internals c_desiredTempFrom reflects the actual setting and d_name, d_reading und d_regexpTemp the values used.<br>
|
Internals c_desiredTempFrom reflects the actual setting and d_name, d_reading und d_regexpTemp the values used.<br>
|
||||||
If this attribute is used then state will change from "Calculating" to "From <device>".<br>
|
If this attribute is used then state will change from "Calculating" to "From <device>".<br>
|
||||||
Calculation of desired-temp is (like when using tempRules) based on the interval specified for this device (default is 300 seconds).
|
Calculation of desired-temp is (like when using tempRules) based on the interval specified for this device (default is 300 seconds).<br>
|
||||||
|
Special values "on" and "off" of Homematic devices are handled as c_tempC (set by attribute tempCosy) and c_tempFrostProtect (set by attribute tempFrostProtect).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li>valueFormat<br>
|
<li>valueFormat<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user