mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
59_HCS: HCS has now support for MAX Thermostat
git-svn-id: https://svn.fhem.de/fhem/trunk@4433 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5a0f6f4be4
commit
388d86cfff
@ -1,6 +1,7 @@
|
|||||||
# 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.
|
||||||
- SVN
|
- SVN
|
||||||
|
- feature: HCS has now MAX Thermostat support
|
||||||
- change: integrated OWServer/OWDevice nonblocking and random start
|
- change: integrated OWServer/OWDevice nonblocking and random start
|
||||||
time patches (justme1968 & Boris)
|
time patches (justme1968 & Boris)
|
||||||
- feature: Add new module Dashboard
|
- feature: Add new module Dashboard
|
||||||
|
@ -442,21 +442,32 @@ HCS_getValues($$) {
|
|||||||
foreach my $d (sort keys %defs) {
|
foreach my $d (sort keys %defs) {
|
||||||
my $t = $defs{$d}{TYPE};
|
my $t = $defs{$d}{TYPE};
|
||||||
# skipping unneeded devices
|
# skipping unneeded devices
|
||||||
next if($t ne "FHT" && $t ne "CUL_HM");
|
next if($t ne "FHT" && $t ne "CUL_HM" && $t ne "MAX");
|
||||||
|
next if($t eq "MAX" && !$defs{$d}{type});
|
||||||
|
next if($t eq "MAX" && $defs{$d}{type} !~ m/HeatingThermostat/);
|
||||||
|
|
||||||
next if($t eq "CUL_HM" &&( !$attr{$d}{model}
|
next if($t eq "CUL_HM" &&( !$attr{$d}{model}
|
||||||
||!( ($attr{$d}{model} eq "HM-CC-TC" && !$defs{$d}{device})
|
||!( ($attr{$d}{model} eq "HM-CC-TC" && !$defs{$d}{device})
|
||||||
||($attr{$d}{model} eq "HM-CC-RT-DN" && !$defs{$d}{device}))));
|
||($attr{$d}{model} eq "HM-CC-RT-DN" && !$defs{$d}{device}))));
|
||||||
|
|
||||||
$devs{$d}{actuator} = ReadingsVal($d,"actuator","n/a");
|
$devs{$d}{actuator} = ReadingsVal($d,"valveposition","n/a") if($t =~ m/(MAX)/);
|
||||||
|
$devs{$d}{actuator} = ReadingsVal($d,"actuator","n/a") if($t =~ m/(FHT|CUL_HM)/);
|
||||||
if ($devs{$d}{actuator} =~ m/^\d+\s*%$/) { $devs{$d}{actuator} =~ s/(\s+|%)//g;
|
|
||||||
} else { $devs{$d}{actuator} = 0;
|
if ($devs{$d}{actuator} =~ m/^\d+\s*%?$/) {
|
||||||
}
|
$devs{$d}{actuator} =~ s/(\s+|%)//g;
|
||||||
|
} else {
|
||||||
|
$devs{$d}{actuator} = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$devs{$d}{excluded} = ($exclude =~ m/$d/) ? 1 : 0;
|
$devs{$d}{excluded} = ($exclude =~ m/$d/) ? 1 : 0;
|
||||||
$devs{$d}{ignored} = ($attr{$d}{ignore} && $attr{$d}{ignore} == 1) ? 1 : 0;
|
$devs{$d}{ignored} = ($attr{$d}{ignore} && $attr{$d}{ignore} == 1) ? 1 : 0;
|
||||||
$devs{$d}{tempDesired} = ReadingsVal($d,"desired-temp","n/a");
|
|
||||||
$devs{$d}{tempMeasured} = ReadingsVal($d,"measured-temp","n/a");
|
$devs{$d}{tempDesired} = ReadingsVal($d,"desired-temp","n/a") if($t =~ m/(FHT|CUL_HM)/);
|
||||||
|
$devs{$d}{tempDesired} = ReadingsVal($d,"desiredTemperature","n/a") if($t =~ m/(MAX)/);
|
||||||
|
$devs{$d}{tempMeasured} = ReadingsVal($d,"measured-temp","n/a") if($t =~ m/(FHT|CUL_HM)/);
|
||||||
|
$devs{$d}{tempMeasured} = ReadingsVal($d,"temperature","n/a") if($t =~ m/(MAX)/);
|
||||||
|
|
||||||
|
|
||||||
$devs{$d}{type} = $t;
|
$devs{$d}{type} = $t;
|
||||||
$hash->{helper}{device}{$d}{excluded} = $devs{$d}{excluded};
|
$hash->{helper}{device}{$d}{excluded} = $devs{$d}{excluded};
|
||||||
$hash->{helper}{device}{$d}{ignored} = $devs{$d}{ignored};
|
$hash->{helper}{device}{$d}{ignored} = $devs{$d}{ignored};
|
||||||
@ -513,6 +524,7 @@ HCS_getValues($$) {
|
|||||||
my $sumExcluded = 0;
|
my $sumExcluded = 0;
|
||||||
my $sumFHT = 0;
|
my $sumFHT = 0;
|
||||||
my $sumHMCCTC = 0;
|
my $sumHMCCTC = 0;
|
||||||
|
my $sumMAX = 0;
|
||||||
my $sumIdle = 0;
|
my $sumIdle = 0;
|
||||||
my $sumIgnored = 0;
|
my $sumIgnored = 0;
|
||||||
my $sumTotal = 0;
|
my $sumTotal = 0;
|
||||||
@ -530,6 +542,7 @@ HCS_getValues($$) {
|
|||||||
$hash->{helper}{device}{$d}{tempDesired} = $devs{$d}{tempDesired};
|
$hash->{helper}{device}{$d}{tempDesired} = $devs{$d}{tempDesired};
|
||||||
$hash->{helper}{device}{$d}{tempMeasured} = $devs{$d}{tempMeasured};
|
$hash->{helper}{device}{$d}{tempMeasured} = $devs{$d}{tempMeasured};
|
||||||
$hash->{helper}{device}{$d}{type} = $devs{$d}{type};
|
$hash->{helper}{device}{$d}{type} = $devs{$d}{type};
|
||||||
|
$sumMAX++ if(lc($devs{$d}{type}) eq "max");
|
||||||
$sumFHT++ if(lc($devs{$d}{type}) eq "fht");
|
$sumFHT++ if(lc($devs{$d}{type}) eq "fht");
|
||||||
$sumHMCCTC++ if(lc($devs{$d}{type}) eq "cul_hm");
|
$sumHMCCTC++ if(lc($devs{$d}{type}) eq "cul_hm");
|
||||||
$sumTotal++;
|
$sumTotal++;
|
||||||
@ -712,8 +725,8 @@ HCS_getValues($$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
my $str = sprintf("Found %d Device(s): %d FHT, %d HM-CC-TC, demand: %d, idle: %d, ignored: %d, exlcuded: %d, unknown: %d",
|
my $str = sprintf("Found %d Device(s): %d FHT, %d HM-CC-TC, %d MAX, demand: %d, idle: %d, ignored: %d, excluded: %d, unknown: %d",
|
||||||
$sumTotal,$sumFHT,$sumHMCCTC,$sumDemand,$sumIdle,$sumIgnored,$sumExcluded,$sumUnknown);
|
$sumTotal,$sumFHT,$sumHMCCTC, $sumMAX, $sumDemand,$sumIdle,$sumIgnored,$sumExcluded,$sumUnknown);
|
||||||
Log $ll, "$type $name $str, eco: $eco overdrive: $overdrive";
|
Log $ll, "$type $name $str, eco: $eco overdrive: $overdrive";
|
||||||
|
|
||||||
return $heatDemand;
|
return $heatDemand;
|
||||||
@ -728,7 +741,7 @@ HCS_getValues($$) {
|
|||||||
<a name="HCS"></a>
|
<a name="HCS"></a>
|
||||||
<h3>HCS</h3>
|
<h3>HCS</h3>
|
||||||
<ul>
|
<ul>
|
||||||
Defines a virtual device for monitoring thermostats (FHT, HM-CC-TC) to control a central
|
Defines a virtual device for monitoring thermostats (FHT, HM-CC-TC, MAX) to control a central
|
||||||
heating unit.<br><br>
|
heating unit.<br><br>
|
||||||
|
|
||||||
<a name="HCSdefine"></a>
|
<a name="HCSdefine"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user