mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
added Attribute timeout to HTTPMOD
git-svn-id: https://svn.fhem.de/fhem/trunk@5494 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d020277a89
commit
7fd2789c27
@ -27,6 +27,8 @@
|
||||
# 2014-1-15 added readingsExpr to allow some computation on raw values before put in readings
|
||||
# 2014-3-13 added noShutdown and disable attributes
|
||||
# 2014-4-8 fixed noShutdown check
|
||||
# 2014-4-9 added Attribute timeout as suggested by Frank
|
||||
#
|
||||
|
||||
package main;
|
||||
|
||||
@ -77,6 +79,7 @@ sub HTTPMOD_Initialize($)
|
||||
"requestData.* " .
|
||||
"disable:0,1 " .
|
||||
"noShutdown:0,1 " .
|
||||
"timeout " .
|
||||
$readingFnAttributes;
|
||||
}
|
||||
|
||||
@ -109,8 +112,8 @@ sub HTTPMOD_Define($$)
|
||||
|
||||
# for non blocking HTTP Get
|
||||
$hash->{callback} = \&HTTPMOD_Read;
|
||||
$hash->{timeout} = 2;
|
||||
#$hash->{loglevel} = 3;
|
||||
$hash->{timeout} = AttrVal($name, "timeout", 2);
|
||||
#$hash->{timeout} = 2;
|
||||
|
||||
# initial request after 2 secs, there timer is set to interval for further update
|
||||
InternalTimer(gettimeofday()+2, "HTTPMOD_GetUpdate", $hash, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user