2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-23 14:46:24 +00:00

introduce burstXmit and regwrite prep/exec for channels

git-svn-id: https://svn.fhem.de/fhem/trunk@4042 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-10-14 17:46:05 +00:00
parent faef0aae64
commit fd665684e2
3 changed files with 179 additions and 141 deletions

View File

@ -52,7 +52,7 @@ sub CUL_HM_Set($@);
sub CUL_HM_valvePosUpdt(@); sub CUL_HM_valvePosUpdt(@);
sub CUL_HM_infoUpdtDevData($$$); sub CUL_HM_infoUpdtDevData($$$);
sub CUL_HM_infoUpdtChanData(@); sub CUL_HM_infoUpdtChanData(@);
sub CUL_HM_getConfig($$$$$); sub CUL_HM_getConfig($);
sub CUL_HM_SndCmd($$); sub CUL_HM_SndCmd($$);
sub CUL_HM_responseSetup($$); sub CUL_HM_responseSetup($$);
sub CUL_HM_eventP($$); sub CUL_HM_eventP($$);
@ -199,8 +199,8 @@ sub CUL_HM_autoReadConfig($){
if (0 != CUL_HM_getAttrInt($name,"autoReadReg")){ if (0 != CUL_HM_getAttrInt($name,"autoReadReg")){
#CUL_HM_Set($hash,$name,"getSerial"); #CUL_HM_Set($hash,$name,"getSerial");
CUL_HM_Set($hash,$name,"getConfig");
CUL_HM_Set($hash,$name,"statusRequest"); CUL_HM_Set($hash,$name,"statusRequest");
CUL_HM_Set($hash,$name,"getConfig");
my $mId = CUL_HM_getMId($hash); my $mId = CUL_HM_getMId($hash);
$modules{CUL_HM}{helper}{autoRdActive} = $name $modules{CUL_HM}{helper}{autoRdActive} = $name
if ( CUL_HM_getRxType($hash) & 0xEB # 0x14 invers, if mode other then config if ( CUL_HM_getRxType($hash) & 0xEB # 0x14 invers, if mode other then config
@ -298,8 +298,7 @@ sub CUL_HM_updateConfig($){
$webCmd = AttrVal($name,"webCmd",undef); $webCmd = AttrVal($name,"webCmd",undef);
if(!defined $webCmd){ if(!defined $webCmd){
if ($st eq "virtual" ){$webCmd="press short:press long"; if ($st eq "virtual" ){$webCmd="press short:press long";
}elsif(( $hash->{helper}{role}{dev} && }elsif((!$hash->{helper}{role}{chn} &&
!$hash->{helper}{role}{chn} &&
$md ne "HM-CC-TC") $md ne "HM-CC-TC")
||$st eq "repeater" ||$st eq "repeater"
||$md eq "HM-CC-VD" ){$webCmd="getConfig"; ||$md eq "HM-CC-VD" ){$webCmd="getConfig";
@ -311,6 +310,9 @@ sub CUL_HM_updateConfig($){
}elsif($md eq "HM-OU-CFM-PL" ){$webCmd="press short:press long" }elsif($md eq "HM-OU-CFM-PL" ){$webCmd="press short:press long"
.($chn eq "02"?":playTone replay":""); .($chn eq "02"?":playTone replay":"");
} }
if (!$hash->{helper}{role}{chn}
&& $md eq "HM-CC-RT-DN") {$webCmd.=":burstXmit";}
if ($webCmd){ if ($webCmd){
my $eventMap = AttrVal($name,"eventMap",undef); my $eventMap = AttrVal($name,"eventMap",undef);
@ -425,43 +427,46 @@ sub CUL_HM_Attr(@) {#################################
foreach my $hash (@hashL){ foreach my $hash (@hashL){
my $exLvl = CUL_HM_getAttrInt($hash->{NAME},"expert"); my $exLvl = CUL_HM_getAttrInt($hash->{NAME},"expert");
if ($exLvl eq "0"){# off if ($exLvl eq "0"){# off
foreach my $rdEntry (keys %{$hash->{READINGS}}){ foreach my $rdEntry (grep /^RegL_/,keys %{$hash->{READINGS}}){
my $rdEntryNew; $hash->{READINGS}{".".$rdEntry} = $hash->{READINGS}{$rdEntry};
$rdEntryNew = ".".$rdEntry if ($rdEntry =~m /^RegL_/); delete $hash->{READINGS}{$rdEntry};
if ($rdEntry =~m /^R-/){ }
foreach my $rdEntry (grep /^R-/ ,keys %{$hash->{READINGS}}){
my $reg = $rdEntry; my $reg = $rdEntry;
$reg =~ s/.*-//; $reg =~ s/.*-//;
$rdEntryNew = ".".$rdEntry if($culHmRegDefine{$reg} && next if(!$culHmRegDefine{$reg} || $culHmRegDefine{$reg}{d} eq '1');
$culHmRegDefine{$reg}{d} eq '0' ); $hash->{READINGS}{".".$rdEntry} = $hash->{READINGS}{$rdEntry};
}
next if (!defined($rdEntryNew)); # no change necessary
delete $hash->{READINGS}{$rdEntryNew};
$hash->{READINGS}{$rdEntryNew} = $hash->{READINGS}{$rdEntry};
delete $hash->{READINGS}{$rdEntry}; delete $hash->{READINGS}{$rdEntry};
} }
foreach my $rdEntry (grep /^RegL_/,keys %{$hash->{helper}{shadowReg}}){
$hash->{helper}{shadowReg}{".".$rdEntry} = $hash->{helper}{shadowReg}{$rdEntry};
delete $hash->{helper}{shadowReg}{$rdEntry};
}
} }
elsif ($exLvl eq "1"){# on: Only register values, no raw data elsif ($exLvl eq "1"){# on: Only register values, no raw data
# move register to visible if available # move register to visible if available
foreach my $rdEntry (keys %{$hash->{READINGS}}){ foreach my $rdEntry (grep /^RegL_/,keys %{$hash->{READINGS}}){
my $rdEntryNew; $hash->{READINGS}{".".$rdEntry} = $hash->{READINGS}{$rdEntry};
$rdEntryNew = substr($rdEntry,1) if ($rdEntry =~m /^\.R-/);
$rdEntryNew = ".".$rdEntry if ($rdEntry =~m /^RegL_/);
next if (!$rdEntryNew); # no change necessary
delete $hash->{READINGS}{$rdEntryNew};
$hash->{READINGS}{$rdEntryNew} = $hash->{READINGS}{$rdEntry};
delete $hash->{READINGS}{$rdEntry}; delete $hash->{READINGS}{$rdEntry};
} }
foreach my $rdEntry (grep /^\.R-/ ,keys %{$hash->{READINGS}}){
$hash->{READINGS}{substr($rdEntry,1)} = $hash->{READINGS}{$rdEntry};
delete $hash->{READINGS}{$rdEntry};
}
foreach my $rdEntry (grep /^RegL_/,keys %{$hash->{helper}{shadowReg}}){
$hash->{helper}{shadowReg}{".".$rdEntry} = $hash->{helper}{shadowReg}{$rdEntry};
delete $hash->{helper}{shadowReg}{$rdEntry};
}
} }
elsif ($exLvl eq "2"){# full - incl raw data elsif ($exLvl eq "2"){# full - incl raw data
foreach my $rdEntry (keys %{$hash->{READINGS}}){ foreach my $rdEntry (grep /^\.R(egL_|-)/,keys %{$hash->{READINGS}}){
my $rdEntryNew; $hash->{READINGS}{substr($rdEntry,1)} = $hash->{READINGS}{$rdEntry};
$rdEntryNew = substr($rdEntry,1) if (($rdEntry =~m /^\.RegL_/) ||
($rdEntry =~m /^\.R-/));
next if (!$rdEntryNew); # no change necessary
delete $hash->{READINGS}{$rdEntryNew};
$hash->{READINGS}{$rdEntryNew} = $hash->{READINGS}{$rdEntry};
delete $hash->{READINGS}{$rdEntry}; delete $hash->{READINGS}{$rdEntry};
} }
foreach my $rdEntry (grep /^\.RegL_/ ,keys %{$hash->{helper}{shadowReg}}){
$hash->{helper}{shadowReg}{substr($rdEntry,1)} = $hash->{helper}{shadowReg}{$rdEntry};
delete $hash->{helper}{shadowReg}{$rdEntry};
}
} }
else{; else{;
} }
@ -2300,6 +2305,9 @@ sub CUL_HM_Set($@) {
elsif($cmd eq "reset") { #################################################### elsif($cmd eq "reset") { ####################################################
CUL_HM_PushCmdStack($hash,"++".$flag."11".$id.$dst."0400"); CUL_HM_PushCmdStack($hash,"++".$flag."11".$id.$dst."0400");
} }
elsif($cmd eq "burstXmit") { ################################################
CUL_HM_SndCmd($hash,"++B112$id$dst");
}
elsif($cmd eq "pair") { ##################################################### elsif($cmd eq "pair") { #####################################################
$state = ""; $state = "";
my $serialNr = AttrVal($name, "serialNr", undef); my $serialNr = AttrVal($name, "serialNr", undef);
@ -2320,13 +2328,7 @@ sub CUL_HM_Set($@) {
$state = ""; $state = "";
} }
elsif($cmd eq "getConfig") { ################################################ elsif($cmd eq "getConfig") { ################################################
CUL_HM_PushCmdStack($hash,'++'.$flag.'01'.$id.$dst.'00040000000000') CUL_HM_getConfig($hash);
if ($roleD);
my @chnIdList = CUL_HM_getAssChnIds($name);
foreach my $channel (@chnIdList){
my $chnHash = CUL_HM_id2Hash($channel);
CUL_HM_getConfig($hash,$chnHash,$id,$dst,substr($channel,6,2));
}
$state = ""; $state = "";
} }
elsif($cmd eq "peerBulk") { ################################################# elsif($cmd eq "peerBulk") { #################################################
@ -2404,10 +2406,16 @@ sub CUL_HM_Set($@) {
} }
} }
elsif($cmd eq "regSet") { ############################################### reg elsif($cmd eq "regSet") { ############################################### reg
#set <name> regSet <regName> <value> [<peerChn>] [prep] #set <name> regSet <regName> [prep] <value> [<peerChn>]
#prep is internal use only. It allowes to prepare shadowReg only but supress #prep is internal use only. It allowes to prepare shadowReg only but supress
#writing. Application necessarily needs to execute writing subsequent. #writing. Application necessarily needs to execute writing subsequent.
my (undef,undef,$regName,$data,$peerChnIn,$prep) = @a; my $prep = "";
if ($a[2] =~ m/^(prep|exec)$/){
$prep = $a[2];
splice @a,2,1;#remove prep
}
my (undef,undef,$regName,$data,$peerChnIn) = @a;
$state = ""; $state = "";
if (!$culHmRegType{$st}{$regName} && if (!$culHmRegType{$st}{$regName} &&
!$culHmRegGeneral{$regName} && !$culHmRegGeneral{$regName} &&
@ -2427,7 +2435,8 @@ sub CUL_HM_Set($@) {
) )
.(($reg->{l} == 3)?" peer required":"")." : ".$reg->{t}."\n" .(($reg->{l} == 3)?" peer required":"")." : ".$reg->{t}."\n"
if ($data eq "?"); if ($data eq "?");
return "value:".$data." out of range for Reg \"".$regName."\"" return "value:".$data." out of range $reg->{min} to $reg->{max} for Reg \""
.$regName."\""
if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&& if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&&
($data < $reg->{min} ||$data > $reg->{max})); # none number ($data < $reg->{min} ||$data > $reg->{max})); # none number
return"invalid value. use:". join(",",sort keys%{$reg->{lit}}) return"invalid value. use:". join(",",sort keys%{$reg->{lit}})
@ -2461,11 +2470,11 @@ sub CUL_HM_Set($@) {
my ($lChn,$peerId,$peerChn) = ($chn,"000000","00"); my ($lChn,$peerId,$peerChn) = ($chn,"000000","00");
if (($list == 3) ||($list == 4)){ # peer is necessary for list 3/4 if (($list == 3) ||($list == 4)){ # peer is necessary for list 3/4
return "Peer not specified" if (!$peerChnIn); return "Peer not specified" if ($peerChnIn eq "");
$peerId = CUL_HM_peerChId($peerChnIn,$dst,$id); $peerId = CUL_HM_peerChId($peerChnIn,$dst,$id);
$peerChn = ((length($peerId) == 8)?substr($peerId,6,2):"01"); $peerChn = ((length($peerId) == 8)?substr($peerId,6,2):"01");
$peerId = substr($peerId,0,6); $peerId = substr($peerId,0,6);
return "Peer not specified" if (!$peerId); return "Peer not valid" if (!$peerId);
} }
elsif($list == 0){ elsif($list == 0){
$lChn = "00"; $lChn = "00";
@ -2845,7 +2854,7 @@ sub CUL_HM_Set($@) {
} }
my $prep = ""; my $prep = "";
if ($a[2] =~ m/^(prep|exec)$/ && $md eq "HM-CC-RT-DN"){ if ($a[2] =~ m/^(prep|exec)$/){
$prep = $a[2]; $prep = $a[2];
splice @a,2,1;#remove prep splice @a,2,1;#remove prep
} }
@ -3235,14 +3244,21 @@ sub CUL_HM_infoUpdtChanData(@) {# verify attributes after reboot
DoTrigger("global", 'UNDEFINED '.$chnName.' CUL_HM '.$chnId); DoTrigger("global", 'UNDEFINED '.$chnName.' CUL_HM '.$chnId);
$attr{CUL_HM_id2Name($chnId)}{model} = $model; $attr{CUL_HM_id2Name($chnId)}{model} = $model;
} }
sub CUL_HM_getConfig($$$$$){ sub CUL_HM_getConfig($){
my ($hash,$chnhash,$id,$dst,$chn) = @_; my $hash = shift;
my $flag = CUL_HM_getFlag($hash); my $flag = CUL_HM_getFlag($hash);
my $id = CUL_HM_IOid($hash);
my $dst = substr($hash->{DEF},0,6);
delete $chnhash->{READINGS}{$_} CUL_HM_PushCmdStack($hash,'++'.$flag.'01'.$id.$dst.'00040000000000')
foreach (grep /^[\.]?(RegL_)/,keys %{$chnhash->{READINGS}}); if ($hash->{helper}{role}{dev});
my @chnIdList = CUL_HM_getAssChnIds($hash->{NAME});
my $lstAr = $culHmModel{CUL_HM_getMId($hash)}{lst}; foreach my $channel (@chnIdList){
my $cHash = CUL_HM_id2Hash($channel);
my $chn = substr($channel,6,2);
delete $cHash->{READINGS}{$_}
foreach (grep /^[\.]?(RegL_)/,keys %{$cHash->{READINGS}});
my $lstAr = $culHmModel{CUL_HM_getMId($cHash)}{lst};
if($lstAr){ if($lstAr){
my @list = split(",",$lstAr); #get valid lists e.g."1, 5:2.3p ,6:2" my @list = split(",",$lstAr); #get valid lists e.g."1, 5:2.3p ,6:2"
my $pReq = 0; # Peer request not issued, do only once for channel my $pReq = 0; # Peer request not issued, do only once for channel
@ -3266,23 +3282,24 @@ sub CUL_HM_getConfig($$$$$){
if ($chnValid){# yes, we will go for a list if ($chnValid){# yes, we will go for a list
if ($peerReq){# need to get the peers first if ($peerReq){# need to get the peers first
if($listNo ne 'p'){# not if 'only peers'! if($listNo ne 'p'){# not if 'only peers'!
$chnhash->{helper}{getCfgList} = "all"; $cHash->{helper}{getCfgList} = "all";
$chnhash->{helper}{getCfgListNo} = $listNo; $cHash->{helper}{getCfgListNo} = $listNo;
} }
if (!$pReq){#get peers first, but only once per channel if (!$pReq){#get peers first, but only once per channel
CUL_HM_PushCmdStack($hash,sprintf("++%s01%s%s%s03" CUL_HM_PushCmdStack($cHash,sprintf("++%s01%s%s%s03"
,$flag,$id,$dst,$chn)); ,$flag,$id,$dst,$chn));
$pReq = 1; $pReq = 1;
} }
} }
else{ else{
CUL_HM_PushCmdStack($hash,sprintf("++%s01%s%s%s0400000000%02X" CUL_HM_PushCmdStack($cHash,sprintf("++%s01%s%s%s0400000000%02X"
,$flag,$id,$dst,$chn,$listNo)); ,$flag,$id,$dst,$chn,$listNo));
} }
} }
} }
} }
} }
}
#+++++++++++++++++ Protocol stack, sending, repeat+++++++++++++++++++++++++++++ #+++++++++++++++++ Protocol stack, sending, repeat+++++++++++++++++++++++++++++
sub CUL_HM_pushConfig($$$$$$$$@) {#generate messages to config data to register sub CUL_HM_pushConfig($$$$$$$$@) {#generate messages to config data to register
@ -3320,18 +3337,31 @@ sub CUL_HM_pushConfig($$$$$$$$@) {#generate messages to config data to register
} }
} }
$chnhash->{helper}{shadowReg}{$regLN} = $regs; # update shadow $chnhash->{helper}{shadowReg}{$regLN} = $regs; # update shadow
my $change; my @changeList;
if ($prep eq "exec"){#update complete registerset if ($prep eq "exec"){#update complete registerset
foreach (sort split " ",$chnhash->{helper}{shadowReg}{$regLN}){ @changeList = keys%{$chnhash->{helper}{shadowReg}};
$change .= $_." " if ($rRd !~ m /$_/);# filter only changes
} }
$change =~ s/(\ |:)//g; elsif ($prep eq "prep"){
return; #prepare shadowReg only. More data expected.
} }
else{ else{
$change = $content;# just change actual date push @changeList,$regLN;
} }
return if ($prep eq "prep");#prepare shadowReg only. More data to come.
#Application takes care about execution foreach my $nrn(@changeList){
my $change;
my $nrRd = ReadingsVal($chnhash->{NAME},$nrn,"");
foreach (sort split " ",$chnhash->{helper}{shadowReg}{$nrn}){
$change .= $_." " if ($nrRd !~ m /$_/);# filter only changes
}
next if (!$change);#no changes
$change =~ s/(\ |:)//g;
my $peerN;
($list,$peerN) = ($1,$2) if($nrn =~ m/RegL_(..):(.*)/);
if ($peerN){($peerAddr,$peerChn) = unpack('A6A2', CUL_HM_name2Id($peerN,$hash));}
else {($peerAddr,$peerChn) = ('000000','00');}
CUL_HM_updtRegDisp($hash,$list,$peerAddr.$peerChn); CUL_HM_updtRegDisp($hash,$list,$peerAddr.$peerChn);
CUL_HM_PushCmdStack($hash, "++".$flag.'01'.$src.$dst.$chn.'05'. CUL_HM_PushCmdStack($hash, "++".$flag.'01'.$src.$dst.$chn.'05'.
$peerAddr.$peerChn.$list); $peerAddr.$peerChn.$list);
@ -3341,6 +3371,7 @@ sub CUL_HM_pushConfig($$$$$$$$@) {#generate messages to config data to register
substr($change,$l,$ml)); substr($change,$l,$ml));
} }
CUL_HM_PushCmdStack($hash,"++A001".$src.$dst.$chn."06"); CUL_HM_PushCmdStack($hash,"++A001".$src.$dst.$chn."06");
}
CUL_HM_queueAutoRead($hash->{NAME}) CUL_HM_queueAutoRead($hash->{NAME})
if (2 < CUL_HM_getAttrInt($hash->{NAME},"autoReadReg")); if (2 < CUL_HM_getAttrInt($hash->{NAME},"autoReadReg"));
} }
@ -4709,7 +4740,7 @@ sub CUL_HM_qStateUpdatIfEnab($@){#in:name or id, queue stat-request after 12 s
@{$modules{CUL_HM}{helper}{reqStatus}}= @{$modules{CUL_HM}{helper}{reqStatus}}=
CUL_HM_noDup(@{$modules{CUL_HM}{helper}{reqStatus}},$name); CUL_HM_noDup(@{$modules{CUL_HM}{helper}{reqStatus}},$name);
RemoveInternalTimer("CUL_HM_reqStatus"); RemoveInternalTimer("CUL_HM_reqStatus");
InternalTimer(gettimeofday()+120,"CUL_HM_reqStatus","CUL_HM_reqStatus", 0); InternalTimer(gettimeofday()+10,"CUL_HM_reqStatus","CUL_HM_reqStatus", 0);
} }
} }
sub CUL_HM_getAttrInt($@){#return attrValue as integer sub CUL_HM_getAttrInt($@){#return attrValue as integer
@ -5008,10 +5039,15 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
set myblind regBulk 01 0C:00<br> set myblind regBulk 01 0C:00<br>
</code></ul> </code></ul>
myblind will set the max drive time up for a blind actor to 25,6sec</li> myblind will set the max drive time up for a blind actor to 25,6sec</li>
<li><B>regSet &lt;regName&gt; &lt;value&gt; &lt;peerChannel&gt;</B><a name="CUL_HMregSet"></a><br> <li><B>regSet &lt;regName&gt; [prep|exec] &lt;value&gt; &lt;peerChannel&gt;</B><a name="CUL_HMregSet"></a><br>
For some major register a readable version is implemented supporting For some major register a readable version is implemented supporting
register names &lt;regName&gt; and value conversionsing. Only a subset register names &lt;regName&gt; and value conversionsing. Only a subset
of register can be supproted.<br> of register can be supproted.<br>
Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
improve data transmission.
Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
The last command must have the parameter "exec" in order to transmitt the information.<br>
&lt;value&gt; is the data in human readable manner that will be written &lt;value&gt; is the data in human readable manner that will be written
to the register.<br> to the register.<br>
&lt;peerChannel&gt; is required if this register is defined on a per &lt;peerChannel&gt; is required if this register is defined on a per
@ -5257,13 +5293,13 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
<li><B>desired-temp &lt;temp&gt;</B><br> <li><B>desired-temp &lt;temp&gt;</B><br>
Set different temperatures. &lt;temp&gt; must be between 6 and 30 Set different temperatures. &lt;temp&gt; must be between 6 and 30
Celsius, and precision is half a degree.</li> Celsius, and precision is half a degree.</li>
<li><B>tempListSat HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListSun HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListMon HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListTue HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListThu HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListWed HH:MM temp ... 24:00 temp</B><br></li> <li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
<li><B>tempListFri HH:MM temp ... 24:00 temp</B><br> <li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
Specify a list of temperature intervals. Up to 24 intervals can be Specify a list of temperature intervals. Up to 24 intervals can be
specified for each week day, the resolution is 10 Minutes. The specified for each week day, the resolution is 10 Minutes. The
last time spec must always be 24:00.<br> last time spec must always be 24:00.<br>
@ -5303,7 +5339,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
Specify a list of temperature intervals. Up to 24 intervals can be Specify a list of temperature intervals. Up to 24 intervals can be
specified for each week day, the resolution is 10 Minutes. The specified for each week day, the resolution is 10 Minutes. The
last time spec must always be 24:00.<br> last time spec must always be 24:00.<br>
The optional parameter [prep|exec] allowes to pack the messages and therefore greatly Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
improve data transmission. This is especially helpful if device is operated in wakeup mode. improve data transmission. This is especially helpful if device is operated in wakeup mode.
Usage is to send the commands with paramenter "prep". The data will be accumulated for send. Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
The last command must have the parameter "exec" in order to transmitt the information.<br> The last command must have the parameter "exec" in order to transmitt the information.<br>

View File

@ -1001,7 +1001,7 @@ sub HMinfo_templateSet(@){#####################################################
push @regCh,"$regN,$regV"; push @regCh,"$regN,$regV";
} }
foreach (@regCh){#Finally write to shadow register. foreach (@regCh){#Finally write to shadow register.
my ($ret,undef) = CUL_HM_Set($aHash,$aName,"regSet",split(",",$_),$pName,"prep"); my ($ret,undef) = CUL_HM_Set($aHash,$aName,"regSet","prep",split(",",$_),$pName);
return $ret if ($ret); return $ret if ($ret);
} }
foreach my $regl (keys %{$aHash->{helper}{shadowReg}}){#write any existing shadowreg for this entity foreach my $regl (keys %{$aHash->{helper}{shadowReg}}){#write any existing shadowreg for this entity

View File

@ -696,7 +696,7 @@ my %culHmRegModel = (
DimElsJtDlyOff =>1,DimElsJtRampOn =>1,DimElsJtRampOff =>1 DimElsJtDlyOff =>1,DimElsJtRampOn =>1,DimElsJtRampOff =>1
}, },
"HM-CC-VD" =>{burstRx =>1,valveOffset =>1,valveErrorPos =>1}, "HM-CC-VD" =>{valveOffset =>1,valveErrorPos =>1},
"HM-CC-TC" =>{burstRx =>1,backlOnTime =>1,backlOnMode =>1,btnLock =>1}, "HM-CC-TC" =>{burstRx =>1,backlOnTime =>1,backlOnMode =>1,btnLock =>1},
"HM-CC-RT-DN" =>{btnLock =>1,localResDis =>1,globalBtnLock =>1,modusBtnLock =>1, "HM-CC-RT-DN" =>{btnLock =>1,localResDis =>1,globalBtnLock =>1,modusBtnLock =>1,
cyclicInfoMsg =>1,cyclicInfoMsgDis=>1, cyclicInfoMsg =>1,cyclicInfoMsgDis=>1,
@ -897,7 +897,7 @@ my %culHmGlobalSets = (# all but virtuals
regBulk => "<list>:<peer> <addr1:data1> <addr2:data2> ...", regBulk => "<list>:<peer> <addr1:data1> <addr2:data2> ...",
getRegRaw => "[List0|List1|List2|List3|List4|List5|List6] ... [<PeerChannel>]", getRegRaw => "[List0|List1|List2|List3|List4|List5|List6] ... [<PeerChannel>]",
getConfig => "", getConfig => "",
regSet => "<regName> <value> ... [<peerChannel>]", regSet => "<regName> [prep|exec] <value> ... [<peerChannel>]",
clear => "[readings|register|rssi|msgEvents]", clear => "[readings|register|rssi|msgEvents]",
); );
my %culHmGlobalSetsVrtDev = (# virtuals and devices without subtype my %culHmGlobalSetsVrtDev = (# virtuals and devices without subtype
@ -1021,7 +1021,9 @@ my %culHmModelSets = (# channels of this subtype-------------
,toggle =>"" ,toggle =>""
,press =>"[long|short] [on|off] ..." ,press =>"[long|short] [on|off] ..."
,inhibit =>"[on|off]"}, ,inhibit =>"[on|off]"},
"HM-CC-TC" =>{ statusRequest =>""}, "HM-CC-TC" =>{ statusRequest =>"",
burstXmit =>""},
"HM-CC-RT-DN" =>{ burstXmit =>""},
); );
# clones- - - - - - - - - - - - - - - - - # clones- - - - - - - - - - - - - - - - -
$culHmModelSets{"HM-RC-19-B"} = $culHmModelSets{"HM-RC-19"}; $culHmModelSets{"HM-RC-19-B"} = $culHmModelSets{"HM-RC-19"};
@ -1035,14 +1037,14 @@ my %culHmChanSets = (
,getSerial => ""}, ,getSerial => ""},
"HM-CC-TC02" =>{ peerChan =>" 0 <actChn> ... single [set|unset] [actor|remote|both]" "HM-CC-TC02" =>{ peerChan =>" 0 <actChn> ... single [set|unset] [actor|remote|both]"
,"desired-temp" =>"[on|off|6.0..30.0]" ,"desired-temp" =>"[on|off|6.0..30.0]"
,tempListSat =>"HH:MM temp ..." ,tempListSat =>"[prep|exec] HH:MM temp ..."
,tempListSun =>"HH:MM temp ..." ,tempListSun =>"[prep|exec] HH:MM temp ..."
,tempListMon =>"HH:MM temp ..." ,tempListMon =>"[prep|exec] HH:MM temp ..."
,tempListTue =>"HH:MM temp ..." ,tempListTue =>"[prep|exec] HH:MM temp ..."
,tempListThu =>"HH:MM temp ..." ,tempListThu =>"[prep|exec] HH:MM temp ..."
,tempListWed =>"HH:MM temp ..." ,tempListWed =>"[prep|exec] HH:MM temp ..."
,tempListFri =>"HH:MM temp ..." ,tempListFri =>"[prep|exec] HH:MM temp ..."
,partyMode =>"HH:MM durationDays" ,partyMode =>"[prep|exec] HH:MM durationDays"
,displayMode =>"[temp-only|temp-hum]" ,displayMode =>"[temp-only|temp-hum]"
,displayTemp =>"[actual|setpoint]" ,displayTemp =>"[actual|setpoint]"
,displayTempUnit=>"[celsius|fahrenheit]" ,displayTempUnit=>"[celsius|fahrenheit]"