mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
LUXTRONIK2: set hotWaterCirculationPumpExtern on|off
git-svn-id: https://svn.fhem.de/fhem/trunk@9153 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8a33212be5
commit
f82cd2a14a
@ -147,47 +147,47 @@ LUXTRONIK2_Notify(@) {
|
|||||||
my ($hash,$dev) = @_;
|
my ($hash,$dev) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
if ($dev->{NAME} eq "global" && grep (m/^INITIALIZED|REREADCFG$/,@{$dev->{CHANGED}})){
|
# if ($dev->{NAME} eq "global" && grep (m/^INITIALIZED|REREADCFG$/,@{$dev->{CHANGED}})){
|
||||||
# housekeeping
|
# housekeeping
|
||||||
my %cleanUp = (
|
# my %cleanUp = (
|
||||||
delayDeviceTime => "delayDeviceTimeCalc",
|
# delayDeviceTime => "delayDeviceTimeCalc",
|
||||||
deviceTimeStartReadings => "deviceTimeCalc",
|
# deviceTimeStartReadings => "deviceTimeCalc",
|
||||||
heatingSummerMode => "heatingLimit",
|
# heatingSummerMode => "heatingLimit",
|
||||||
thresholdTemperatureSummerMode => "thresholdHeatingLimit",
|
# thresholdTemperatureSummerMode => "thresholdHeatingLimit",
|
||||||
lastDeviceClockSynch => "deviceTimeLastSync",
|
# lastDeviceClockSynch => "deviceTimeLastSync",
|
||||||
operatingHoursHeatPump => "counterHoursHeatPump",
|
# operatingHoursHeatPump => "counterHoursHeatPump",
|
||||||
operatingHoursSecondHeatSource1 => "counterHours2ndHeatSource1",
|
# operatingHoursSecondHeatSource1 => "counterHours2ndHeatSource1",
|
||||||
operatingHoursSecondHeatSource2 => "counterHours2ndHeatSource2",
|
# operatingHoursSecondHeatSource2 => "counterHours2ndHeatSource2",
|
||||||
operatingHoursSecondHeatSource3 => "counterHours2ndHeatSource3",
|
# operatingHoursSecondHeatSource3 => "counterHours2ndHeatSource3",
|
||||||
operatingHoursHeating => "counterHoursHeating",
|
# operatingHoursHeating => "counterHoursHeating",
|
||||||
operatingHoursHotWater => "counterHoursHotWater",
|
# operatingHoursHotWater => "counterHoursHotWater",
|
||||||
heatQuantityHeating => "counterHeatQHeating",
|
# heatQuantityHeating => "counterHeatQHeating",
|
||||||
heatQuantityHotWater => "counterHeatQHotWater",
|
# heatQuantityHotWater => "counterHeatQHotWater",
|
||||||
heatQuantityTotal => "counterHeatQTotal",
|
# heatQuantityTotal => "counterHeatQTotal",
|
||||||
currentOperatingStatus1 => "opStateHeatPump1",
|
# currentOperatingStatus1 => "opStateHeatPump1",
|
||||||
currentOperatingState1 => "opStateHeatPump1",
|
# currentOperatingState1 => "opStateHeatPump1",
|
||||||
currentOperatingStatus2 => "opStateHeatPump3",
|
# currentOperatingStatus2 => "opStateHeatPump3",
|
||||||
currentOperatingState2 => "opStateHeatPump2",
|
# currentOperatingState2 => "opStateHeatPump2",
|
||||||
currentOperatingState3 => "opStateHeatPump3",
|
# currentOperatingState3 => "opStateHeatPump3",
|
||||||
heatingOperatingMode => "opModeHeating",
|
# heatingOperatingMode => "opModeHeating",
|
||||||
heatingOperatingState => "opStateHeating",
|
# heatingOperatingState => "opStateHeating",
|
||||||
hotWaterOperatingMode => "opModeHotWater",
|
# hotWaterOperatingMode => "opModeHotWater",
|
||||||
hotWaterStatus => "opStateHotWater",
|
# hotWaterStatus => "opStateHotWater",
|
||||||
hotWaterState => "opStateHotWater",
|
# hotWaterState => "opStateHotWater",
|
||||||
heatingSystemCirculationPump => "heatingSystemCircPump",
|
# heatingSystemCirculationPump => "heatingSystemCircPump",
|
||||||
hotWaterCirculationPumpExtern => "hotWaterCircPumpExtern",
|
# hotWaterCirculationPumpExtern => "hotWaterCircPumpExtern",
|
||||||
currentThermalOutput => "thermalPower",
|
# currentThermalOutput => "thermalPower",
|
||||||
returnTemperaturSetBack => "returnTemperatureSetBack",
|
# returnTemperaturSetBack => "returnTemperatureSetBack",
|
||||||
statGradientBoilerTempLoss => "statBoilerGradientHeatUp' and 'statBoilerGradientCoolDown" );
|
# statGradientBoilerTempLoss => "statBoilerGradientHeatUp' and 'statBoilerGradientCoolDown" );
|
||||||
my $oldReading;
|
# my $oldReading;
|
||||||
my $newReading;
|
# my $newReading;
|
||||||
while (($oldReading, $newReading) = each(%cleanUp)) {
|
# while (($oldReading, $newReading) = each(%cleanUp)) {
|
||||||
if ( exists( $hash->{READINGS}{$oldReading} ) ) {
|
# if ( exists( $hash->{READINGS}{$oldReading} ) ) {
|
||||||
delete($hash->{READINGS}{$oldReading});
|
# delete($hash->{READINGS}{$oldReading});
|
||||||
LUXTRONIK2_Log $name,2,"!!! Change/fix in LUXTRONIK2-Modul: '$oldReading' is now '$newReading'";
|
# LUXTRONIK2_Log $name,2,"!!! Change/fix in LUXTRONIK2-Modul: '$oldReading' is now '$newReading'";
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +296,8 @@ LUXTRONIK2_Set($$@)
|
|||||||
LUXTRONIK2_Log $name, 3, $resultStr;
|
LUXTRONIK2_Log $name, 3, $resultStr;
|
||||||
return $resultStr;
|
return $resultStr;
|
||||||
|
|
||||||
} elsif(int(@_)==4 &&
|
}
|
||||||
|
elsif(int(@_)==4 &&
|
||||||
($cmd eq 'hotWaterTemperatureTarget'
|
($cmd eq 'hotWaterTemperatureTarget'
|
||||||
|| $cmd eq 'opModeHotWater'
|
|| $cmd eq 'opModeHotWater'
|
||||||
|| $cmd eq 'returnTemperatureSetBack')) {
|
|| $cmd eq 'returnTemperatureSetBack')) {
|
||||||
@ -306,11 +307,23 @@ LUXTRONIK2_Set($$@)
|
|||||||
$hash->{LOCAL} = 0;
|
$hash->{LOCAL} = 0;
|
||||||
return $resultStr;
|
return $resultStr;
|
||||||
}
|
}
|
||||||
|
elsif( int(@_)==4 && $cmd eq 'hotWaterCircPumpExtern' ) { # Einstellung->Entlüftung
|
||||||
|
Log3 $name, 3, "LUXTRONIK2: set $name $cmd $val";
|
||||||
|
return "$name Error: Wrong parameter given for opModeHotWater, use Automatik,Party,Off"
|
||||||
|
if $val !~ /on|off/;
|
||||||
|
$hash->{LOCAL} = 1;
|
||||||
|
$resultStr = LUXTRONIK2_SetParameter ($hash, $cmd, $val);
|
||||||
|
if ($val eq "on" ) { $resultStr .= LUXTRONIK2_SetParameter ($hash, "confirmDegasing", 1); }
|
||||||
|
else { $resultStr .= LUXTRONIK2_SetParameter ($hash, "confirmDegasing", 0); } # only send if no degasing checkbox is selected at all.
|
||||||
|
$hash->{LOCAL} = 0;
|
||||||
|
return $resultStr;
|
||||||
|
}
|
||||||
|
|
||||||
my $list = "statusRequest:noArg"
|
my $list = "statusRequest:noArg"
|
||||||
." activeTariff:0,1,2,3,4,5,6,7,8,9"
|
." activeTariff:0,1,2,3,4,5,6,7,8,9"
|
||||||
." resetStatistics:all,statBoilerGradientCoolDownMin,statAmbientTemp...,statElectricity...,statHours...,statHeatQ..."
|
." hotWaterCircPumpExtern:on,off"
|
||||||
." hotWaterTemperatureTarget "
|
." hotWaterTemperatureTarget "
|
||||||
|
." resetStatistics:all,statBoilerGradientCoolDownMin,statAmbientTemp...,statElectricity...,statHours...,statHeatQ..."
|
||||||
." returnTemperatureSetBack "
|
." returnTemperatureSetBack "
|
||||||
." opModeHotWater:Auto,Party,Off"
|
." opModeHotWater:Auto,Party,Off"
|
||||||
." synchronizeClockHeatPump:noArg"
|
." synchronizeClockHeatPump:noArg"
|
||||||
@ -594,7 +607,7 @@ LUXTRONIK2_DoUpdate($)
|
|||||||
# 27 - heatingSystemCircPump
|
# 27 - heatingSystemCircPump
|
||||||
$return_str .= "|".$heatpump_values[39];
|
$return_str .= "|".$heatpump_values[39];
|
||||||
# 28 - hotWaterCircPumpExtern
|
# 28 - hotWaterCircPumpExtern
|
||||||
$return_str .= "|".$heatpump_values[46];
|
$return_str .= "|". ($heatpump_visibility[57]==1 ? $heatpump_values[46] : "no");
|
||||||
# 29 - readingFhemStartTime
|
# 29 - readingFhemStartTime
|
||||||
$return_str .= "|".$readingStartTime;
|
$return_str .= "|".$readingStartTime;
|
||||||
# 30 - readingFhemEndTime
|
# 30 - readingFhemEndTime
|
||||||
@ -662,7 +675,6 @@ LUXTRONIK2_DoUpdate($)
|
|||||||
return $return_str;
|
return $return_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub ########################################
|
sub ########################################
|
||||||
LUXTRONIK2_UpdateDone($)
|
LUXTRONIK2_UpdateDone($)
|
||||||
{
|
{
|
||||||
@ -746,10 +758,12 @@ LUXTRONIK2_UpdateDone($)
|
|||||||
|
|
||||||
my $doStatistic = AttrVal($name,"doStatistics",0);
|
my $doStatistic = AttrVal($name,"doStatistics",0);
|
||||||
|
|
||||||
|
# Error
|
||||||
if ($a[1]==0 ) {
|
if ($a[1]==0 ) {
|
||||||
readingsSingleUpdate($hash,"state","Error: ".$a[2],1);
|
readingsSingleUpdate($hash,"state","Error: ".$a[2],1);
|
||||||
$counterRetry = 0;
|
$counterRetry = 0;
|
||||||
}
|
}
|
||||||
|
# Busy, restart update
|
||||||
elsif ($a[1]==2 ) {
|
elsif ($a[1]==2 ) {
|
||||||
if ($counterRetry <=3) {
|
if ($counterRetry <=3) {
|
||||||
InternalTimer(gettimeofday() + 5, "LUXTRONIK2_GetUpdate", $hash, 0);
|
InternalTimer(gettimeofday() + 5, "LUXTRONIK2_GetUpdate", $hash, 0);
|
||||||
@ -759,6 +773,7 @@ LUXTRONIK2_UpdateDone($)
|
|||||||
LUXTRONIK2_Log $hash, 2, "Device reading skipped after $counterRetry tries with parameter change on target";
|
LUXTRONIK2_Log $hash, 2, "Device reading skipped after $counterRetry tries with parameter change on target";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# Update readings
|
||||||
elsif ($a[1]==1 ) {
|
elsif ($a[1]==1 ) {
|
||||||
$counterRetry = 0;
|
$counterRetry = 0;
|
||||||
|
|
||||||
@ -1048,7 +1063,6 @@ LUXTRONIK2_UpdateAborted($)
|
|||||||
LUXTRONIK2_Log $hash, 1, "Timeout when connecting to host $host";
|
LUXTRONIK2_Log $hash, 1, "Timeout when connecting to host $host";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub ########################################
|
sub ########################################
|
||||||
LUXTRONIK2_CalcTemp($)
|
LUXTRONIK2_CalcTemp($)
|
||||||
{
|
{
|
||||||
@ -1084,15 +1098,14 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
my %opMode = ( "Auto" => 0,
|
my %opMode = ( "Auto" => 0,
|
||||||
"Party" => 2,
|
"Party" => 2,
|
||||||
"Off" => 4);
|
"Off" => 4);
|
||||||
|
|
||||||
if(AttrVal($name, "allowSetParameter", 0) != 1) {
|
if(AttrVal($name, "allowSetParameter", 0) != 1) {
|
||||||
return $name." Error: Setting of parameters not allowed. Please set attribut 'allowSetParameter' to 1";
|
return $name." Error: Setting of parameters not allowed. Please set attribut 'allowSetParameter' to 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($parameterName eq "hotWaterTemperatureTarget")
|
if ($parameterName eq "hotWaterTemperatureTarget") {
|
||||||
{
|
|
||||||
#parameter number
|
#parameter number
|
||||||
$setParameter = 2;
|
$setParameter = 2;
|
||||||
#limit temperature range
|
#limit temperature range
|
||||||
@ -1103,8 +1116,7 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
$realValue = $setValue / 10;
|
$realValue = $setValue / 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif ($parameterName eq "opModeHotWater")
|
elsif ($parameterName eq "opModeHotWater") {
|
||||||
{
|
|
||||||
if (! exists($opMode{$realValue})) {
|
if (! exists($opMode{$realValue})) {
|
||||||
return "$name Error: Wrong parameter given for opModeHotWater, use Automatik,Party,Off"
|
return "$name Error: Wrong parameter given for opModeHotWater, use Automatik,Party,Off"
|
||||||
}
|
}
|
||||||
@ -1112,8 +1124,7 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
$setValue = $opMode{$realValue};
|
$setValue = $opMode{$realValue};
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif ($parameterName eq "returnTemperatureSetBack")
|
elsif ($parameterName eq "returnTemperatureSetBack") {
|
||||||
{
|
|
||||||
#parameter number
|
#parameter number
|
||||||
$setParameter = 1;
|
$setParameter = 1;
|
||||||
#limit temperature range
|
#limit temperature range
|
||||||
@ -1123,8 +1134,17 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
$setValue = int($realValue * 2) * 5;
|
$setValue = int($realValue * 2) * 5;
|
||||||
$realValue = $setValue / 10;
|
$realValue = $setValue / 10;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
elsif ($parameterName eq "hotWaterCircPumpExtern") { #isVisible(167)
|
||||||
|
$setParameter = 684;
|
||||||
|
$setValue = $realValue eq "on" ? 1 : 0;
|
||||||
|
}
|
||||||
|
elsif ($parameterName eq "confirmDegasing") {
|
||||||
|
$setParameter = 158;
|
||||||
|
$setValue = $realValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
return "$name LUXTRONIK2_SetParameter-Error: unknown parameter $parameterName";
|
return "$name LUXTRONIK2_SetParameter-Error: unknown parameter $parameterName";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1137,11 +1157,12 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
PeerPort => 8888,
|
PeerPort => 8888,
|
||||||
Proto => 'tcp'
|
Proto => 'tcp'
|
||||||
);
|
);
|
||||||
if (!$socket) {
|
# Socket error
|
||||||
|
if (!$socket) {
|
||||||
LUXTRONIK2_Log $name, 1, "Could not open connection to host ".$host;
|
LUXTRONIK2_Log $name, 1, "Could not open connection to host ".$host;
|
||||||
return "$name Error: Could not open connection to host ".$host;
|
return "$name Error: Could not open connection to host ".$host;
|
||||||
}
|
}
|
||||||
$socket->autoflush(1);
|
$socket->autoflush(1);
|
||||||
|
|
||||||
LUXTRONIK2_Log $name, 5, "Set parameter $parameterName ($setParameter) = $realValue ($setValue)";
|
LUXTRONIK2_Log $name, 5, "Set parameter $parameterName ($setParameter) = $realValue ($setValue)";
|
||||||
$socket->send(pack("N", 3002));
|
$socket->send(pack("N", 3002));
|
||||||
@ -1170,14 +1191,13 @@ LUXTRONIK2_SetParameter($$$)
|
|||||||
|
|
||||||
$socket->close();
|
$socket->close();
|
||||||
|
|
||||||
readingsSingleUpdate($hash,$parameterName,$realValue,1);
|
readingsSingleUpdate($hash,$parameterName,$realValue,1) unless $parameterName eq "confirmDegasing";
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub ########################################
|
sub ########################################
|
||||||
LUXTRONIK2_synchronizeClock (@)
|
LUXTRONIK2_synchronizeClock (@)
|
||||||
{
|
{
|
||||||
@ -1779,12 +1799,15 @@ LUXTRONIK2_doStatisticDeltaSingle ($$$$$$$)
|
|||||||
<li><code>INTERVAL <polling interval></code><br>
|
<li><code>INTERVAL <polling interval></code><br>
|
||||||
Polling interval in seconds
|
Polling interval in seconds
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>opModeHotWater <Mode></code><br>
|
|
||||||
Operating Mode of domestic hot water boiler (Auto | Party | Off)
|
|
||||||
</li><br>
|
|
||||||
<li><code>hotWaterTemperatureTarget <temperature></code><br>
|
<li><code>hotWaterTemperatureTarget <temperature></code><br>
|
||||||
Target temperature of domestic hot water boiler in °C
|
Target temperature of domestic hot water boiler in °C
|
||||||
</li><br>
|
</li><br>
|
||||||
|
<li><code>hotWaterCirculationPumpExtern <on | off></code><br>
|
||||||
|
Switches the external circulation pump for the hot water on or off. The circulation prevents a cool down of the hot water in the pipes but increases the heat consumption drastically.
|
||||||
|
</li><br>
|
||||||
|
<li><code>opModeHotWater <Mode></code><br>
|
||||||
|
Operating Mode of domestic hot water boiler (Auto | Party | Off)
|
||||||
|
</li><br>
|
||||||
<li><code>resetStatistics <statReadings></code>
|
<li><code>resetStatistics <statReadings></code>
|
||||||
<br>
|
<br>
|
||||||
Deletes the selected statistic values <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
|
Deletes the selected statistic values <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
|
||||||
@ -1898,14 +1921,17 @@ LUXTRONIK2_doStatisticDeltaSingle ($$$$$$$)
|
|||||||
Dieser Wert muss entsprechend des vorhandenen oder geplanten Tarifes zum jeweiligen Zeitpunkt z.B. durch den FHEM-Befehl "at" gesetzt werden.<br>
|
Dieser Wert muss entsprechend des vorhandenen oder geplanten Tarifes zum jeweiligen Zeitpunkt z.B. durch den FHEM-Befehl "at" gesetzt werden.<br>
|
||||||
0 = tariflos
|
0 = tariflos
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>opModeHotWater <Betriebsmodus></code>
|
<li><code>hotWaterCirculationPumpExtern <on | off></code><br>
|
||||||
<br>
|
Schaltet die externe Warmwasser-Zirkulationspumpe an oder aus. Durch die Zirkulation wird ein Abkühlen des Warmwassers in den Hausleitungen verhindert. Der Wärmeverbrauch steigt jedoch drastisch.
|
||||||
Betriebsmodus des Heißwasserboilers ( Auto | Party | Off )
|
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>hotWaterTemperatureTarget <Temperatur></code>
|
<li><code>hotWaterTemperatureTarget <Temperatur></code>
|
||||||
<br>
|
<br>
|
||||||
Soll-Temperatur des Heißwasserboilers in °C
|
Soll-Temperatur des Heißwasserboilers in °C
|
||||||
</li><br>
|
</li><br>
|
||||||
|
<li><code>opModeHotWater <Betriebsmodus></code>
|
||||||
|
<br>
|
||||||
|
Betriebsmodus des Heißwasserboilers ( Auto | Party | Off )
|
||||||
|
</li><br>
|
||||||
<li><code>resetStatistics <statWerte></code>
|
<li><code>resetStatistics <statWerte></code>
|
||||||
<br>
|
<br>
|
||||||
Löscht die ausgewählten statisischen Werte: <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
|
Löscht die ausgewählten statisischen Werte: <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user