mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
CUL_HM:improve motion, correct push button
git-svn-id: https://svn.fhem.de/fhem/trunk@11297 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a0371c06f4
commit
4fbe82f0d6
@ -2398,8 +2398,9 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
my($chn,$cnt,$bright,$nextTr) = map{hex($_)} (@mI,0);
|
||||
if ($nextTr){
|
||||
$nextTr = (15 << ($nextTr >> 4) - 4); # strange mapping of literals
|
||||
RemoveInternalTimer($mh{devN}.":motionCheck");
|
||||
InternalTimer(gettimeofday()+$nextTr,"CUL_HM_motionCheck", $mh{devN}.":motionCheck", 0);
|
||||
RemoveInternalTimer($mh{cName}.":motionCheck");
|
||||
InternalTimer(gettimeofday()+$nextTr+2,"CUL_HM_motionCheck", $mh{cName}.":motionCheck", 0);
|
||||
$mh{cHash}->{helper}{moStart} = gettimeofday() if (!defined $mh{cHash}->{helper}{moStart});
|
||||
}
|
||||
else{
|
||||
$nextTr = "none ";
|
||||
@ -8299,8 +8300,17 @@ sub CUL_HM_readValIfTO($){#
|
||||
}
|
||||
sub CUL_HM_motionCheck($){#
|
||||
my ($name) = split(":",shift);# uncertain:$name:$reading:$value
|
||||
CUL_HM_UpdtReadBulk($defs{$name},1,"state:noMotion"
|
||||
,"motion:no");
|
||||
|
||||
if (defined $defs{$name}{helper}{moStart}){
|
||||
CUL_HM_UpdtReadBulk($defs{$name},1,"state:noMotion"
|
||||
,"motion:no"
|
||||
,"motionDuration:".(int(gettimeofday())-int($defs{$name}{helper}{moStart})));
|
||||
delete $defs{$name}{helper}{moStart};
|
||||
}
|
||||
else{
|
||||
CUL_HM_UpdtReadBulk($defs{$name},1,"state:noMotion"
|
||||
,"motion:no");
|
||||
}
|
||||
}
|
||||
|
||||
sub CUL_HM_getAttr($$$){#return attrValue - consider device if empty
|
||||
|
@ -196,7 +196,7 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
,"007C" => {name=>"ROTO_ZEL-STG-RM-FZS" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",} # radio-controlled socket adapter switch actuator 1-channel
|
||||
,"007D" => {name=>"ROTO_ZEL-STG-RM-WT-2" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"",} # HM Push Button 2
|
||||
,"007E" => {name=>"ROTO_ZEL-STG-RM-DWT-10" ,alias=>"HM-PB-4DIS-WM-2"}
|
||||
,"007F" => {name=>"ROTO_ZEL-STG-RM-FST-UP4" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"",} # HM Push Button Interface
|
||||
,"007F" => {name=>"ROTO_ZEL-STG-RM-FST-UP4" ,alias=>"HM-PBI-4-FM"} # HM Push Button Interface
|
||||
,"0080" => {name=>"ROTO_ZEL-STG-RM-HS-4" ,st=>'remote' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"",} # HM Remote 4 buttons
|
||||
,"0081" => {name=>"ROTO_ZEL-STG-RM-FDK" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",} # HM Rotary Handle Sensor
|
||||
,"0082" => {name=>"Roto_ZEL-STG-RM-FFK" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",} # HM Shutter Contact
|
||||
|
Loading…
x
Reference in New Issue
Block a user