From c8f4e83e9bd569e0b26928c883d57663cf82ccf5 Mon Sep 17 00:00:00 2001 From: martinp876 Date: Mon, 10 Feb 2014 16:25:36 +0000 Subject: [PATCH] TC-IT update git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4870 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 10 +++++----- fhem/FHEM/HMConfig.pm | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index 032685304..b15a2ceb5 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -984,10 +984,10 @@ sub CUL_HM_Parse($$) {############################## } elsif($md eq "HM-TC-IT-WM-W-EU") { ########################################## my %ctlTbl=( 0=>"auto", 1=>"manu", 2=>"party",3=>"boost"); - if ($mTp eq "10" && $p =~ m/^0B(....)(..)(..)(..)/) {#info-level - my ($d1,$d2,$d3,$d4)=(hex($1),hex($2),hex($3),hex($4)); + if ($mTp eq "10" && $p =~ m/^0B/) {#info-level + my @d = map{hex($_)} unpack 'A2A4(A2)*',$p; my ($chn,$setTemp,$actTemp, $cRep,$bat,$lbat,$wRep, $ctrlMode) = - ("02",$d1,$d1, $d2,$d2,$d2,$d2, $d3); + ("02",$d[1],$d[1], $d[2],$d[2],$d[2],$d[2],$d[3]); $setTemp =(($setTemp >>10) & 0x3f )/2; $actTemp =(($actTemp ) & 0x2ff)/10; $actTemp = -1 * $actTemp if ($1 & 0x200 );# obey signed @@ -1016,7 +1016,7 @@ sub CUL_HM_Parse($$) {############################## my $chn = 1; $shash = $modules{CUL_HM}{defptr}{"$src$chn"} if($modules{CUL_HM}{defptr}{"$src$chn"}); - my ($t,$h) = (hex(substr($p,0,4)),hex(substr($p,6,2))); + my ($t,$h) = map{hex($_)} unpack 'A4A2',$p; $t -= 0x8000 if($t > 1638.4); $t = sprintf("%0.1f", $t/10); push @event, "temperature:$t"; @@ -1027,7 +1027,7 @@ sub CUL_HM_Parse($$) {############################## my $chn = 2; $shash = $modules{CUL_HM}{defptr}{"$src$chn"} if($modules{CUL_HM}{defptr}{"$src$chn"}); - my ($setTemp,$actTemp,) = (hex(substr($p,0,4)),hex(substr($p,4,2))); + my ($setTemp,$actTemp) = map{hex($_)} unpack 'A4A2',$p; $setTemp =(($setTemp >>10) & 0x3f )/2; $actTemp =(($actTemp ) & 0x2ff)/10; $actTemp = sprintf("%2.1f",$actTemp); diff --git a/fhem/FHEM/HMConfig.pm b/fhem/FHEM/HMConfig.pm index 8aa80dec4..9bffc6344 100644 --- a/fhem/FHEM/HMConfig.pm +++ b/fhem/FHEM/HMConfig.pm @@ -1269,6 +1269,7 @@ $culHmModelSets{"ROTO_ZEL-STG-RM-FWT"} = $culHmModelSets{"HM-CC-TC"}; ,tempListFri =>"[prep|exec] [p1|p2|p3] HH:MM temp ..." ,"desired-temp" =>"[on|off|5.0..30.0]" }, + "HM-TC-IT-WM-W-EU07"=>{ peerChan =>" ... single [set|unset] [actor|remote|both]"}, "HM-ES-PMSw1-Pl01" =>{ "on-for-timer" =>"" ,"on-till" =>"