From 73c143e74eefeb1ed6c5ec6cb022ee0322c8fda4 Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Sun, 22 May 2016 17:42:23 +0000 Subject: [PATCH] CUL_HM:SD2 alarm 4nd git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11499 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_CUL_HM.pm | 14 ++++++++++++-- FHEM/98_HMinfo.pm | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm index 5d7d94ff4..bbce77595 100755 --- a/FHEM/10_CUL_HM.pm +++ b/FHEM/10_CUL_HM.pm @@ -5124,7 +5124,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++ # 96 switch on- others unknown my $msg = CUL_HM_generateCBCsignature($hash, sprintf("++1441$dst${sId}01%02X9600",$testnr)); - CUL_HM_PushCmdStack($hash, $msg) foreach (1..1); + CUL_HM_PushCmdStack($hash, $msg) foreach (1..6); CUL_HM_parseSDteam_2("41",$dst,$sId,substr($msg, 18)); } } @@ -7315,11 +7315,21 @@ sub CUL_HM_chgExpLvl($){# update visibility and set internal values for expert } sub CUL_HM_setTmplDisp($){ # remove register i outdated my $tHash = shift; +#{CUL_HM_setTmplDisp($defs{loDoor})} delete $tHash->{READINGS}{$_} foreach (grep /^tmpl_/ ,keys %{$tHash->{READINGS}}); if ($tHash->{helper}{expert}{tpl}){ foreach (keys %{$tHash->{helper}{tmpl}}){ my ($p,$t) = split(">",$_); - $t .= ":".$tHash->{helper}{tmpl}{$_} if($tHash->{helper}{tmpl}{$_}); + + my @param; + if($tHash->{helper}{tmpl}{$_}){ + @param = split(" ",$HMConfig::culHmTpl{$t}{p}); + my @value = split(" ",$tHash->{helper}{tmpl}{$_}); + for (my $i = 0; $i{READINGS}{"tmpl_".$p}{VAL} .= $t.",";#could be more than one! $tHash->{READINGS}{"tmpl_".$p}{TIME} .= "-";# time does not make sense } diff --git a/FHEM/98_HMinfo.pm b/FHEM/98_HMinfo.pm index b8554a63b..b3ddd7122 100644 --- a/FHEM/98_HMinfo.pm +++ b/FHEM/98_HMinfo.pm @@ -2284,7 +2284,7 @@ sub HMinfo_templateSet(@){##################################################### my ($min,$max) = ($1,$2) if ($ret =~ m/range:(.*) to (.*) :/); $max = 0 if (!$max); $max =~ s/([0-9\.]+).*/$1/; - return "$regV out of range: $min to $max" if ($min && ($regV < $min || ($max && $regV > $max))); + return "$regV out of range: $min to $max" if ($min && ($regV < $min || ($max && $regV > $max))); } push @regCh,"$regN,$regV"; } @@ -2344,7 +2344,18 @@ sub HMinfo_templateUsg(@){##################################################### next;} } else{ - push @ul,sprintf("%-20s|%-15s|%s|%s",$dName,$p,$t,$defs{$dName}{helper}{tmpl}{$tid});} + my @param; + my $para = ""; + if($defs{$dName}{helper}{tmpl}{$tid}){ + @param = split(" ",$HMConfig::culHmTpl{$t}{p}); + my @value = split(" ",$defs{$dName}{helper}{tmpl}{$tid}); + for (my $i = 0; $i