1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-04 22:19:38 +00:00

minor bugs

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6230 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-07-10 13:49:00 +00:00
parent 67fc1a15de
commit f74370a76d
2 changed files with 46 additions and 31 deletions

View File

@ -2641,7 +2641,7 @@ sub CUL_HM_Get($@) {#+++++++++++++++++ get command+++++++++++++++++++++++++++++
my $h = undef; my $h = undef;
$h = $culHmGlobalGets->{$cmd} if(!$roleV); $h = $culHmGlobalGets->{$cmd} if(!$roleV);
$h = $culHmVrtGets->{$cmd} if($roleV); $h = $culHmVrtGets->{$cmd} if(!defined($h) && $roleV);
$h = $culHmSubTypeGets->{$st}{$cmd} if(!defined($h) && $culHmSubTypeGets->{$st}); $h = $culHmSubTypeGets->{$st}{$cmd} if(!defined($h) && $culHmSubTypeGets->{$st});
$h = $culHmModelGets->{$md}{$cmd} if(!defined($h) && $culHmModelGets->{$md}); $h = $culHmModelGets->{$md}{$cmd} if(!defined($h) && $culHmModelGets->{$md});
my @h; my @h;
@ -2777,15 +2777,18 @@ sub CUL_HM_Get($@) {#+++++++++++++++++ get command+++++++++++++++++++++++++++++
} }
elsif($cmd eq "cmdList") { ################################################# elsif($cmd eq "cmdList") { #################################################
my @arr; my @arr;
push @arr,"$_ $culHmGlobalGets->{$_}" foreach (keys %{$culHmGlobalGets});
if(!$roleV) {push @arr,"$_ $culHmGlobalGets->{$_}" foreach (keys %{$culHmGlobalGets})};
if($roleV) {push @arr,"$_ $culHmVrtGets->{$_}" foreach (keys %{$culHmVrtGets})};
push @arr,"$_ $culHmSubTypeGets->{$st}{$_}" foreach (keys %{$culHmSubTypeGets->{$st}}); push @arr,"$_ $culHmSubTypeGets->{$st}{$_}" foreach (keys %{$culHmSubTypeGets->{$st}});
push @arr,"$_ $culHmModelGets->{$md}{$_}" foreach (keys %{$culHmModelGets->{$md}}); push @arr,"$_ $culHmModelGets->{$md}{$_}" foreach (keys %{$culHmModelGets->{$md}});
my @arr1; my @arr1;
if( $st ne "virtual") {foreach(keys %{$culHmGlobalSets} ){push @arr1,"$_ ".$culHmGlobalSets->{$_} }}; if( !$roleV) {foreach(keys %{$culHmGlobalSets} ){push @arr1,"$_ ".$culHmGlobalSets->{$_} }};
if(($st eq "virtual"||!$st) && $roleD){foreach(keys %{$culHmGlobalSetsVrtDev} ){push @arr1,"$_ ".$culHmGlobalSetsVrtDev->{$_} }}; if(($st eq "virtual"||!$st) && $roleD){foreach(keys %{$culHmGlobalSetsVrtDev} ){push @arr1,"$_ ".$culHmGlobalSetsVrtDev->{$_} }};
if( $st ne "virtual" && $roleD){foreach(keys %{$culHmGlobalSetsDevice} ){push @arr1,"$_ ".$culHmGlobalSetsDevice->{$_} }}; if( !$roleV && $roleD){foreach(keys %{$culHmGlobalSetsDevice} ){push @arr1,"$_ ".$culHmGlobalSetsDevice->{$_} }};
if( $st ne "virtual" && $roleD){foreach(keys %{$culHmSubTypeDevSets->{$st}}){push @arr1,"$_ ".${$culHmSubTypeDevSets->{$st}}{$_}}}; if( !$roleV && $roleD){foreach(keys %{$culHmSubTypeDevSets->{$st}}){push @arr1,"$_ ".${$culHmSubTypeDevSets->{$st}}{$_}}};
if( $st ne "virtual" && $roleC){foreach(keys %{$culHmGlobalSetsChn} ){push @arr1,"$_ ".$culHmGlobalSetsChn->{$_} }}; if( !$roleV && $roleC){foreach(keys %{$culHmGlobalSetsChn} ){push @arr1,"$_ ".$culHmGlobalSetsChn->{$_} }};
if( $culHmSubTypeSets->{$st} && $roleC){foreach(keys %{$culHmSubTypeSets->{$st}} ){push @arr1,"$_ ".${$culHmSubTypeSets->{$st}}{$_} }}; if( $culHmSubTypeSets->{$st} && $roleC){foreach(keys %{$culHmSubTypeSets->{$st}} ){push @arr1,"$_ ".${$culHmSubTypeSets->{$st}}{$_} }};
if( $culHmModelSets->{$md}) {foreach(keys %{$culHmModelSets->{$md}} ){push @arr1,"$_ ".${$culHmModelSets->{$md}}{$_} }}; if( $culHmModelSets->{$md}) {foreach(keys %{$culHmModelSets->{$md}} ){push @arr1,"$_ ".${$culHmModelSets->{$md}}{$_} }};
if( $culHmChanSets->{$md."00"} && $roleD){foreach(keys %{$culHmChanSets->{$md."00"}} ){push @arr1,"$_ ".${$culHmChanSets->{$md."00"}}{$_} }}; if( $culHmChanSets->{$md."00"} && $roleD){foreach(keys %{$culHmChanSets->{$md."00"}} ){push @arr1,"$_ ".${$culHmChanSets->{$md."00"}}{$_} }};
@ -3322,7 +3325,6 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
elsif($cmd eq "level") { #################################################### elsif($cmd eq "level") { ####################################################
#level =>"<level> <relockDly> <speed>..." #level =>"<level> <relockDly> <speed>..."
my (undef,undef,$lvl,$rLocDly,$speed) = @a; my (undef,undef,$lvl,$rLocDly,$speed) = @a;
return "" if($lvl !~ m/^\d+\.?\d+$/)
return "please enter level 0 to 100" if (!defined($lvl) || $lvl !~ m/^\d+\.?\d+$/ || $lvl>100); return "please enter level 0 to 100" if (!defined($lvl) || $lvl !~ m/^\d+\.?\d+$/ || $lvl>100);
return "reloclDelay range 0..65535 or ignore" return "reloclDelay range 0..65535 or ignore"
@ -8093,14 +8095,16 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
<ul> <ul>
<li><B>general</B><br> <li><B>general</B><br>
recentStateType:[ack|info] # cannot be used ti trigger notifies<br> recentStateType:[ack|info] # cannot be used ti trigger notifies<br>
<ul> <ul>
<li>ack indicates that some statusinfo is derived from an acknowledge</li> <li>ack indicates that some statusinfo is derived from an acknowledge</li>
<li>info indicates an autonomous message from the device</li> <li>info indicates an autonomous message from the device</li>
<li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br> <li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br>
Alarming configuration access to the device from a unknown source<br></li> Alarming configuration access to the device from a unknown source<br></li>
<li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br> <li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br>
Alarming configuration access to the device that was not issued by our system<br></li> Alarming configuration access to the device that was not issued by our system<br></li>
</ul> <li><a name="CUL_HMtrigDst"><b>trigDst_&lt;name&gt;: noConfig</b></a><br>
A sensor triggered a Device which is not present in its peerList. Obviously the peerList is not up to date<br></li>
</ul>
</li> </li>
<li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br> <li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br>
T: $t H: $h<br> T: $t H: $h<br>
@ -9318,12 +9322,16 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
<ul> <ul>
<li><B>Allgemein</B><br> <li><B>Allgemein</B><br>
recentStateType:[ack|info] # kann nicht verwendet werden um Nachrichten zu triggern<br> recentStateType:[ack|info] # kann nicht verwendet werden um Nachrichten zu triggern<br>
<li>ack zeigt an das eine Statusinformation aus einer Best&auml;tigung abgeleitet wurde</li> <ul>
<li>info zeigt eine automatische Nachricht eines Ger&auml;ts an</li> <li>ack zeigt an das eine Statusinformation aus einer Best&auml;tigung abgeleitet wurde</li>
<li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br> <li>info zeigt eine automatische Nachricht eines Ger&auml;ts an</li>
Alarmiert bei Konfiguration des Ger&auml;ts durch unbekannte Quelle<br></li> <li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br>
<li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br> Alarmiert bei Konfiguration des Ger&auml;ts durch unbekannte Quelle<br></li>
Alarmiert bei Konfiguration des Ger&auml;ts welche nicht durch das System ausgel&ouml;st wurde<br></li> <li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br>
Alarmiert bei Konfiguration des Ger&auml;ts welche nicht durch das System ausgel&ouml;st wurde<br></li>
<li><a name="CUL_HMtrigDst"><b>trigDst_&lt;name&gt;: noConfig</b></a><br>
Ein Sensor triggert ein Device welches nicht in seiner Peerliste steht. Die Peerliste ist nicht akuell<br></li>
</ul>
</li> </li>
<li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br> <li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br>
T: $t H: $h<br> T: $t H: $h<br>

View File

@ -371,17 +371,18 @@ sub HMinfo_peerCheck(@) { #####################################################
my @peerIDsEmpty; my @peerIDsEmpty;
my @peerIDnotDef; my @peerIDnotDef;
my @peerIDsNoPeer; my @peerIDsNoPeer;
my @peerIDsUknTrig;
foreach my $eName (@entities){ foreach my $eName (@entities){
next if (!$defs{$eName}{helper}{role}{chn});#device has no channels next if (!$defs{$eName}{helper}{role}{chn});#device has no channels
my $peersUsed = CUL_HM_peerUsed($eName); my $peersUsed = CUL_HM_peerUsed($eName);
next if ($peersUsed == 0); next if ($peersUsed == 0);
my $id = $defs{$eName}{DEF};
my $devId = substr($id,0,6);
my $st = AttrVal(CUL_HM_id2Name($devId),"subType","");# from Master
my $md = AttrVal(CUL_HM_id2Name($devId),"model","");
my $peerIDs = AttrVal($eName,"peerIDs",undef); my $peerIDs = AttrVal($eName,"peerIDs",undef);
my @failTrig = map {CUL_HM_name2Id(substr($_,8))} grep /^trigDst_/,keys %{$defs{$eName}{READINGS}};
foreach (HMinfo_noDup(@failTrig)){
push @peerIDsUknTrig,"undefinedTrigger: ".$eName.":".$_ if($_ && $peerIDs !~ m/$_/);
}
if (!$peerIDs){ # no peers - is this correct? if (!$peerIDs){ # no peers - is this correct?
push @peerIDsEmpty,"empty: ".$eName if ($peersUsed != 3); push @peerIDsEmpty,"empty: ".$eName if ($peersUsed != 3);
} }
@ -389,6 +390,10 @@ sub HMinfo_peerCheck(@) { #####################################################
push @peerIDsFail,"incomplete: ".$eName.":".$peerIDs; push @peerIDsFail,"incomplete: ".$eName.":".$peerIDs;
} }
else{# work on a valid list: else{# work on a valid list:
my $id = $defs{$eName}{DEF};
my $devId = substr($id,0,6);
my $st = AttrVal(CUL_HM_id2Name($devId),"subType","");# from Master
my $md = AttrVal(CUL_HM_id2Name($devId),"model","");
next if ($st eq "repeater"); next if ($st eq "repeater");
foreach my $pId (split",",$peerIDs){ foreach my $pId (split",",$peerIDs){
next if ($pId eq "00000000" ||$pId =~m /$devId/); next if ($pId eq "00000000" ||$pId =~m /$devId/);
@ -413,10 +418,12 @@ sub HMinfo_peerCheck(@) { #####################################################
} }
} }
my $ret = ""; my $ret = "";
$ret .="\n\n peer list not read" ."\n ".(join "\n ",sort @peerIDsEmpty) if(@peerIDsEmpty); $ret .="\n\n peer list not read" ."\n ".(join "\n ",sort @peerIDsEmpty) if(@peerIDsEmpty);
$ret .="\n\n peer list incomplete"."\n ".(join "\n ",sort @peerIDsFail) if(@peerIDsFail); $ret .="\n\n peer list incomplete"."\n ".(join "\n ",sort @peerIDsFail) if(@peerIDsFail);
$ret .="\n\n peer not defined" ."\n ".(join "\n ",sort @peerIDnotDef) if(@peerIDnotDef); $ret .="\n\n peer not defined" ."\n ".(join "\n ",sort @peerIDnotDef) if(@peerIDnotDef);
$ret .="\n\n peer not verified" ."\n ".(join "\n ",sort @peerIDsNoPeer)if(@peerIDsNoPeer); $ret .="\n\n peer not verified" ."\n ".(join "\n ",sort @peerIDsNoPeer) if(@peerIDsNoPeer);
$ret .="\n\n peer unknown trigger"."\n ".(join "\n ",sort @peerIDsUknTrig)if(@peerIDsUknTrig);
return $ret; return $ret;
} }
sub HMinfo_burstCheck(@) { #################################################### sub HMinfo_burstCheck(@) { ####################################################