mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
CUL_HM: imlement dis-wm55
git-svn-id: https://svn.fhem.de/fhem/trunk@7684 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1b48e9875b
commit
7b5259bf5b
@ -1814,6 +1814,10 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
push @evtEt,[$chnHash,1,"trigger:".$trigType."_".$bno];
|
||||
push @evtEt,[$devH,1,"battery:". (($chn&0x80)?"low":"ok")];
|
||||
push @evtEt,[$devH,1,"state:$btnName $state$target"];
|
||||
if($md eq "HM-Dis-WM55"){
|
||||
my $type = $trigType eq "Short"?"s":"l";
|
||||
CUL_HM_PushCmdStack($shash,"++A011$id$src$_")foreach (@{$chnHash->{helper}{disp}{$type}});
|
||||
}
|
||||
}
|
||||
else{# could be an Em8
|
||||
my($chn,$cnt,$state,$err);
|
||||
@ -1845,6 +1849,7 @@ sub CUL_HM_Parse($$) {#########################################################
|
||||
push @evtEt,[$shash,1,"contact:$txt$target"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
elsif($st eq "powerMeter") {#################################################
|
||||
if (($mTp eq "02" && $p =~ m/^01/) || # handle Ack_Status
|
||||
@ -3233,14 +3238,13 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
}
|
||||
my $s = 54;
|
||||
$l1 =~ s/\\_/ /g;
|
||||
$l1 = substr($l1."\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, 13);
|
||||
$l1 = substr($l1."\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, 12);
|
||||
$l1 =~ s/(.)/sprintf(" %02X:%02X",$s++,ord($1))/ge;
|
||||
|
||||
$s = 70;
|
||||
$l2 =~ s/\\_/ /g;
|
||||
$l2 = substr($l2."\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, 13);
|
||||
$l2 = substr($l2."\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0, 12);
|
||||
$l2 =~ s/(.)/sprintf(" %02X:%02X",$s++,ord($1))/ge;
|
||||
|
||||
@a = ($a[0],"regBulk","RegL_01:",split(" ",$l1.$l2));
|
||||
}
|
||||
elsif($cmd =~ m /(displayMode|displayTemp|displayTempUnit|controlMode)/) {
|
||||
@ -3916,18 +3920,23 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
|
||||
my $msg = "800102";
|
||||
my $param = (scalar(@a)-2);
|
||||
return "$a[2] not valid - choose short or long" if($a[2] !~ m/(short|long)/);
|
||||
return "not enough parameter - always use txtNo, color and icon in a set"
|
||||
if($param %3);
|
||||
for (my $cnt=2;$cnt<$param;$cnt+=3){
|
||||
if(($param-1) %3);
|
||||
my @txtMsg;
|
||||
for (my $cnt=3;$cnt<$param;$cnt+=3){
|
||||
return "color wrong ".$a[$cnt+1]." use:".join(",",sort keys %color) if (!defined $color{$a[$cnt+1]});
|
||||
return "icon wrong " .$a[$cnt+2]." use:".join(",",sort keys %icon) if (!defined $icon {$a[$cnt+2]});
|
||||
return "text wrong " .$a[$cnt+0]." use:".join(",",sort keys %btn) if (!defined $btn {$a[$cnt+0]});
|
||||
$msg .= sprintf("12%02X11%02X",$btn{$a[$cnt+0]}+0x80,$color{$a[$cnt+1]}+0x80);
|
||||
$msg .= sprintf("13%02X",$icon{$a[$cnt+2]}+0x80) if ($icon{$a[$cnt+2]} != 99 );
|
||||
$msg .= ($cnt<$param-1)?"0A":"0A03";
|
||||
CUL_HM_PushCmdStack($hash,'++'.$flag.'11'.$id.$dst.$msg);
|
||||
push @txtMsg,$msg;
|
||||
$msg = "8001";
|
||||
}
|
||||
my $type = $a[2] eq "short"?"s":"l";
|
||||
delete $hash->{helper}{disp}{$type} if ($hash->{helper}{disp});
|
||||
$hash->{helper}{disp}{$type} = \@txtMsg;
|
||||
}
|
||||
|
||||
elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################
|
||||
|
@ -272,7 +272,8 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
,"00D0" => {name=>"HM-LC-Sw4-DR-2" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"Sw:1:4",}
|
||||
,"00D1" => {name=>"HM-LC-Bl1-SM-2" ,st=>'blindActuator' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",} # radio-controlled blind actuator 1-channel (flush-mount)
|
||||
,"00D2" => {name=>"HM-LC-Bl1-FM-2" ,st=>'blindActuator' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",} # radio-controlled blind actuator 1-channel (flush-mount)
|
||||
,"00D3" => {name=>"HM-Dis-WM55" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,p' ,chn=>"Dis:1:10",}
|
||||
#General ,"00D3" => {name=>"HM-Dis-WM55" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1' ,chn=>"Dis:1:10",}
|
||||
,"00D3" => {name=>"HM-Dis-WM55" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1' ,chn=>"Dis:1:10",}
|
||||
,"00D7" => {name=>"HM-ES-PMSw1-Pl-DN-R1" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
|
||||
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
|
||||
,"00D8" => {name=>"HM-LC-Sw1-Pl-DN-R1" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}
|
||||
@ -281,7 +282,7 @@ my $K_actDetID = '000000'; # id of actionDetector
|
||||
,"00DB" => {name=>"HM-Sen-MDIR-WM55" ,st=>'motionAndBtn' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"Btn:1:2,Motion:3:3",}
|
||||
,"00DC" => {name=>"HM-Sen-DB-PCB" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"",}
|
||||
,"00DD" => {name=>"HM-PB-4DIS-WM-2" ,st=>'pushButton' ,cyc=>'' ,rxt=>'c:w:l' ,lst=>'1,4' ,chn=>"Btn:1:20",}
|
||||
,"00DE" => {name=>"HM-ES-TX-WM" ,st=>'powerSensor' ,cyc=>'00:10' ,rxt=>'c:w:l' ,lst=>'1' ,chn=>"",}
|
||||
,"00DE" => {name=>"HM-ES-TX-WM" ,st=>'powerSensor' ,cyc=>'00:10' ,rxt=>'c:w:l' ,lst=>'1' ,chn=>"",} # strom/gassensor
|
||||
,"00E3" => {name=>"HM-ES-PMSw1-Pl-DN-R3" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
|
||||
,chn=>"Sw:1:1,Pwr:2:2,SenPwr:3:3,SenI:4:4,SenU:5:5,SenF:6:6"}
|
||||
,"00E4" => {name=>"HM-ES-PMSw1-Pl-DN-R4" ,st=>'powerMeter' ,cyc=>'00:10' ,rxt=>'' ,lst=>'1:2.3.4.5.6,3:1p,4:3p.4p.5p.6p'
|
||||
@ -856,6 +857,7 @@ $culHmRegType{pushButton} = $culHmRegType{remote};
|
||||
}
|
||||
|
||||
,"HM-PB-4DIS-WM" =>{ peerNeedsBurst =>1,expectAES =>1,language =>1,stbyTime =>1}
|
||||
,"HM-Dis-WM55" =>{ stbyTime =>1}
|
||||
,"HM-WDS100-C6-O" =>{ burstRx =>1,sunThresh =>1,stormUpThresh =>1,stormLowThresh =>1}
|
||||
,"KS550" =>{ stormUpThresh =>1,stormLowThresh =>1}
|
||||
,"HM-OU-LED16" =>{ brightness =>1,energyOpt =>1,localResDis =>1}
|
||||
@ -1571,7 +1573,7 @@ $culHmModelSets{"HM-Dis-WM55"} = $culHmModelSets{"HM-PB-4DIS-WM"};
|
||||
,statusRequest =>""},
|
||||
"HM-CC-RT-DN06" =>{ press =>"[long|short] [<peer>] [<repCount(long only)>] [<repDelay>] ..."
|
||||
},
|
||||
"HM-Dis-WM5500" =>{ displayWM =>"<textNo1> <color1> <icon1> [<textNo2> <color2> <icon2>] ...[<textNo6> <color6> <icon6>] "},
|
||||
"HM-Dis-WM5501" =>{ displayWM =>"[long|short] <textNo1> <color1> <icon1> [<textNo2> <color2> <icon2>] ...[<textNo6> <color6> <icon6>] "},
|
||||
"CCU-FHEM00" =>{ update =>"",
|
||||
hmPairForSec =>"<sec>",
|
||||
hmPairSerial =>"<serial>",
|
||||
@ -1579,6 +1581,8 @@ $culHmModelSets{"HM-Dis-WM55"} = $culHmModelSets{"HM-PB-4DIS-WM"};
|
||||
},
|
||||
);
|
||||
# clones- - - - - - - - - - - - - - - - -
|
||||
$culHmChanSets{"HM-Dis-WM5502"} = $culHmChanSets{"HM-Dis-WM5501"};
|
||||
|
||||
$culHmChanSets{"WDF-solar01"} = $culHmSubTypeSets{"THSensor"};
|
||||
$culHmChanSets{"HM-Sen-RD-O01"} = $culHmSubTypeSets{"THSensor"};
|
||||
$culHmChanSets{"HM-CC-RT-DN05"} = $culHmSubTypeSets{"THSensor"};
|
||||
|
Loading…
x
Reference in New Issue
Block a user