mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
00_HMlan:set state after restart correct
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5b4caa0bec
commit
ad84348874
@ -1028,7 +1028,7 @@ sub HMLAN_KeepAliveCheck($) {##################################################
|
|||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
if ($hash->{helper}{q}{keepAliveRec} != 1){# no answer
|
if ($hash->{helper}{q}{keepAliveRec} != 1){# no answer
|
||||||
if ($hash->{helper}{q}{keepAliveRpt} >2){# give up here
|
if ($hash->{helper}{q}{keepAliveRpt} >2){# give up here
|
||||||
HMLAN_condUpdate($hash,252);# trigger timeout event
|
HMLAN_condUpdate($hash,253);# trigger timeout event
|
||||||
DevIo_Disconnected($hash);
|
DevIo_Disconnected($hash);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1038,8 +1038,8 @@ sub HMLAN_KeepAliveCheck($) {##################################################
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$hash->{helper}{q}{keepAliveRpt} = 0;
|
$hash->{helper}{q}{keepAliveRpt} = 0;
|
||||||
|
HMLAN_condUpdate($hash,0) if ($hash->{helper}{q}{HMcndN} == 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
sub HMLAN_secSince2000() {#####################################################
|
sub HMLAN_secSince2000() {#####################################################
|
||||||
# Calculate the local time in seconds from 2000.
|
# Calculate the local time in seconds from 2000.
|
||||||
@ -1090,6 +1090,11 @@ sub HMLAN_clearQ($) {#clear pending acks due to timeout########################
|
|||||||
sub HMLAN_condUpdate($$) {#####################################################
|
sub HMLAN_condUpdate($$) {#####################################################
|
||||||
my($hash,$HMcnd) = @_;
|
my($hash,$HMcnd) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
if (AttrVal($name,"dummy",undef)){
|
||||||
|
readingsUpdateSingle($hash,"state","disconnected");
|
||||||
|
$hash->{XmitOpen} = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
my $hashCnd = $hash->{helper}{cnd};#short to helper
|
my $hashCnd = $hash->{helper}{cnd};#short to helper
|
||||||
my $hashQ = $hash->{helper}{q};#short to helper
|
my $hashQ = $hash->{helper}{q};#short to helper
|
||||||
$hash->{helper}{cnd}{$HMcnd} = 0 if (!$hash->{helper}{cnd} ||
|
$hash->{helper}{cnd}{$HMcnd} = 0 if (!$hash->{helper}{cnd} ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user