2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 01:46:08 +00:00

TC reading revert mode setting

git-svn-id: https://svn.fhem.de/fhem/trunk@3020 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-04-02 10:15:58 +00:00
parent 539ff23a51
commit 54553765cf

View File

@ -779,18 +779,24 @@ sub CUL_HM_Parse($$) {##############################
} }
} }
elsif($st eq "THSensor") { ################################################## elsif($st eq "THSensor") { ##################################################
my $t = hex(substr($p,0,4)); if ($msgType eq "70"){
$t -= 32768 if($t > 1638.4); my $t = hex(substr($p,0,4));
$t = sprintf("%0.1f", $t/10); $t -= 32768 if($t > 1638.4);
my $h = hex(substr($p,4,2)); $t = sprintf("%0.1f", $t/10);
my $ap = hex(substr($p,6,4)); my $statemsg = "state:T: $t";
my $statemsg = "state:T: $t"; push @event, "temperature:$t";#temp is always there
$statemsg .= " H: $h" if ($h); if ($model !~ m/^(S550IA|HM-WDS30-T-O)$/){#ignore only-temp sensors
$statemsg .= " AP: $ap" if ($ap); my $h = hex(substr($p,4,2));
push @event, $statemsg; $statemsg .= " H: $h";
push @event, "temperature:$t";#temp is always there push @event, "humidity:$h";
push @event, "humidity:$h" if ($h); if ($model eq "HM-WDC7000"){#airpressure sensor
push @event, "airpress:$ap" if ($ap); my $ap = hex(substr($p,6,4));
$statemsg .= " AP: $ap";
push @event, "airpress:$ap";
}
}
push @event, $statemsg;
}
} }
elsif($st =~ m /^(switch|dimmer|blindActuator)$/) {########################## elsif($st =~ m /^(switch|dimmer|blindActuator)$/) {##########################
if (($msgType eq "02" && $p =~ m/^01/) || # handle Ack_Status if (($msgType eq "02" && $p =~ m/^01/) || # handle Ack_Status
@ -1310,7 +1316,7 @@ sub CUL_HM_parseCommon(@){#####################################################
((hex($msgFlag) & 0xA2) == 0x82) && ((hex($msgFlag) & 0xA2) == 0x82) &&
(CUL_HM_getRxType($shash) & 0x08)){ #wakeup ##### (CUL_HM_getRxType($shash) & 0x08)){ #wakeup #####
#send wakeup and process command stack #send wakeup and process command stack
#CUL_HM_SndCmd($shash, '++A112'.CUL_HM_IOid($shash).$src); #not necessary even for TC CUL_HM_SndCmd($shash, '++A112'.CUL_HM_IOid($shash).$src);
CUL_HM_ProcessCmdStack($shash); CUL_HM_ProcessCmdStack($shash);
} }