mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
toggle 4 dimmer, CO2 sensor implementation
git-svn-id: https://svn.fhem.de/fhem/trunk@2439 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
71f6d4422f
commit
13ba496183
@ -953,6 +953,16 @@ CUL_HM_Parse($$)
|
||||
else{push @event, "3SSunknownMsg:$p" if(!@event);}
|
||||
}
|
||||
elsif($model eq "HM-WDC7000" ||$st eq "THSensor") { ####################
|
||||
if($model eq "HM-CC-SCD"){# co2 sensor
|
||||
if (($msgType eq "02" && $p =~ m/^01/) || # handle Ack_Status
|
||||
($msgType eq "10" && $p =~ m/^06/) || #or Info_Status message here
|
||||
($msgType eq "41")) {
|
||||
my $co2Lvl = hex(substr($p,4,2));
|
||||
my %lvl=(0=>"normal",1=>"added",2=>"addedStrong");
|
||||
push @event, "state:".$lvl{$co2Lvl};
|
||||
}
|
||||
}
|
||||
else{
|
||||
my $t = hex(substr($p,0,4));
|
||||
$t -= 32768 if($t > 1638.4);
|
||||
$t = sprintf("%0.1f", $t/10);
|
||||
@ -966,6 +976,7 @@ CUL_HM_Parse($$)
|
||||
push @event, "humidity:$h" if ($h);
|
||||
push @event, "airpress:$ap" if ($ap);
|
||||
}
|
||||
}
|
||||
elsif($st eq "winMatic") { ####################################
|
||||
|
||||
if($msgType eq "10"){
|
||||
@ -1281,6 +1292,7 @@ my %culHmRegDefine = (
|
||||
ledFlashUnlocked=>{a=> 31.3,s=>0.1,l=>1,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"LED blinks when not locked",lit=>{off=>0,on=>1}},
|
||||
ledFlashLocked =>{a=> 31.6,s=>0.1,l=>1,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"LED blinks when locked" ,lit=>{off=>0,on=>1}},
|
||||
# sec_mdir
|
||||
sabotageMsg =>{a=> 16.0,s=>1 ,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"enable sabotage message" ,lit=>{off=>0,on=>1}},
|
||||
evtFltrPeriod =>{a=> 1.0,s=>0.4,l=>1,min=>0.5,max=>7.5 ,c=>'factor' ,f=>2 ,u=>'s' ,d=>1,t=>"event filter period"},
|
||||
evtFltrNum =>{a=> 1.4,s=>0.4,l=>1,min=>1 ,max=>15 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"sensitivity - read sach n-th puls"},
|
||||
minInterval =>{a=> 2.0,s=>0.3,l=>1,min=>0 ,max=>4 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"minimum interval in sec" ,lit=>{0=>0,15=>1,20=>2,60=>3,120=>4}},
|
||||
@ -1369,6 +1381,7 @@ my %culHmRegModel = (
|
||||
CtOn =>1,CtDlyOn =>1,CtOff =>1,CtDlyOff =>1,
|
||||
OnTimeMode =>1,OffTimeMode =>1,
|
||||
ActType =>1,ActNum =>1},
|
||||
"HM-SEC-MDIR" =>{sabotageMsg =>1,},
|
||||
"HM-CC-TC" =>{backlOnTime =>1,backlOnMode =>1,btnLock =>1},
|
||||
"HM-CC-SCD" =>{peerNeedsBurst =>1,expectAES =>1,
|
||||
transmitTryMax =>1,evtFltrTime =>1,
|
||||
@ -2189,11 +2202,17 @@ CUL_HM_Set($@)
|
||||
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'02'.$chn.'C80000'.$tval);
|
||||
}
|
||||
elsif($cmd eq "toggle") { ###################################################
|
||||
if($st eq "dimmer"){;
|
||||
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'02'.$chn.
|
||||
(ReadingsVal($name,"state","on") eq "off" ?"C80000":"000000"));
|
||||
}
|
||||
else{
|
||||
$hash->{toggleIndex} = 1 if(!$hash->{toggleIndex});
|
||||
$hash->{toggleIndex} = (($hash->{toggleIndex}+1) % 128);
|
||||
CUL_HM_PushCmdStack($hash, sprintf("++%s3E%s%s%s40%s%02X",$flag,$id, $dst,
|
||||
$dst, $chn, $hash->{toggleIndex}));
|
||||
}
|
||||
}
|
||||
elsif($cmd eq "lock") { ###################################################
|
||||
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.'800100FF'); # LEVEL_SET
|
||||
}
|
||||
@ -2475,7 +2494,8 @@ CUL_HM_Set($@)
|
||||
CUL_HM_SndCmd($hash, sprintf("++9440%s%s00%02X",$dst,$dst,$testnr));
|
||||
}
|
||||
elsif($cmd =~ m/alarm(.*)/) { ###############################################
|
||||
CUL_HM_SndCmd($hash, sprintf("++9441%s%s01%s",
|
||||
# CUL_HM_SndCmd($hash, sprintf("++9441%s%s01%s",
|
||||
CUL_HM_SndCmd($hash, sprintf("++B441%s%s01%s",
|
||||
$dst,$dst, $1 eq "On" ? "0BC8" : "0C01"));
|
||||
}
|
||||
elsif($cmd eq "virtual") { ##################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user