From f74370a76d021ebbd4d7b8e8c34819d33cd65b76 Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Thu, 10 Jul 2014 13:49:00 +0000 Subject: [PATCH] minor bugs git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6230 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_CUL_HM.pm | 50 +++++++++++++++++++++++++++-------------------- FHEM/98_HMinfo.pm | 27 +++++++++++++++---------- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm index c5a44b3bf..ebf47f5ba 100755 --- a/FHEM/10_CUL_HM.pm +++ b/FHEM/10_CUL_HM.pm @@ -2641,7 +2641,7 @@ sub CUL_HM_Get($@) {#+++++++++++++++++ get command+++++++++++++++++++++++++++++ my $h = undef; $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 = $culHmModelGets->{$md}{$cmd} if(!defined($h) && $culHmModelGets->{$md}); my @h; @@ -2777,15 +2777,18 @@ sub CUL_HM_Get($@) {#+++++++++++++++++ get command+++++++++++++++++++++++++++++ } elsif($cmd eq "cmdList") { ################################################# 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,"$_ $culHmModelGets->{$md}{$_}" foreach (keys %{$culHmModelGets->{$md}}); 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 ne "virtual" && $roleD){foreach(keys %{$culHmGlobalSetsDevice} ){push @arr1,"$_ ".$culHmGlobalSetsDevice->{$_} }}; - if( $st ne "virtual" && $roleD){foreach(keys %{$culHmSubTypeDevSets->{$st}}){push @arr1,"$_ ".${$culHmSubTypeDevSets->{$st}}{$_}}}; - if( $st ne "virtual" && $roleC){foreach(keys %{$culHmGlobalSetsChn} ){push @arr1,"$_ ".$culHmGlobalSetsChn->{$_} }}; + if( !$roleV && $roleD){foreach(keys %{$culHmGlobalSetsDevice} ){push @arr1,"$_ ".$culHmGlobalSetsDevice->{$_} }}; + if( !$roleV && $roleD){foreach(keys %{$culHmSubTypeDevSets->{$st}}){push @arr1,"$_ ".${$culHmSubTypeDevSets->{$st}}{$_}}}; + if( !$roleV && $roleC){foreach(keys %{$culHmGlobalSetsChn} ){push @arr1,"$_ ".$culHmGlobalSetsChn->{$_} }}; if( $culHmSubTypeSets->{$st} && $roleC){foreach(keys %{$culHmSubTypeSets->{$st}} ){push @arr1,"$_ ".${$culHmSubTypeSets->{$st}}{$_} }}; 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"}}{$_} }}; @@ -3322,7 +3325,6 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++ elsif($cmd eq "level") { #################################################### #level =>" ..." 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 "reloclDelay range 0..65535 or ignore" @@ -8093,14 +8095,16 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
  • general
    recentStateType:[ack|info] # cannot be used ti trigger notifies
    -
      -
    • ack indicates that some statusinfo is derived from an acknowledge
    • -
    • info indicates an autonomous message from the device
    • -
    • sabotageAttackId
      - Alarming configuration access to the device from a unknown source
    • -
    • sabotageAttack
      - Alarming configuration access to the device that was not issued by our system
    • -
    +
      +
    • ack indicates that some statusinfo is derived from an acknowledge
    • +
    • info indicates an autonomous message from the device
    • +
    • sabotageAttackId
      + Alarming configuration access to the device from a unknown source
    • +
    • sabotageAttack
      + Alarming configuration access to the device that was not issued by our system
    • +
    • trigDst_<name>: noConfig
      + A sensor triggered a Device which is not present in its peerList. Obviously the peerList is not up to date
    • +
  • HM-CC-TC,ROTO_ZEL-STG-RM-FWT
    T: $t H: $h
    @@ -9318,12 +9322,16 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
    • Allgemein
      recentStateType:[ack|info] # kann nicht verwendet werden um Nachrichten zu triggern
      -
    • ack zeigt an das eine Statusinformation aus einer Bestätigung abgeleitet wurde
    • -
    • info zeigt eine automatische Nachricht eines Geräts an
    • -
    • sabotageAttackId
      - Alarmiert bei Konfiguration des Geräts durch unbekannte Quelle
    • -
    • sabotageAttack
      - Alarmiert bei Konfiguration des Geräts welche nicht durch das System ausgelöst wurde
    • +
        +
      • ack zeigt an das eine Statusinformation aus einer Bestätigung abgeleitet wurde
      • +
      • info zeigt eine automatische Nachricht eines Geräts an
      • +
      • sabotageAttackId
        + Alarmiert bei Konfiguration des Geräts durch unbekannte Quelle
      • +
      • sabotageAttack
        + Alarmiert bei Konfiguration des Geräts welche nicht durch das System ausgelöst wurde
      • +
      • trigDst_<name>: noConfig
        + Ein Sensor triggert ein Device welches nicht in seiner Peerliste steht. Die Peerliste ist nicht akuell
      • +
    • HM-CC-TC,ROTO_ZEL-STG-RM-FWT
      T: $t H: $h
      diff --git a/FHEM/98_HMinfo.pm b/FHEM/98_HMinfo.pm index 201730c00..3c68f87d6 100644 --- a/FHEM/98_HMinfo.pm +++ b/FHEM/98_HMinfo.pm @@ -371,17 +371,18 @@ sub HMinfo_peerCheck(@) { ##################################################### my @peerIDsEmpty; my @peerIDnotDef; my @peerIDsNoPeer; + my @peerIDsUknTrig; foreach my $eName (@entities){ next if (!$defs{$eName}{helper}{role}{chn});#device has no channels my $peersUsed = CUL_HM_peerUsed($eName); 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 @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? push @peerIDsEmpty,"empty: ".$eName if ($peersUsed != 3); } @@ -389,6 +390,10 @@ sub HMinfo_peerCheck(@) { ##################################################### push @peerIDsFail,"incomplete: ".$eName.":".$peerIDs; } 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"); foreach my $pId (split",",$peerIDs){ next if ($pId eq "00000000" ||$pId =~m /$devId/); @@ -413,10 +418,12 @@ sub HMinfo_peerCheck(@) { ##################################################### } } my $ret = ""; - $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 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 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 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 unknown trigger"."\n ".(join "\n ",sort @peerIDsUknTrig)if(@peerIDsUknTrig); + return $ret; } sub HMinfo_burstCheck(@) { ####################################################