CUL_HM:SD2 alarm 4nd

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11499 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2016-05-22 17:42:23 +00:00
parent 097f8eac31
commit 73c143e74e
2 changed files with 25 additions and 4 deletions

View File

@ -5124,7 +5124,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
# 96 switch on- others unknown # 96 switch on- others unknown
my $msg = CUL_HM_generateCBCsignature($hash, my $msg = CUL_HM_generateCBCsignature($hash,
sprintf("++1441$dst${sId}01%02X9600",$testnr)); 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)); 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 sub CUL_HM_setTmplDisp($){ # remove register i outdated
my $tHash = shift; my $tHash = shift;
#{CUL_HM_setTmplDisp($defs{loDoor})}
delete $tHash->{READINGS}{$_} foreach (grep /^tmpl_/ ,keys %{$tHash->{READINGS}}); delete $tHash->{READINGS}{$_} foreach (grep /^tmpl_/ ,keys %{$tHash->{READINGS}});
if ($tHash->{helper}{expert}{tpl}){ if ($tHash->{helper}{expert}{tpl}){
foreach (keys %{$tHash->{helper}{tmpl}}){ foreach (keys %{$tHash->{helper}{tmpl}}){
my ($p,$t) = split(">",$_); 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<scalar(@value); $i++){
$param[$i] .= ":".$value[$i];
}
$t .= ":".join(" ",@param);
}
$tHash->{READINGS}{"tmpl_".$p}{VAL} .= $t.",";#could be more than one! $tHash->{READINGS}{"tmpl_".$p}{VAL} .= $t.",";#could be more than one!
$tHash->{READINGS}{"tmpl_".$p}{TIME} .= "-";# time does not make sense $tHash->{READINGS}{"tmpl_".$p}{TIME} .= "-";# time does not make sense
} }

View File

@ -2344,7 +2344,18 @@ sub HMinfo_templateUsg(@){#####################################################
next;} next;}
} }
else{ 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<scalar(@value); $i++){
$param[$i] .= ":".$value[$i];
}
$para = join(" ",@param);
}
push @ul,sprintf("%-20s|%-15s|%s|%s",$dName,$p,$t,$para);}
} }
} }
return join("\n",sort(@ul)); return join("\n",sort(@ul));