mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
obey slow write to wakeup devices
git-svn-id: https://svn.fhem.de/fhem/trunk@4155 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c22f7bd33
commit
de30a1332b
@ -383,6 +383,24 @@ sub CUL_HM_Rename($$$) {#############################
|
|||||||
$chnHash->{device} = $name;
|
$chnHash->{device} = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($hash->{helper}{role}{chn}){
|
||||||
|
my $HMidCh = substr($HMid."01",0,8);
|
||||||
|
foreach my $pId (keys %{$modules{CUL_HM}{defptr}}){
|
||||||
|
my $pH = $modules{CUL_HM}{defptr}{$pId};
|
||||||
|
my $pN = $pH->{NAME};
|
||||||
|
my $pPeers = AttrVal($pN, "peerIDs", "");
|
||||||
|
if ($pPeers =~ m/$HMidCh/){
|
||||||
|
CUL_HM_ID2PeerList ($pN,"x",0);
|
||||||
|
foreach my $pR (grep /-$oldName-/,keys%{$pH->{READINGS}}){
|
||||||
|
my $pRn = $pR;
|
||||||
|
$pRn =~ s/$oldName/$name/;
|
||||||
|
$pH->{READINGS}{$pRn}{VAL} = $pH->{READINGS}{$pR}{VAL};
|
||||||
|
$pH->{READINGS}{$pRn}{TIME} = $pH->{READINGS}{$pR}{TIME};
|
||||||
|
delete $pH->{READINGS}{$pR};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sub CUL_HM_Attr(@) {#################################
|
sub CUL_HM_Attr(@) {#################################
|
||||||
@ -1559,7 +1577,8 @@ sub CUL_HM_parseCommon(@){#####################################################
|
|||||||
#General set timer
|
#General set timer
|
||||||
return "done"
|
return "done"
|
||||||
}
|
}
|
||||||
$shash->{protCondBurst} = "on" if ($shash->{protCondBurst} !~ m/forced/);
|
$shash->{protCondBurst} = "on" if ( $shash->{protCondBurst}
|
||||||
|
&& $shash->{protCondBurst} !~ m/forced/);
|
||||||
$shash->{helper}{prt}{awake}=2;#awake
|
$shash->{helper}{prt}{awake}=2;#awake
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1604,7 +1623,11 @@ sub CUL_HM_parseCommon(@){#####################################################
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $shash->{helper}{prt}{mmcS}
|
if ( $shash->{helper}{prt}{mmcS}
|
||||||
&& $shash->{helper}{prt}{mmcS} == 3){
|
&& $shash->{helper}{prt}{mmcS} == 3){
|
||||||
|
# after write device might need a break
|
||||||
|
# allow for wake types only - and if commands are pending
|
||||||
|
$shash->{helper}{prt}{try} = 1 if (CUL_HM_getRxType($shash) & 0x08 #wakeup
|
||||||
|
&& $shash->{cmdStack});
|
||||||
if ($success eq 'yes'){
|
if ($success eq 'yes'){
|
||||||
delete $shash->{helper}{prt}{mmcA};
|
delete $shash->{helper}{prt}{mmcA};
|
||||||
delete $shash->{helper}{prt}{mmcS};
|
delete $shash->{helper}{prt}{mmcS};
|
||||||
@ -3649,8 +3672,8 @@ sub CUL_HM_respPendRm($) {#del response related entries in messageing entity
|
|||||||
$modules{CUL_HM}{prot}{rspPend}-- if($hash->{helper}{prt}{rspWait}{cmd});
|
$modules{CUL_HM}{prot}{rspPend}-- if($hash->{helper}{prt}{rspWait}{cmd});
|
||||||
delete ($hash->{helper}{prt}{rspWait});
|
delete ($hash->{helper}{prt}{rspWait});
|
||||||
delete $hash->{helper}{tmdOn};
|
delete $hash->{helper}{tmdOn};
|
||||||
delete $hash->{helper}{prt}{mmcA};
|
# delete $hash->{helper}{prt}{mmcA};
|
||||||
delete $hash->{helper}{prt}{mmcS};
|
# delete $hash->{helper}{prt}{mmcS};
|
||||||
RemoveInternalTimer($hash); # remove resend-timer
|
RemoveInternalTimer($hash); # remove resend-timer
|
||||||
RemoveInternalTimer("respPend:$hash->{DEF}");# remove responsePending timer
|
RemoveInternalTimer("respPend:$hash->{DEF}");# remove responsePending timer
|
||||||
$respRemoved = 1;
|
$respRemoved = 1;
|
||||||
@ -3672,6 +3695,12 @@ sub CUL_HM_respPendTout($) {
|
|||||||
$pHash->{awake} = 0;# set to asleep
|
$pHash->{awake} = 0;# set to asleep
|
||||||
CUL_HM_protState($hash,"CMDs_pending");
|
CUL_HM_protState($hash,"CMDs_pending");
|
||||||
}
|
}
|
||||||
|
elsif ($pHash->{try}){# send was a try - revert and wait for wakeup
|
||||||
|
unshift (@{$hash->{cmdStack}}, "++".substr($pHash->{rspWait}{cmd},6));
|
||||||
|
delete $pHash->{try};
|
||||||
|
CUL_HM_respPendRm($hash);# do not count problems with wakeup try, just wait
|
||||||
|
CUL_HM_protState($hash,"CMDs_pending");
|
||||||
|
}
|
||||||
elsif ($hash->{IODev}->{STATE} !~ m/^(opened|Initialized)$/){#IO errors
|
elsif ($hash->{IODev}->{STATE} !~ m/^(opened|Initialized)$/){#IO errors
|
||||||
CUL_HM_eventP($hash,"IOdly");
|
CUL_HM_eventP($hash,"IOdly");
|
||||||
CUL_HM_ProcessCmdStack($hash) if(CUL_HM_getRxType($hash) & 0x03);
|
CUL_HM_ProcessCmdStack($hash) if(CUL_HM_getRxType($hash) & 0x03);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user