2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 16:19:11 +00:00

10_CUL_HM: AES handling disWM5

git-svn-id: https://svn.fhem.de/fhem/trunk@8899 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2015-07-05 18:16:45 +00:00
parent c024383546
commit 3648be987e

View File

@ -962,9 +962,17 @@ sub CUL_HM_Notify(@){#################################
return undef if (grep !/INITIALIZED/,@{$events});
delete $modules{CUL_HM}{NotifyFn};
CUL_HM_updateConfig("startUp");
InternalTimer(gettimeofday()+7,"CUL_HM_setupHMLAN", "initHMLAN", 0);
return undef;
}
sub CUL_HM_setupHMLAN(@){#################################
foreach (devspec2array("TYPE=CUL_HM:FILTER=DEF=......:FILTER=subType!=virtual")){
$defs{$_}{helper}{io}{newChn} = 0;
CUL_HM_hmInitMsgUpdt($defs{$_}); #update device init msg for HMLAN
}
}
#+++++++++++++++++ msg receive, parsing++++++++++++++++++++++++++++++++++++++++
# translate level to readable
my %lvlStr = ( md =>{ "HM-SEC-WDS" =>{"00"=>"dry" ,"64"=>"damp" ,"C8"=>"wet" }
@ -6379,13 +6387,13 @@ sub CUL_HM_getKeys($) { #in: device-hash out:highest index, hash with keys
my $highestIdx = 0;
my %keys = ();
$keys{0} = pack("H*", "A4E375C6B09FD185F27C4E96FC273AE4"); #index 0: eQ-3 default
if (defined($hash->{IODev}->{owner_CCU})) {
my $vccu = $hash->{IODev}->{owner_CCU};
$vccu = $hash->{IODev}->{NAME} if(!AttrVal($vccu,"hmKey",""));# if keys are not in vccu
my $vccu = $hash->{IODev}->{owner_CCU};
$vccu = $hash->{IODev}->{NAME} if(!defined($vccu) || !AttrVal($vccu,"hmKey",""));# if keys are not in vccu
if (defined($vccu)) {
foreach my $i (1..3){
my ($kNo,$k) = split(":",AttrVal($vccu,"hmKey".($i== 1?"":$i),""));
if (defined($k)) {
if (defined($kNo) && defined($k)) {
$kNo = hex($kNo);
$keys{$kNo} = pack("H*", $k);
$highestIdx = $kNo if ($kNo > $highestIdx);