mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
OWX clients: call InternalTimer in nonblocking mode
git-svn-id: https://svn.fhem.de/fhem/trunk@6164 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
57082bd8b5
commit
7413145a11
@ -310,7 +310,7 @@ sub OWAD_Attr(@) {
|
||||
$hash->{INTERVAL} = $value;
|
||||
if ($init_done) {
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 0);
|
||||
}
|
||||
last;
|
||||
};
|
||||
@ -751,7 +751,7 @@ sub OWAD_GetValues($) {
|
||||
|
||||
#-- restart timer for updates
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(time()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 1);
|
||||
InternalTimer(time()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 0);
|
||||
|
||||
#-- Get readings, alarms and stati according to interface type
|
||||
if( $interface eq "OWX" ){
|
||||
@ -935,7 +935,7 @@ sub OWAD_Set($@) {
|
||||
# update timer
|
||||
$hash->{INTERVAL} = $value;
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWAD_GetValues", $hash, 0);
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
@ -1261,7 +1261,7 @@ sub OWCOUNT_Set($@) {
|
||||
# update timer
|
||||
$hash->{INTERVAL} = $value;
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWCOUNT_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWCOUNT_GetValues", $hash, 0);
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ sub OWID_Attr(@) {
|
||||
$hash->{INTERVAL} = $value;
|
||||
if ($init_done) {
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 0);
|
||||
}
|
||||
last;
|
||||
};
|
||||
@ -339,7 +339,7 @@ sub OWID_GetValues($) {
|
||||
|
||||
#-- restart timer for updates
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(time()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 1);
|
||||
InternalTimer(time()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 0);
|
||||
|
||||
#-- hash of the busmaster
|
||||
my $master = $hash->{IODev};
|
||||
@ -408,7 +408,7 @@ sub OWID_Set($@) {
|
||||
# update timer
|
||||
$hash->{INTERVAL} = $value;
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWID_GetValues", $hash, 0);
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ OWTEMP_GetUpdate($$)
|
||||
} else {
|
||||
$hash->{INTERVAL} = $hash->{INTV_ALARM};
|
||||
}
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWTEMP_GetUpdate", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWTEMP_GetUpdate", $hash, 0);
|
||||
} else {
|
||||
return $value;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ sub OWTHERM_Attr(@) {
|
||||
|
||||
if ($init_done) {
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWTHERM_GetValues", $hash, 1);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "OWTHERM_GetValues", $hash, 0);
|
||||
}
|
||||
last;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user