2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

hmlan flexible delay

git-svn-id: https://svn.fhem.de/fhem/trunk@3060 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-04-09 18:20:38 +00:00
parent c335a0c70d
commit 34068f10c0
3 changed files with 168 additions and 161 deletions

View File

@ -68,8 +68,6 @@ sub HMLAN_Define($$) {#########################################################
return undef;
}
$hash->{DeviceName} = $dev;
$hash->{helper}{dPend} = 0;# data pending in HMLAN
$hash->{helper}{lastSend} = 0;
my $ret = DevIo_OpenDev($hash, 0, "HMLAN_DoInit");
return $ret;
}
@ -190,11 +188,20 @@ sub HMLAN_Write($$$) {#########################################################
# my $IDack = '+'.$dst.',02,00,'; # guess: ID acknowledge
# my $IDack = '+'.$dst.',FF,00,'; # guess: ID acknowledge General
# my $IDsub = '-'.$dst; # guess: ID remove?
# my $IDnew = '+'.$dst.',00,01,'; # newChannel- trailing 01 to be sent if talk to neu channel
my $IDadd = '+'.$dst.',00,00,'; # guess: add ID?
if (!$lhash{$dst} && $dst ne "000000"){
HMLAN_SimpleWrite($hash, $IDadd);
delete $hash->{helper}{$dst};
my $rxt = CUL_HM_Get(CUL_HM_id2Hash($dst),CUL_HM_id2Name($dst),"param","rxType");
if (!($rxt & ~0x04)){#config only
$hash->{helper}{$dst}{newChn} = '+'.$dst.",01,01,FE1F";
}
else{
$hash->{helper}{$dst}{newChn} = '+'.$dst.',00,01,';
}
$hash->{helper}{$dst}{name} = CUL_HM_id2Name($dst);
$lhash{$dst} = 1;
$hash->{assignIDs}=join(',',keys %lhash);
$hash->{assignIDsCnt}=scalar(keys %lhash);
@ -242,78 +249,81 @@ sub HMLAN_Parse($$) {##########################################################
if ($letter =~ m/^[ER]/){#@mFld=($src, $status, $msec, $d2, $rssi, $msg)
# max speed for devices is 100ms after receive - example:TC
# will prepare the delay here
my $src = substr($mFld[5],6,6);
my $dst = substr($mFld[5],12,6);
my $flg = hex(substr($mFld[5],2,2));
my $mNo = substr($mFld[5],0,2);
my $srcId = (length($mFld[5])>11)?$src:"lastRec";
$hash->{helper}{nextSend}{$srcId} = gettimeofday() + 0.100;
if ($debug){
Log $ll5, 'HMLAN_Parse: '.$name.' S:'.$mFld[0]
.(($mFld[0] =~ m/^E/)?' ':'')
.' stat:'.$mFld[1]
.' t:'.$mFld[2].' d:'.$mFld[3]
.' r:'.$mFld[4]
.' m:'.$mNo
.' '.substr($mFld[5],2,4)
.' '.$srcId
.' '.$dst
.' '.substr($mFld[5],18);
}
else{
Log $ll5, 'HMLAN_Parse: '.$name.' S:'.$mFld[0]
.(($mFld[0] =~ m/^E/)?' ':'')
.' stat:'.$mFld[1]
.' t:'.$mFld[2].' d:'.$mFld[3]
.' r:'.$mFld[4]
.' m:'.$mFld[5];
}
my $dmsg = sprintf("A%02X%s", length($mFld[5])/2, uc($mFld[5]));
# handle status.
# 00 00=msg without relation
# 00 01=ack that HMLAN waited for
# 00 02=msg send, no ack was requested
# 00 08=nack - ack was requested, msg repeated 3 times, still no ack
# 00 21=
# 00 30=
# 00 81=open
# 01 xx=
# 02 xx=prestate to 04xx.
# 04 xx=nothing sent anymore. Any restart unsuccessful except power
# HMLAN_SimpleWrite($hash, '+'.$src) if (($letter eq 'R') && $src ne AttrVal($name, "hmId", $mFld[4]));
# if (!($flg & 0x25)){#rule out other messages
# HMLAN_SimpleWrite($hash, '-'.$src);
# HMLAN_SimpleWrite($hash, '+'.$src);
# }
my $stat = hex($mFld[1]);
my ($mNo,$flg,$type,$src,$dst) = ($1,$2,$3,$4,$5)# Std Header
if ($mFld[5] =~ m/^(..)(..)(..)(.{6})(.{6})/);
my $p = substr($mFld[5],18); # additional content
my $rssi = hex($mFld[4])-65536;
Log $ll5, 'HMLAN_Parse: '.$name.' R:'.$mFld[0]
.(($mFld[0] =~ m/^E/)?' ':'')
.' stat:' .$mFld[1]
.' t:' .$mFld[2]
.' d:' .$mFld[3]
.' r:' .$mFld[4]
.' m:'.$mNo
.' '.$flg.$type
.' '.$src
.' '.$dst
.' '.$p;
# handle status.
# 00 00= msg without relation
# 00 01= ack that HMLAN waited for
# 00 02= msg send, no ack was requested
# 00 08= nack - ack was requested, msg repeated 3 times, still no ack
# 00 21= (seen with 'R')
# 00 30=
# 00 41= (seen with 'R')
# 00 50= (seen with 'E')
# 00 81= open
# 01 xx= (seen with 'E')
# 02 xx= prestate to 04xx.
# 04 xx= nothing sent anymore. Any restart unsuccessful except power
#
# HMLAN_SimpleWrite($hash, '+'.$src) if (($letter eq 'R') && $src ne AttrVal($name, "hmId", $mFld[4]));
#
# if (!($flg & 0x25)){#rule out other messages
# HMLAN_SimpleWrite($hash, '-'.$src);
# HMLAN_SimpleWrite($hash, '+'.$src);
# }
if($stat & 0x040A){ # do not parse this message, no valid content
Log $ll5, 'HMLAN_Parse: problems detected - please restart HMLAN'if($stat & 0x0400);
Log $ll5, 'HMLAN_Parse: discard' if($stat & 0x000A);
return ;# message with no ack is send - do not dispatch
}
if ($mFld[1] !~ m/00(01|02|21|41)/ && $letter eq 'R'){
Log $ll5, 'HMLAN_Parse: discard, NACK';
return;
}
Log $ll5, 'HMLAN_Parse: special reply '.$mFld[1] if($stat & 0x0200);
# HMLAN sends ACK for flag 'A0' but not for 'A4'. Background is unknown -
# HMLAN sends ACK for flag 'A0' but not for 'A4'(config mode)-
# we ack ourself an long as logic is uncertain
if ($flg == 0xA4 && $hash->{owner} eq $dst){
Log $ll5, "HMLAN: manual ACK";
if (hex($flg) == 0xA4 && $hash->{owner} eq $dst){
Log $ll5, "HMLAN: ACK config";
HMLAN_Write($hash,undef, "As15".$mNo."8002".$dst.$src."00");
}
$dmsg .= (($mFld[1] !~ m/00(01|02|21)/ && $letter eq 'R')?":NACK:":"::")
.(hex($mFld[4])-65536)
.":".$name;
$hash->{uptime} = HMLAN_uptime($mFld[2]);
$hash->{RSSI} = hex($mFld[4])-65536;
$hash->{RAWMSG} = $rmsg;
$hash->{"${name}_MSGCNT"}++;
$hash->{"${name}_TIME"} = TimeNow();
#update some User information ------
$hash->{uptime} = HMLAN_uptime($mFld[2]);
$hash->{RSSI} = $rssi;
$hash->{RAWMSG} = $rmsg;
$hash->{"${name}_MSGCNT"}++;
$hash->{"${name}_TIME"} = TimeNow();
if (($hash->{helper}{$src}{flg}) && ($letter eq 'R')){ #HMLAN is done?
$hash->{helper}{$src}{flg} = 0; #release send-holdoff
HMLAN_SimpleWrite($hash, $hash->{helper}{$src}{msg}) #send delayed msg if any
if ($hash->{helper}{$src}{msg});
$hash->{helper}{$src}{msg} = ""; #clear message
}
# prepare dispatch-----------
# HM format A<len><msg>:<info>:<RSSI>:<IOname> Info is not used anymore
my $dmsg = sprintf("A%02X%s::", length($mFld[5])/2, uc($mFld[5]))
.$rssi #RSSI
.":".$name; #add sender Name
my %addvals = (RAWMSG => $rmsg, RSSI => hex($mFld[4])-65536);
Dispatch($hash, $dmsg, \%addvals);
}
@ -350,48 +360,45 @@ sub HMLAN_SimpleWrite(@) {#####################################################
return if(!$hash || AttrVal($hash->{NAME}, "dummy", undef));
my $name = $hash->{NAME};
my $ll5 = GetLogLevel($name,5);
my $len = length($msg);
my $tn = gettimeofday();
# calculate maximum data speed for HMLAN.
# Theorie 2,5kByte/s
# tested allowes no more then 2 byte/ms incl overhead
# It is even slower if HMLAN waits for acks, acks are missing,...
my $bytPend = $hash->{helper}{dPend} -
int(($tn - $hash->{helper}{lastSend})*4000);
$bytPend = 0 if ($bytPend < 0);
$hash->{helper}{dPend} = $bytPend + length($msg);
$hash->{helper}{lastSend} = $tn;
my $wait = $bytPend/4000; # HMLAN
# => wait time to protect HMLAN overload
# my $wait = $bytPend>>11; # fast divide by 2048
# It is not possible to answer befor 100ms
my $id = (length($msg)>51)?substr($msg,46,6):"";
my $DevDelay=0;
if ($id && $hash->{helper}{nextSend}{$id}){
$DevDelay = $hash->{helper}{nextSend}{$id} - $tn; # calculate time passed
$DevDelay = ($DevDelay > 0.01)?( $DevDelay -= int($DevDelay)):0;
}
$wait = ($DevDelay >$wait)?$DevDelay:$wait; # select the longer waittime
select(undef, undef, undef, $wait)if ($wait>0.01);
if ($debug){
Log $ll5, 'HMLAN_Send: S:' .substr($msg,0,9).
' stat: ' .substr($msg,10,2).
' t:' .substr($msg,13,8).
' d:' .substr($msg,22,2).
' r:' .substr($msg,25,8).
' m:' .substr($msg,34,2).
' ' .substr($msg,36,4).
' ' .substr($msg,40,6).
' ' .substr($msg,46,6).
' ' .substr($msg,52)
if (length($msg )>51);
Log $ll5, 'HMLAN_Send: '.$msg if (length($msg) <=51);
if ($len>51){
$msg =~ m/(.{9}).(..).(.{8}).(..).(.{8}).(..)(....)(.{6})(.{6})(.*)/;
Log $ll5, 'HMLAN_Send: '.$name.' S:'.$1
.' stat: ' .$2
.' t:' .$3
.' d:' .$4
.' r:' .$5
.' m:' .$6
.' ' .$7
.' ' .$8
.' ' .$9
.' ' .$10;
if ($len > 52){#channel informatiion included
my ($flg,$dst,$chn) = (substr($msg,36,2),substr($msg,46,6),substr($msg,52,2));
if ( $hash->{helper}{$dst}{flg}){ #send not ack by HMLAN
if($hash->{helper}{$dst}{to} > gettimeofday()){#will not wait forever!
$hash->{helper}{$dst}{msg} = $msg; #postpone message
Log $ll5,"HMLAN_Delay: $name msg delayed $dst $msg";
return;
}
else{
Log $ll5,"HMLAN_Delay: $name timed out";
}
}
$hash->{helper}{$dst}{flg} = (hex($flg)&0x20)?1:0;
$hash->{helper}{$dst}{to} = gettimeofday() + 2;# flag timeout after 2 sec
if ($hash->{helper}{$dst}{chn} && $hash->{helper}{$dst}{chn} ne $chn){
my $updt = $hash->{helper}{$dst}{newChn};
Log $ll5, 'HMLAN_Send: '.$name.' S:'.$updt;
syswrite($hash->{TCPDev}, $updt."\r\n") if($hash->{TCPDev});
}
$hash->{helper}{$dst}{chn} = $chn;
}
}
else{
Log $ll5, 'HMLAN_Send: '.$msg; #normal trace
Log $ll5, 'HMLAN_Send: '.$name.' I:'.$msg;
}
$msg .= "\r\n" unless($nonl);
@ -481,6 +488,9 @@ sub HMLAN_secSince2000() {#####################################################
<br><br>
<a name="HMLANdefine"></a>
<b>Define</b>
<ul>

View File

@ -167,7 +167,7 @@ sub CUL_HM_updateConfig($){
if ($hash->{helper}{role}{chn}){
my $chn = (length($id) == 8)?substr($id,6,2):"01";
my $devId = substr($id,0,6);
if ($culHmModel{$mId}{chn} =~ m/Sw._V/){# there are virtual channels
if ($culHmModel{$mId} && $culHmModel{$mId}{chn} =~ m/Sw._V/){#virtual?
my @chnPh = (grep{$_ =~ m/Sw:/ } split ',',$culHmModel{$mId}{chn});
@chnPh = split ':',$chnPh[0] if (@chnPh);
my $chnPhyMax = $chnPh[2]?$chnPh[2]:1; # max Phys channels
@ -715,23 +715,12 @@ sub CUL_HM_Parse($$) {##############################
if (defined $des && $des != $vp && ($err&0x30) == 0x00){
push @event, "operState:errorTargetNotMet";
push @event, "operStateErrCnt:".
(ReadingsVal($name,"ValveStateErrCnt","0")+1);
(ReadingsVal($name,"operStateErrCnt","0")+1);
}
else{
push @event, "operState:".((($err&0x30) == 0x00)?"onTarget":"adjusting");
}
}
# CMD:A010 SRC:13F251 DST:5D24C9 0401 00000000 05 09:00 0A:07 00:00
# status change report to paired central unit
#read List5 reg 09 (offset) and 0A (err-pos)
#list 5 is channel-dependant not link dependant
# => Link discriminator (00000000) is fixed
elsif($msgType eq "10" && $p =~ m/^04..........0509(..)0A(..)/) {
my ( $of, $vep) = (hex($1), hex($2));
push @event, "ValveErrorPosition:$vep %";
push @event, "ValveOffset:$of %";
}
}
elsif($model =~ m/^(HM-Sen-Wa-Od|HM-CC-SCD)$/){ #############################
if (($msgType eq "02" && $p =~ m/^01/) || # handle Ack_Status
@ -874,9 +863,9 @@ sub CUL_HM_Parse($$) {##############################
}
}
elsif($st =~ m /^(remote|pushButton|swi)$/) { ###############################
if($msgType =~ m/^4./ && $p =~ m/^(..)(..)$/) {
my ($buttonField, $bno) = (hex($1), hex($2));# button number/event count
my $buttonID = $buttonField&0x3f;# only 6 bit are valid
if($msgType =~ m/^4./ && $p =~ m/^(..)(..)/) {
my ($chn, $bno) = (hex($1), hex($2));# button number/event count
my $buttonID = $chn&0x3f;# only 6 bit are valid
my $btnName;
my $state = "";
my $chnHash = $modules{CUL_HM}{defptr}{$src.sprintf("%02X",$buttonID)};
@ -887,19 +876,19 @@ sub CUL_HM_Parse($$) {##############################
else{# Button not defined, use default naming
$chnHash = $shash;
if ($st eq "swi"){#maintain history for event naming
$btnName = "Btn$buttonField";
$btnName = "Btn$chn";
}
else{
my $btn = int((($buttonField&0x3f)+1)/2);
$btnName = "Btn$btn";
$state = ($buttonField&1 ? "off" : "on")
my $btn = int((($chn&0x3f)+1)/2);
$btnName = "Btn$btn";
$state = ($chn&1 ? "off" : "on")
}
}
my $trigType;
if($buttonField & 0x40){
if($chn & 0x40){
if(!$shash->{BNO} || $shash->{BNO} ne $bno){#bno = event counter
$shash->{BNO}=$bno;
$shash->{BNOCNT}=1; # message counter reest
$shash->{BNO}=$bno;
$shash->{BNOCNT}=1; # message counter reest
}
$shash->{BNOCNT}+=1;
$state .= "Long" .($msgFlag eq "A0" ? "Release" : "").
@ -910,11 +899,11 @@ sub CUL_HM_Parse($$) {##############################
$state .= ($st eq "swi")?"toggle":"Short";#swi only support toggle
$trigType = "Short";
}
$shash->{helper}{addVal} = $buttonField; #store to handle changesFread
$shash->{helper}{addVal} = $chn; #store to handle changesFread
push @entities,CUL_HM_UpdtReadBulk($chnHash,1,
,"state:".$state.$target
,"trigger:".$trigType."_".$bno);
push @event,"battery:". (($buttonField&0x80)?"low":"ok");
push @event,"battery:". (($chn&0x80)?"low":"ok");
push @event,"state:$btnName $state$target";
}
}
@ -929,13 +918,13 @@ sub CUL_HM_Parse($$) {##############################
push @event, "flags:". (($flag)?"none" :$flag );
}
}
elsif($st eq "virtual"){#####################################################
elsif($st eq "virtual"){ ####################################################
# possibly add code to count all acks that are paired.
if($msgType eq "02") {# this must be a reflection from what we sent, ignore
push @event, "";
}
}
elsif($st eq "outputUnit"){##################################################
elsif($st eq "outputUnit"){ #################################################
if($msgType eq "40" && $p =~ m/^(..)(..)$/){
my ($button, $bno) = (hex($1), hex($2));
if(!(exists($shash->{BNO})) || $shash->{BNO} ne $bno){
@ -995,7 +984,12 @@ sub CUL_HM_Parse($$) {##############################
($state, $err) = ($1, hex($2));
my $bright = hex($state);
push @event, "brightness:".$bright;
push @event, "cover:". (($err&0x0E)?"open" :"closed");
if ($model eq "HM-Sec-MDIR"){
push @event, "sabotageError:".(($err&0x0E)?"on":"off");
}
else{
push @event, "cover:". (($err&0x0E)?"open" :"closed");
}
push @event, "battery:". (($err&0x80)?"low" :"ok" );
}
elsif($msgType eq "41" && $p =~ m/^01(..)(..)(..)/) {#01 is channel
@ -1114,8 +1108,9 @@ sub CUL_HM_Parse($$) {##############################
if($modules{CUL_HM}{defptr}{"$src$chn"});
push @event, "alive:yes";
push @event, "battery:". (($err&0x80)?"low" :"ok" );
if ($model ne "HM-SEC-WDS"){
push @event, "cover:". (($err&0x0E)?"open" :"closed");
if ( $model eq "HM-SEC-SC" ||
$model eq "HM-Sec-RHS"){push @event, "sabotageError:".(($err&0x0E)?"on":"off");
}elsif($model ne "HM-SEC-WDS"){push @event, "cover:" .(($err&0x0E)?"open" :"closed");
}
}
elsif($msgType eq "41"){
@ -1124,7 +1119,6 @@ sub CUL_HM_Parse($$) {##############################
$shash = $modules{CUL_HM}{defptr}{"$src$chn"}
if($modules{CUL_HM}{defptr}{"$src$chn"});
}
if (defined($state)){# if state was detected post events
my %txt;
%txt = ("C8"=>"open", "64"=>"tilted", "00"=>"closed");
@ -1134,7 +1128,6 @@ sub CUL_HM_Parse($$) {##############################
$txt = "unknown:$state" if(!$txt);
push @event, "state:$txt";
push @event, "contact:$txt$target";
}
else{push @event, "3SSunknownMsg:$p" if(!@event);}
}
@ -1285,9 +1278,8 @@ sub CUL_HM_Parse($$) {##############################
CUL_HM_SndCmd($ack[$i++],$ack[$i++])while ($i<@ack);
}
CUL_HM_ProcessCmdStack($shash) if ($respRemoved); # cont stack if a response is complete
CUL_HM_ProcessCmdStack($shash) if ($respRemoved); # cont if complete
#------------ process events ------------------
push @event, "noReceiver:src:$src ($cmd) $p" if(!@event);
CUL_HM_UpdtReadBulk($shash,1,@event); #events to the channel
$defs{$shash->{NAME}}{EVENTS}++; # count events for channel
@ -2792,6 +2784,7 @@ sub CUL_HM_protState($$){
my ($hash,$state) = @_;
$hash->{protState} = $state;
readingsSingleUpdate($hash,"state",$state,1)if (!$hash->{helper}{role}{chn});
DoTrigger($hash->{NAME}, undef) if ($state eq "CMDs_done");
}
sub CUL_HM_respPendRm($) {#del response related entries in messageing entity
my ($hash) = @_;
@ -2993,14 +2986,15 @@ sub CUL_HM_peerChName($$$) {#in:<IDorName> <deviceID> <ioID>, out:name
}
sub CUL_HM_getMId($) {#in: hash(chn or dev) out:model key (key for %culHmModel)
# Will store result in device helper
my ($hash) = @_;
my $hash = shift;
$hash = CUL_HM_getDeviceHash($hash);
my $mId = $hash->{helper}{mId};
if (!$mId){
my $model = AttrVal($hash->{NAME}, "model", "");
foreach my $mIdKey(keys%culHmModel){
next if (!$culHmModel{$mIdKey}{name} || $culHmModel{$mIdKey}{name} ne $model);
$mId = $hash->{helper}{mId} = $mIdKey ;
next if (!$culHmModel{$mIdKey}{name} ||
$culHmModel{$mIdKey}{name} ne $model);
$hash->{helper}{mId} = $mIdKey ;
return $mIdKey;
}
return "";

View File

@ -300,27 +300,27 @@ my %culHmRegDefine = (
intKeyVisib =>{a=> 2.7,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>'visibility of internal channel',lit=>{invisib=>0,visib=>1}},
pairCentral =>{a=> 10.0,s=>3.0,l=>0,min=>0 ,max=>16777215,c=>'hex' ,f=>'' ,u=>'' ,d=>1,t=>'pairing to central'},
#repeater
compMode =>{a=> 23.0,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"compatibility moden" ,lit=>{off=>0,on=>1}},
compMode =>{a=> 23.0,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"compatibility moden" ,lit=>{off=>0,on=>1}},
#remote mainly
backlOnTime =>{a=> 5.0,s=>0.6,l=>0,min=>1 ,max=>25 ,c=>"" ,f=>'' ,u=>'s' ,d=>0,t=>"Backlight ontime"},
backlOnMode =>{a=> 5.6,s=>0.2,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Backlight mode" ,lit=>{off=>0,auto=>1}},
ledMode =>{a=> 5.6,s=>0.2,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"LED mode" ,lit=>{off=>0,on=>1}},
language =>{a=> 7.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Language" ,lit=>{English=>0,German=>1}},
backAtKey =>{a=> 13.7,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at keystroke",lit=>{off=>0,on=>1}},
backAtMotion =>{a=> 13.6,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at motion" ,lit=>{off=>0,on=>1}},
backAtCharge =>{a=> 13.5,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at Charge" ,lit=>{off=>0,on=>1}},
stbyTime =>{a=> 14.0,s=>1.0,l=>0,min=>1 ,max=>99 ,c=>'' ,f=>'' ,u=>'s' ,d=>1,t=>"Standby Time"},
backOnTime =>{a=> 14.0,s=>1.0,l=>0,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'s' ,d=>1,t=>"Backlight On Time"},
btnLock =>{a=> 15.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Button Lock" ,lit=>{unlock=>0,lock=>1}},
confBtnTime =>{a=> 21.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'' ,f=>'' ,u=>'min' ,d=>0,t=>"255=permanent"},
# keymatic/winmatic secific register
keypressSignal =>{a=> 3.0,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Keypress beep" ,lit=>{off=>0,on=>1}},
signal =>{a=> 3.4,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Confirmation beep" ,lit=>{off=>0,on=>1}},
signalTone =>{a=> 3.6,s=>0.2,l=>0,min=>0 ,max=>3 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"" ,lit=>{low=>0,mid=>1,high=>2,veryHigh=>3}},
backlOnMode =>{a=> 5.6,s=>0.2,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Backlight mode" ,lit=>{off=>0,auto=>1}},
ledMode =>{a=> 5.6,s=>0.2,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"LED mode" ,lit=>{off=>0,on=>1}},
language =>{a=> 7.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Language" ,lit=>{English=>0,German=>1}},
backAtKey =>{a=> 13.7,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at keystroke" ,lit=>{off=>0,on=>1}},
backAtMotion =>{a=> 13.6,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at motion" ,lit=>{off=>0,on=>1}},
backAtCharge =>{a=> 13.5,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"Backlight at Charge" ,lit=>{off=>0,on=>1}},
stbyTime =>{a=> 14.0,s=>1.0,l=>0,min=>1 ,max=>99 ,c=>'' ,f=>'' ,u=>'s' ,d=>1,t=>"Standby Time"},
backOnTime =>{a=> 14.0,s=>1.0,l=>0,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'s' ,d=>1,t=>"Backlight On Time"},
btnLock =>{a=> 15.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Button Lock" ,lit=>{unlock=>0,lock=>1}},
confBtnTime =>{a=> 21.0,s=>1.0,l=>0,min=>1 ,max=>255 ,c=>'' ,f=>'' ,u=>'min' ,d=>0,t=>"255=permanent"},
# keymatic/winmatic secific register
keypressSignal =>{a=> 3.0,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Keypress beep" ,lit=>{off=>0,on=>1}},
signal =>{a=> 3.4,s=>0.1,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"Confirmation beep" ,lit=>{off=>0,on=>1}},
signalTone =>{a=> 3.6,s=>0.2,l=>0,min=>0 ,max=>3 ,c=>'lit' ,f=>'' ,u=>'' ,d=>0,t=>"" ,lit=>{low=>0,mid=>1,high=>2,veryHigh=>3}},
# sec_mdir
cyclicInfoMsg =>{a=> 9.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"cyclic message",lit=>{off=>0,on=>1}},
sabotageMsg =>{a=> 16.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"enable sabotage message" ,lit=>{off=>0,on=>1}},
cyclicInfoMsg =>{a=> 9.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"cyclic message" ,lit=>{off=>0,on=>1}},
sabotageMsg =>{a=> 16.0,s=>1.0,l=>0,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"enable sabotage message" ,lit=>{off=>0,on=>1}},
cyclicInfoMsgDis=>{a=> 17.0,s=>1.0,l=>0,min=>0 ,max=>255 ,c=>'' ,f=>'' ,u=>'' ,d=>1,t=>"cyclic message"},
lowBatLimit =>{a=> 18.0,s=>1.0,l=>0,min=>10 ,max=>12 ,c=>'factor' ,f=>10 ,u=>'V' ,d=>1,t=>"low batterie limit, step .1V"},
lowBatLimitBA =>{a=> 18.0,s=>1.0,l=>0,min=>5 ,max=>15 ,c=>'factor' ,f=>10 ,u=>'V' ,d=>1,t=>"low batterie limit, step .1V"},
@ -332,7 +332,9 @@ my %culHmRegDefine = (
# SEC-WM55 02:01 (AES on?)
# SEC-WDS 02:01 16:01(sabotage) ?
# SEC-SC 02:00 ?
#Blind 9:00 10:00 20:00
# Blind 9:00 10:00 20:00
# BL1TPBU 02:01 21:FF
# Dim1TPBU 02:01 21:FF 22:00
#--- list 1, Channel level------------------
#blindActuator mainly
@ -426,6 +428,7 @@ my %culHmRegDefine = (
# SEC-WM55 8:01 (AES on?)
# SEC-WDS 34:0x64 ?
# SEC-SC 8:00 ?
# Bl1PBU 08:00 09:00 10:00
# logicCombination=>{a=> 89.0,s=>0.5,l=>1,min=>0 ,max=>16 ,c=>'lit' ,f=>'' ,u=>'' ,d=>1,t=>"".
# "inactive=>unused\n".
@ -475,11 +478,11 @@ my %culHmRegDefine = (
decalMin =>{a=> 8 ,s=>0.3,l=>5,min=>0 ,max=>50 ,c=>'factor' ,f=>0.1 ,u=>'min' ,d=>1,t=>"Decalc min"},
decalHr =>{a=> 8.3,s=>0.5,l=>5,min=>0 ,max=>23 ,c=>'' ,f=>'' ,u=>'h' ,d=>1,t=>"Decalc hour"},
partyEndHr =>{a=> 97 ,s=>0.6,l=>6,min=>0 ,max=>23 ,c=>'' ,f=>'' ,u=>'h' ,d=>1,t=>"Party end Hour"},
partyEndMin =>{a=> 97.7,s=>0.1,l=>6,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'min' ,d=>1,t=>"Party end min",lit=>{"00"=>0,"30"=>1}},
partyEndMin =>{a=> 97.7,s=>0.1,l=>6,min=>0 ,max=>1 ,c=>'lit' ,f=>'' ,u=>'min' ,d=>1,t=>"Party end min" ,lit=>{"00"=>0,"30"=>1}},
partyEndDay =>{a=> 98 ,s=>1 ,l=>6,min=>0 ,max=>200 ,c=>'' ,f=>'' ,u=>'d' ,d=>1,t=>"Party end Day"},
#Thermal-cc-VD
valveOffset =>{a=> 9 ,s=>0.5,l=>5,min=>0 ,max=>25 ,c=>'' ,f=>'' ,u=>'%' ,d=>1,t=>"Valve offset"}, # size actually 0.5
valveError =>{a=> 10 ,s=>1 ,l=>5,min=>0 ,max=>99 ,c=>'' ,f=>'' ,u=>'%' ,d=>1,t=>"Valve position when error"},# size actually 0.7
valveErrorPos =>{a=> 10 ,s=>1 ,l=>5,min=>0 ,max=>99 ,c=>'' ,f=>'' ,u=>'%' ,d=>1,t=>"Valve position when error"},# size actually 0.7
);
my %culHmRegGeneral = (
@ -589,7 +592,7 @@ my %culHmRegModel = (
DimElsJtOn =>1,DimElsJtOff =>1,DimElsJtDlyOn =>1,
DimElsJtDlyOff =>1,DimElsJtRampOn =>1,DimElsJtRampOff =>1,
},
"HM-CC-VD" =>{valveOffset =>1,valveError =>1},
"HM-CC-VD" =>{valveOffset =>1,valveErrorPos =>1},
"HM-PB-4DIS-WM" =>{peerNeedsBurst =>1,expectAES =>1,language =>1,stbyTime =>1},
"HM-WDS100-C6-O" =>{stormUpThresh =>1,stormLowThresh =>1},
"KS550" =>{stormUpThresh =>1,stormLowThresh =>1},