mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
pmsw correction for threashold register, tempList handling of HMInfo improvement
git-svn-id: https://svn.fhem.de/fhem/trunk@5874 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
cf1314bbc9
commit
123152ada7
@ -626,7 +626,6 @@ sub HMinfo_tempList(@) { ######################################################
|
||||
sub HMinfo_tempListTmpl(@) { ##################################################
|
||||
my ($filter,$tmpl,$action,$fName)=@_;
|
||||
$filter = "." if (!$filter);
|
||||
# return "no template name given" if (!$tmpl);
|
||||
my %dl =("Sat"=>0,"Sun"=>1,"Mon"=>2,"Tue"=>3,"Wed"=>4,"Thu"=>5,"Fri"=>6);
|
||||
my $ret = "";
|
||||
my @el ;
|
||||
@ -640,19 +639,20 @@ sub HMinfo_tempListTmpl(@) { ##################################################
|
||||
push @el,$chN;
|
||||
}
|
||||
return "no entities selected" if (!scalar @el);
|
||||
$tmpl = (!$tmpl)?"":($fName?$fName.":".$tmpl:$tmpl);
|
||||
$tmpl = (!$tmpl) ? ""
|
||||
: ($fName ? $fName.":".$tmpl
|
||||
: $tmpl);
|
||||
my @rs;
|
||||
foreach my $name (@el){
|
||||
my $tmplDev;
|
||||
if (!$tmpl){
|
||||
$tmplDev = AttrVal($name,"tempListTmpl","tempList.cfg:$name");
|
||||
}
|
||||
else{
|
||||
$tmplDev = $tmpl;
|
||||
}
|
||||
$tmplDev = $tmpl ? $tmpl
|
||||
: AttrVal($name,"tempListTmpl","tempList.cfg:$name");
|
||||
|
||||
my $r = CUL_HM_tempListTmpl($name,$action,$tmplDev);
|
||||
|
||||
push @rs, "$tmplDev -> ".($r?$r:"passed:$name")."\n";
|
||||
|
||||
push @rs, ($r ? "fail : $tmplDev for $name: $r"
|
||||
: "passed: $tmplDev for $name")
|
||||
."\n";
|
||||
}
|
||||
$ret .= join "",sort @rs;
|
||||
return $ret;
|
||||
@ -890,6 +890,15 @@ sub HMinfo_GetFn($@) {#########################################################
|
||||
.HMinfo_peerCheck(@entities)
|
||||
.HMinfo_burstCheck(@entities)
|
||||
.HMinfo_paramCheck(@entities);
|
||||
|
||||
my @td = (devspec2array("model=HM-CC-RT-DN.*:FILTER=chanNo=04:FILTER=tempListTmpl=.*"),
|
||||
devspec2array("model=HM.*-TC.*:FILTER=chanNo=02:FILTER=tempListTmpl=.*"));
|
||||
my @tlr;
|
||||
foreach my $e (@td){
|
||||
my $tr = CUL_HM_tempListTmpl($e,"verify",AttrVal($e,"tempListTmpl","tempList.cfg:$e"));
|
||||
push @tlr,$tr if($tr);
|
||||
}
|
||||
$ret .= "\templist mismatch \n ".join("\n ",@tlr) if (@tlr);
|
||||
}
|
||||
elsif($cmd eq "templateChk"){##template: see if it applies ------------------
|
||||
my $repl;
|
||||
@ -1187,6 +1196,9 @@ sub HMinfo_SetFn($@) {#########################################################
|
||||
$ret = HMinfo_tempList($filter,$a[0],$fn);
|
||||
}
|
||||
elsif($cmd eq "tempListTmpl"){##handle thermostat templist from file --------
|
||||
if ($a[0] =~ m/(verify|restore)/){#allow default template - i.e. not specified
|
||||
unshift @a,"";
|
||||
}
|
||||
my $fn = $a[2]?$a[2]:"";
|
||||
my $ac = $a[1]?$a[1]:"verify";
|
||||
$fn = AttrVal($name,"configDir",".")."\/".$fn if ($fn && $fn !~ m/\//);
|
||||
|
@ -547,14 +547,14 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
cndTxDecAbove =>{a=>133 ,s=>1 ,l=>1,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"level for cndTxCycAbove"},
|
||||
cndTxDecBelow =>{a=>134 ,s=>1 ,l=>1,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"level for cndTxCycBelow"},
|
||||
|
||||
txThrLoPwr =>{a=>135.0,s=>4 ,l=>1,min=>0 ,max=>3680 ,c=>'' ,f=>'100' ,u=>'W' ,d=>1,t=>"threshold low power"},
|
||||
txThrHiPwr =>{a=>139.0,s=>4 ,l=>1,min=>0 ,max=>3680 ,c=>'' ,f=>'100' ,u=>'W' ,d=>1,t=>"threshold high power"},
|
||||
txThrLoCur =>{a=>135.0,s=>4 ,l=>1,min=>0 ,max=>16000 ,c=>'' ,f=>'100' ,u=>'mA' ,d=>1,t=>"threshold low current"},
|
||||
txThrHiCur =>{a=>139.0,s=>4 ,l=>1,min=>0 ,max=>16000 ,c=>'' ,f=>'100' ,u=>'mA' ,d=>1,t=>"threshold high current"},
|
||||
txThrLoVlt =>{a=>135.0,s=>4 ,l=>1,min=>115 ,max=>255 ,c=>'' ,f=>'100' ,u=>'V' ,d=>1,t=>"threshold low voltage"},
|
||||
txThrHiVlt =>{a=>139.0,s=>4 ,l=>1,min=>115 ,max=>255 ,c=>'' ,f=>'100' ,u=>'V' ,d=>1,t=>"threshold high voltage"},
|
||||
txThrLoFrq =>{a=>135.0,s=>4 ,l=>1,min=>48.72,max=>51.27 ,c=>'' ,f=>'100' ,u=>'Hz' ,d=>1,t=>"threshold low frequency"},
|
||||
txThrHiFrq =>{a=>139.0,s=>4 ,l=>1,min=>48.72,max=>51.27 ,c=>'' ,f=>'100' ,u=>'Hz' ,d=>1,t=>"threshold high frequency"},
|
||||
txThrHiPwr =>{a=>135.0,s=>4 ,l=>1,min=>0 ,max=>3680 ,c=>'' ,f=>'100' ,u=>'W' ,d=>1,t=>"threshold low power"},
|
||||
txThrLoPwr =>{a=>139.0,s=>4 ,l=>1,min=>0 ,max=>3680 ,c=>'' ,f=>'100' ,u=>'W' ,d=>1,t=>"threshold high power"},
|
||||
txThrHiCur =>{a=>135.0,s=>4 ,l=>1,min=>0 ,max=>16000 ,c=>'' ,f=>'' ,u=>'mA' ,d=>1,t=>"threshold low current"},
|
||||
txThrLoCur =>{a=>139.0,s=>4 ,l=>1,min=>0 ,max=>16000 ,c=>'' ,f=>'' ,u=>'mA' ,d=>1,t=>"threshold high current"},
|
||||
txThrHiVlt =>{a=>135.0,s=>4 ,l=>1,min=>115 ,max=>255 ,c=>'' ,f=>'10' ,u=>'V' ,d=>1,t=>"threshold low voltage"},
|
||||
txThrLoVlt =>{a=>139.0,s=>4 ,l=>1,min=>115 ,max=>255 ,c=>'' ,f=>'10' ,u=>'V' ,d=>1,t=>"threshold high voltage"},
|
||||
txThrHiFrq =>{a=>135.0,s=>4 ,l=>1,min=>48.72,max=>51.27 ,c=>'' ,f=>'100' ,u=>'Hz' ,d=>1,t=>"threshold low frequency"},
|
||||
txThrLoFrq =>{a=>139.0,s=>4 ,l=>1,min=>48.72,max=>51.27 ,c=>'' ,f=>'100' ,u=>'Hz' ,d=>1,t=>"threshold high frequency"},
|
||||
|
||||
evtFltrPeriod =>{a=> 1.0,s=>0.4,l=>1,min=>0.5,max=>7.5 ,c=>'' ,f=>2 ,u=>'s' ,d=>1,t=>"event filter period"},
|
||||
evtFltrNum =>{a=> 1.4,s=>0.4,l=>1,min=>1 ,max=>15 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"sensitivity - read each n-th puls"},
|
||||
|
Loading…
Reference in New Issue
Block a user