10_CUL_HM: attack bug and hmKey retriction
git-svn-id: https://svn.fhem.de/fhem/trunk@8719 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -74,7 +74,7 @@ sub HMLAN_Initialize($) {
|
||||
$hash->{UndefFn} = "HMLAN_Undef";
|
||||
$hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 " .
|
||||
"addvaltrigger " .
|
||||
"hmId hmKey hmKey2 hmKey3 hmKey4 hmKey5 " .
|
||||
"hmId hmKey hmKey2 hmKey3 ".#hmKey4 hmKey5 " .
|
||||
"respTime " .
|
||||
"hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger ".
|
||||
"hmMsgLowLimit ".
|
||||
@@ -890,7 +890,7 @@ sub HMLAN_writeAesKey($) {#####################################################
|
||||
return if (!$name || !$defs{$name});
|
||||
my $vccu = InternalVal($name,"owner_CCU",$name);
|
||||
$vccu = $name if(!AttrVal($vccu,"hmKey",""));#General if keys are not in vccu
|
||||
foreach my $i (1..5){
|
||||
foreach my $i (1..3){
|
||||
my ($kNo,$k) = split(":",AttrVal($vccu,"hmKey".($i== 1?"":$i),""));
|
||||
HMLAN_SimpleWrite($defs{$name}, "Y0$i,".($k?"$kNo,$k":"00,"));
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ sub CUL_HM_Initialize($) {
|
||||
."hmProtocolEvents:0_off,1_dump,2_dumpFull,3_dumpTrigger "
|
||||
."rssiLog:1,0 " # enable writing RSSI to Readings (device only)
|
||||
."actCycle " # also for action detector
|
||||
."hmKey hmKey2 hmKey3 hmKey4 hmKey5 "
|
||||
."hmKey hmKey2 hmKey3 "
|
||||
;
|
||||
$hash->{Attr}{devPhy} = # -- physical device only attributes
|
||||
"serialNr firmware .stc .devInfo "
|
||||
@@ -1038,9 +1038,10 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
my ($evntCnt,undef) = split(' last_at:',$dstH->{"prot"."ErrIoId_$src"},2);
|
||||
push @evtEt,[$dstH,1,"sabotageAttackId:ErrIoId_$src cnt:$evntCnt"];
|
||||
}
|
||||
my $tm = substr($msg,8);
|
||||
if( defined $dstH->{helper}{cSnd} &&
|
||||
$dstH->{helper}{cSnd} !~ m/substr($msg,7)/){
|
||||
Log3 $dname,2,"CUL_HM $dname attack:$dstH->{helper}{cSnd}:".substr($msg,7);
|
||||
$dstH->{helper}{cSnd} !~ m/$tm/){
|
||||
Log3 $dname,2,"CUL_HM $dname attack:$dstH->{helper}{cSnd}:".$tm;
|
||||
CUL_HM_eventP($dstH,"ErrIoAttack");
|
||||
my ($evntCnt,undef) = split(' last_at:',$dstH->{"prot"."ErrIoAttack"},2);
|
||||
push @evtEt,[$dstH,1,"sabotageAttack:ErrIoAttack cnt:$evntCnt"];
|
||||
|
||||
Reference in New Issue
Block a user