2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 02:59:49 +00:00

New functionality to support Floorplan Aggregate, depends on statusHTML attribute being set

git-svn-id: https://svn.fhem.de/fhem/trunk@1510 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
oskarfessel 2012-05-01 06:11:04 +00:00
parent 457aac3216
commit 624a227967
3 changed files with 38 additions and 15 deletions

View File

@ -39,7 +39,7 @@ LUXTRONIK2_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "LUXTRONIK2_Define";
$hash->{AttrList} = "loglevel:0,1,2,3,4,5,6";
$hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 firmware statusHTML";
}
sub
@ -178,7 +178,7 @@ LUXTRONIK2_GetStatus($)
if($err_log ne "")
{
Log GetLogLevel($name,2), "LUXTRONIK2 ".$err_log;
return("");
return("LUXTRONIK2 general problem with heatpump connection");
}
my %wpOpStat1 = ( 0 => "Waermepumpe laeuft",
@ -210,6 +210,13 @@ LUXTRONIK2_GetStatus($)
# Erst die operativen Stati und Parameterenstellungen
if(AttrVal($hash->{NAME}, "firmware", "none") ne "none") {
$attr{$hash->{NAME}}{firmware} = $heatpump_values[81];
for(my $fi=82; $fi<91; $fi++) {
$attr{$hash->{NAME}}{firmware} .= $heatpump_values[$fi];
}
}
$sensor = "currentOperatingStatus1";
$switch = $heatpump_values[117];
$value = $wpOpStat1{$switch};
@ -288,17 +295,17 @@ LUXTRONIK2_GetStatus($)
LUXTRONIK2_TempValueMerken($hash,$heatpump_values[17],"hotWaterTemperature");
# Wert 10 gibt die Vorlauftemperatur an, die
# korrekte Ãœbersetzung ist flow temperature.
# korrekte Uebersetzung ist flow temperature.
LUXTRONIK2_TempValueMerken($hash,$heatpump_values[10],"flowTemperature");
# Rücklauftempereatur
# Ruecklauftempereatur
LUXTRONIK2_TempValueMerken($hash,$heatpump_values[11],"returnTemperature");
# Rücklauftemperatur Sollwert
# Ruecklauftemperatur Sollwert
LUXTRONIK2_TempValueMerken($hash,$heatpump_values[12],"returnTemperatureTarget");
# Rücklauftemperatur am externen Sensor.
# Ruecklauftemperatur am externen Sensor.
LUXTRONIK2_TempValueMerken($hash,$heatpump_values[13],"returnTemperatureExtern");
# Durchfluss Wärmemengenzähler
# Durchfluss Wärmemengenzähler
# Durchfluss Waermemengenzaehler
$sensor = "flowRate";
$value = $heatpump_values[155];
if($hash->{READINGS}{$sensor}{VAL} != $value) {
@ -307,7 +314,18 @@ LUXTRONIK2_GetStatus($)
$hash->{READINGS}{$sensor}{UNIT} = "l/h";
$hash->{CHANGED}[$cc++] = $sensor.": ".$value;
}
if(AttrVal($hash->{NAME}, "statusHTML", "none") ne "none") {
$sensor = "floorplanHTML";
$value = '<div class=fp_' . $name . '_title>' . $name . "</div>";
$value .= $hash->{READINGS}{'currentOperatingStatus1'}{VAL} . '<br>';
$value .= $hash->{READINGS}{'currentOperatingStatus2'}{VAL} . '<br>';
$value .= "Brauchwasser:" . $hash->{READINGS}{hotWaterTemperature}{VAL} . '&deg;C';
$hash->{READINGS}{$sensor}{TIME} = TimeNow();
$hash->{READINGS}{$sensor}{VAL} = $value;
$hash->{READINGS}{$sensor}{UNIT} = "HTML";
}
DoTrigger($name, undef) if($init_done);
}

View File

@ -2,6 +2,10 @@
Module to control FHT8V valve servos via CUL/CUN
precondition: support must be added to 00_CUL.pm. This support is primary
tested with a modified send-method of the culfw.
- 23_LUXTRONIK2.pm
Support for the heatpump controller LUXTRONIK2 used by Alpha-Innotec
and Siemens and probably some other vendors, too. LUX2.gplot is one
example plotting template.
- 70_SCIVT.pm
Support for an SCD series solar controler device. Details see
http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_118

View File

@ -6,13 +6,14 @@ use Device::SerialPort;
use Time::HiRes qw(gettimeofday);
sub pp($$);
if(@ARGV != 3) {
printf("Usage: perl serial.pl serial-device outfile initial-hex-msg\n");
if(@ARGV != 4) {
printf("Usage: perl serial.pl serial-device baudrate outfile initial-hex-msg\n");
exit(1);
}
my $ser = $ARGV[0];
my $fil = $ARGV[1];
my $hm = $ARGV[2];
my $baud = $ARGV[1];
my $fil = $ARGV[2];
my $hm = $ARGV[3];
my $fd;
open($fd, ">$fil") || die("Can't open $fil for writing\n");
@ -22,7 +23,7 @@ $| = 1;
my $serport = new Device::SerialPort ($ser);
die "Can't open $ser: $!\n" if(!$serport);
$serport->reset_error();
$serport->baudrate(38400);
$serport->baudrate($baud);
$serport->databits(8);
$serport->parity('none');
$serport->stopbits(1);