2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 07:16:03 +00:00

correct autoReadReg

git-svn-id: https://svn.fhem.de/fhem/trunk@3503 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-07-25 16:16:09 +00:00
parent fb23aa765a
commit 38ee7c2542

View File

@ -3,7 +3,6 @@
package main; package main;
use strict; use strict;
use warnings; use warnings;
use POSIX;
sub HMinfo_Initialize($$); sub HMinfo_Initialize($$);
sub HMinfo_Define($$); sub HMinfo_Define($$);
@ -18,7 +17,6 @@ sub HMinfo_post($);
use Blocking; use Blocking;
sub HMinfo_Initialize($$) {#################################################### sub HMinfo_Initialize($$) {####################################################
my ($hash) = @_; my ($hash) = @_;
@ -223,14 +221,14 @@ sub HMinfo_SetFn($$) {#########################################################
my @entities; my @entities;
foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){ foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){
next if (!substr(AttrVal($dName,"autoReadReg","0"),0,1)); next if (!substr(AttrVal($dName,"autoReadReg","0"),0,1));
my @arr; my @arr;
if(!$modules{CUL_HM}{helper}{updtCfgLst}){ if(!$modules{CUL_HM}{helper}{autoRdCfgLst}){
$modules{CUL_HM}{helper}{updtCfgLst} = \@arr; $modules{CUL_HM}{helper}{autoRdCfgLst} = \@arr;
} }
push @{$modules{CUL_HM}{helper}{updtCfgLst}}, $dName; push @{$modules{CUL_HM}{helper}{autoRdCfgLst}}, $dName;
RemoveInternalTimer("updateConfig"); $defs{$dName}{autoRead} = "scheduled";
InternalTimer(gettimeofday()+5,"CUL_HM_autoReadConfig", "updateConfig", 0); RemoveInternalTimer("autoRdCfg");
InternalTimer(gettimeofday()+5,"CUL_HM_autoReadConfig","autoRdCfg",0);
push @entities,$dName; push @entities,$dName;
} }
return $cmd." done:" ."\n cleared" ."\n ".(join "\n ",sort @entities) return $cmd." done:" ."\n cleared" ."\n ".(join "\n ",sort @entities)
@ -1086,16 +1084,20 @@ sub HMinfo_cpRegs(@){#########################################################
</li> </li>
<li><a name="#HMinfoclear">clear [Protocol|Readings|Rssi]</a> <a href="HMinfoFilter">[filter]</a><br> <li><a name="#HMinfoclear">clear [Protocol|Readings|Rssi]</a> <a href="HMinfoFilter">[filter]</a><br>
executes a set clear ... on all HM entities<br> executes a set clear ... on all HM entities<br>
<ul>
<li>Protocol relates to set clear msgEvents</li> <li>Protocol relates to set clear msgEvents</li>
<li>Readings relates to set clear readings</li> <li>Readings relates to set clear readings</li>
<li>Rssi clears all rssi counters </li> <li>Rssi clears all rssi counters </li>
</ul>
</li> </li>
<li><a name="#HMinfocpRegs">cpRegs &lt;src:peer&gt; &lt;dst:peer&gt; </a><br> <li><a name="#HMinfocpRegs">cpRegs &lt;src:peer&gt; &lt;dst:peer&gt; </a><br>
allows to copy register, setting and behavior of a channel to 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 another or for peers from the same or different channels. Copy therefore is allowed
intra/inter device and intra/inter channel. intra/inter device and intra/inter channel.
<li>src:peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <\li> <ul>
<li>dst:peer is the destination entity.<\li> <li>src:peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied </li>
<li>dst:peer is the destination entity.</li>
</ul>
Examples are Examples are
<code> <code>
set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity. set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity.