diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm
index 842ec21e9..3d26766de 100755
--- a/fhem/FHEM/10_CUL_HM.pm
+++ b/fhem/FHEM/10_CUL_HM.pm
@@ -1779,7 +1779,7 @@ sub CUL_HM_Get($@) {
my $eName = CUL_HM_id2Name($e);
push @eNames, $eName if($eName !~ m/_chn:/);
}
-
+
foreach my $eName (@eNames){
print aSave "\n#--- entity:".$eName;
my $pIds = AttrVal($eName, "peerIDs", "");
@@ -1790,7 +1790,7 @@ sub CUL_HM_Get($@) {
print aSave "\nset ".$eName." peerBulk ".$pIds;
}
my $ehash = $defs{$eName};
- foreach my $read (sort grep(!/^[\.]?RegL_/,keys %{$ehash->{READINGS}})){
+ foreach my $read (sort grep(/^[\.]?RegL_/,keys %{$ehash->{READINGS}})){
print aSave "\nset ".$eName." regBulk ".$read." "
.ReadingsVal($eName,$read,"");
$timestamps .= "\n# ".ReadingsTimestamp($eName,$read,"")." :".$read;
@@ -4808,7 +4808,7 @@ sub CUL_HM_putHash($) {# provide data for HMinfo
'3' includes '2' plus updates on writes to the device
'4' includes '3' plus tries to request status if it seems to be missing
Execution will be delayed in order to prevent congestion at startup. Therefore the update
- of the readings and the display will be delayed depending on the sice of the database.
+ of the readings and the display will be delayed depending on the size of the database.
Recommendations and constrains upon usage:
use this attribute on the device or channel 01. Do not use it separate on each channel
diff --git a/fhem/FHEM/98_HMinfo.pm b/fhem/FHEM/98_HMinfo.pm
index b0402333a..9cd1c77f3 100644
--- a/fhem/FHEM/98_HMinfo.pm
+++ b/fhem/FHEM/98_HMinfo.pm
@@ -449,6 +449,8 @@ sub HMinfo_SetFn($$) {#########################################################
."\n [] : only matiching names are processed - partial names are possible"
."\n [] : any match in the output are searched. "
."\n"
+ ."\n cpRegs "
+ ."\n copy register for a channel or behavior of channel/peer"
."\n templateChk [ ...] "
."\n compare whether register match the template values"
."\n templateDef ...] : [:] ... "
@@ -713,6 +715,52 @@ my %tpl = (
,CtOff =>"p1"
,CtValLo =>"p0"
}}
+ ,BlStopDnLg => {p=>"" ,t=>"Blind: stop drive on any key - for long drive down"
+ ,reg=>{ ActionType =>"jmpToTarget"
+ ,BlJtDlyOff =>"refOff"
+ ,BlJtDlyOn =>"dlyOff"
+ ,BlJtOff =>"dlyOff"
+ ,BlJtOn =>"dlyOff"
+ ,BlJtRampOff =>"rampOff"
+ ,BlJtRampOn =>"on"
+ ,BlJtRefOff =>"rampOff"
+ ,BlJtRefOn =>"on"
+ ,MultiExec =>"on"
+ }}
+ ,BlStopDnSh => {p=>"" ,t=>"Blind: stop drive on any key - for short drive down"
+ ,reg=>{ ActionType =>"jmpToTarget"
+ ,BlJtDlyOff =>"refOff"
+ ,BlJtDlyOn =>"dlyOff"
+ ,BlJtOff =>"dlyOff"
+ ,BlJtOn =>"dlyOff"
+ ,BlJtRampOff =>"off"
+ ,BlJtRampOn =>"on"
+ ,BlJtRefOff =>"rampOff"
+ ,BlJtRefOn =>"on"
+ }}
+ ,BlStopUpLg => {p=>"" ,t=>"Blind: stop drive on any key - for long drive up"
+ ,reg=>{ ActionType =>"jmpToTarget"
+ ,BlJtDlyOff =>"dlyOn"
+ ,BlJtDlyOn =>"refOn"
+ ,BlJtOff =>"dlyOn"
+ ,BlJtOn =>"dlyOn"
+ ,BlJtRampOff =>"off"
+ ,BlJtRampOn =>"rampOn"
+ ,BlJtRefOff =>"off"
+ ,BlJtRefOn =>"rampOn"
+ }}
+ ,BlStopDnSh => {p=>"" ,t=>"Blind: stop drive on any key - for short drive up"
+ ,reg=>{ ActionType =>"jmpToTarget"
+ ,BlJtDlyOff =>"dlyOn"
+ ,BlJtDlyOn =>"refOn"
+ ,BlJtOff =>"dlyOn"
+ ,BlJtOn =>"dlyOn"
+ ,BlJtRampOff =>"off"
+ ,BlJtRampOn =>"on"
+ ,BlJtRefOff =>"off"
+ ,BlJtRefOn =>"rampOn"
+ }}
+
);
sub HMinfo_templateDef(@){#####################################################
@@ -818,7 +866,7 @@ sub HMinfo_templateList($){####################################################
my $reply = "";
# if(!$templ || !(grep /$templ/,keys%tpl)){# list all templates
if(!($templ && (grep /$templ/,keys%tpl))){# list all templates
- foreach (keys%tpl){
+ foreach (sort keys%tpl){
$reply .= sprintf("%-16s params:%-24s Info:%s\n"
,$_
,$tpl{$_}{p}
@@ -828,7 +876,7 @@ sub HMinfo_templateList($){####################################################
}
else{#details about one template
$reply = sprintf("%-16s params:%-24s Info:%s\n",$templ,$tpl{$templ}{p},$tpl{$templ}{t});
- foreach (keys %{$tpl{$templ}{reg}}){
+ foreach (sort keys %{$tpl{$templ}{reg}}){
my $val = $tpl{$templ}{reg}{$_};
if ($val =~m /^p(.)$/){
my @a = split(" ",$tpl{$templ}{p});
@@ -841,47 +889,6 @@ sub HMinfo_templateList($){####################################################
}
sub HMinfo_cpRegs(@){#########################################################
- # copy level:
- # List11 cpRegs channelSrc channelDst
- # List13/4 cpRegs channelSrc:peer channelDst:peer
- #
- # Checks: registerlist of source must appear complete
- # Peer must be present in source and destination, list must be complete
-
- #description:
- # - cpRegs <src:peer> <dst:peer>
- # allows to copy register, setting and behavior of a channel to
- # another or for peers from the same or different channels
- # - src:peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <\li>
- #
- dst:peer is the destination entity.<\li>
- # Examples are
- # set hm cpRegs blindR blindL # will copy all general register for this channel from the blindR to the blindL entity.
- # This includes items like drive times.
- # set hm cpRegs blindR:Btn1 blindL:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindL
- # set hm cpRegs blindR:Btn1 blindR:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindR, i.e. inside the same Actor
- #
- # Restrictions:
- # cpRegs will not add any peers or read from the devices. It is up to the user to read register in advance
- # cpRegs is only allowed between identical models
- # peerings of devices must exist. cpRegs will terminate if peers cannot be identified
- # cpRegs estimates that all readings are up-to-date. It is up to the user to ensure and check data consistancy.
- #
- #
- #
-
- #help
- #."\n cpRegs "
- #."\n copy register for a channel or behavior of channel/peer"
-
- #tests
- #define tc CUL_HM 222222
- #attr tc model HM-LC-Dim1TPBU-FM
- #attr tc peerIDs 18208305,22222201
- #
- #set hm cpRegs LichtL:FB_01 tc
- #set hm cpRegs LichtL:FB_Btn_01 tc:FB_Btn_05
- #set hm cpRegs LichtL:FB_Btn_01 tc:self01
-
my ($srcCh,$dstCh) = @_;
my ($srcP,$dstP,$srcPid,$dstPid,$srcRegLn,$dstRegLn);
($srcCh,$srcP) = split(":",$srcCh,2);
@@ -926,9 +933,8 @@ sub HMinfo_cpRegs(@){#########################################################
# we habe a reglist with termination, source and destination peer is checked. Go copy
my $srcData = $defs{$srcCh}{READINGS}{$srcRegLn}{VAL};
$srcData =~ s/00:00//; # remove termination
- Log 1,"General HMinfo_cpRegs:$srcRegLn->".join("-",split(" ",$srcData));
-# my $ret = CUL_HM_Set($defs{$dstCh},$dstCh,"regBulk",$srcRegLn,split(" ",$srcData));
-# return $ret;
+ my ($ret,undef) = CUL_HM_Set($defs{$dstCh},$dstCh,"regBulk",$srcRegLn,split(" ",$srcData));
+ return $ret;
}
1;
=pod
@@ -1041,6 +1047,27 @@ sub HMinfo_cpRegs(@){#########################################################
- Readings relates to set clear readings
- Rssi clears all rssi counters
+ - cpRegs <src:peer> <dst:peer>
+ allows to copy register, setting and behavior of a channel to
+ another or for peers from the same or different channels. Copy therefore is allowed
+ intra/inter device and intra/inter channel.
+ - src:peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <\li>
+
- dst:peer is the destination entity.<\li>
+ Examples are
+
+ set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity.
+ This includes items like drive times. It does not include peers related register (list 3/4)
+ set hm cpRegs blindR:Btn1 blindL:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindL
+ set hm cpRegs blindR:Btn1 blindR:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindR, i.e. inside the same Actor
+
+
+ Restrictions:
+ cpRegs will not add any peers or read from the devices. It is up to the user to read register in advance
+ cpRegs is only allowed between identical models
+ peerings of devices must exist. cpRegs will terminate if peers cannot be identified
+ cpRegs estimates that all readings are up-to-date. It is up to the user to ensure and check data consistancy.
+
+
- saveConfig [filter]
performs a save for all HM register setting and peers. See CUL_HM saveConfig.