mod8 fixes

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6335 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2014-07-31 06:17:25 +00:00
parent 5c9cfd6caa
commit ae28d78abb
2 changed files with 23 additions and 3 deletions

View File

@@ -5900,6 +5900,11 @@ sub CUL_HM_updtRegDisp($$$) {
my $regLN = (($expL == 2)?"":".")
.sprintf("RegL_%02X:",$listNo)
.($peerId?CUL_HM_peerChName($peerId,$devId):"");
if (($md eq "HM-MOD-Re-8") && $listNo == 0){#handle Fw bug
CUL_HM_ModRe8($hash,$regLN);
}
foreach my $rgN (@regArr){
next if ($culHmRegDefine->{$rgN}->{l} ne $listNo);
my $rgVal = CUL_HM_getRegFromStore($name,$rgN,$list,$peerId,$regLN);
@@ -6322,7 +6327,6 @@ sub CUL_HM_TCITRTtempReadings($$@) {# parse RT - TC-IT temperature readings
CUL_HM_UpdtReadBulk($hash,1,@changedRead) if (@changedRead);
return $setting;
}
sub CUL_HM_repReadings($) { # parse repeater
my ($hash)=@_;
my %pCnt;
@@ -6368,6 +6372,22 @@ sub CUL_HM_repReadings($) { # parse repeater
CUL_HM_UpdtReadBulk($hash,0,@readList);
return "No Source Dest Bcast\n". join"\n", sort @retL;
}
sub CUL_HM_ModRe8($$) { # repair FW bug
#Register 18 may come with a wrong address - we will corrent that
my ($hash,$regN)=@_;
my $rl0 = ReadingsVal($hash->{NAME},$regN,undef);
return if( $rl0 !~ m/00:00/ # not if List is incomplete
||$rl0 =~ m/12:/ ); # reg 18 present, dont touch
foreach my $ad (split(" ",$rl0)){
my ($a,$d) = split(":",$ad);
my $ah = hex($a);
if ($ah & 0xe0 && (($ah & 0x1F) == 0x12)){
Log3 $hash,3,"CUL_HM replace address $a to 0x12";
$hash->{READINGS}{$regN}{VAL} =~ s/ $a:/ 12:/;
last;
}
}
}
sub CUL_HM_dimLog($) {# dimmer readings - support virtual chan - unused so far
my ($hash)=@_;
my $lComb = CUL_HM_Get($hash,$hash->{NAME},"reg","logicCombination");

View File

@@ -451,7 +451,7 @@ my $K_actDetID = '000000'; # id of actionDetector
# Blind 9:00 10:00 20:00
# BL1TPBU 02:01 21:FF
# Dim1TPBU 02:01 21:FF 22:00
# HM-MOD-RC-8 30:49
# HM-MOD-Re-8 30:49
#Keymatic 3.3 unknown, seen 1 here
#--- list 1, Channel level------------------
@@ -811,7 +811,7 @@ $culHmRegType{pushButton} = $culHmRegType{remote};
},
"HM-CC-VD" =>{ valveOffset =>1,valveErrorPos =>1},
"HM-MOD-RC-8" =>{ lowBatLimitBA2 =>1,backlOnMode2 =>1},
"HM-MOD-Re-8" =>{ lowBatLimitBA2 =>1,backlOnMode2 =>1},
"HM-CC-TC" =>{ burstRx =>1,backlOnTime =>1,backlOnMode =>1,btnLock =>1},
"HM-CC-RT-DN" =>{ btnLock =>1,localResDis =>1,globalBtnLock =>1,modusBtnLock =>1
,cyclicInfoMsg =>1,cyclicInfoMsgDis=>1