mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
77_UWZ: remove last InternalTimer Fn parameter
git-svn-id: https://svn.fhem.de/fhem/trunk@19869 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e4b0141253
commit
393478fe23
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- change: 77_UWZ: remove last InternalTimer Fn parameter
|
||||
- feature: 14_SD_WS.pm: crc calculation fixes and
|
||||
new protocol for Atech wireless weather station
|
||||
added new sensor TECVANCE TV-4848
|
||||
|
@ -166,6 +166,7 @@ BEGIN {
|
||||
BlockingKill
|
||||
init_done
|
||||
FW_httpheader
|
||||
HttpUtils_BlockingGet
|
||||
deviceEvents)
|
||||
);
|
||||
}
|
||||
@ -844,27 +845,25 @@ sub JSONAcquire($$) {
|
||||
|
||||
Log $hash, 4, "Start capturing of $URL";
|
||||
|
||||
my $err_log = "";
|
||||
my $agent = LWP::UserAgent->new(
|
||||
env_proxy => 1,
|
||||
keep_alive => 1,
|
||||
protocols_allowed => ['http'],
|
||||
timeout => 10
|
||||
);
|
||||
my $request = HTTP::Request->new( GET => $URL );
|
||||
my $response = $agent->request($request);
|
||||
$err_log = "Can't get $URL -- " . $response->status_line
|
||||
unless ( $response->is_success );
|
||||
my $param = {
|
||||
url => "$URL",
|
||||
timeout => 5,
|
||||
hash => $hash,
|
||||
method => "GET",
|
||||
header => "",
|
||||
};
|
||||
|
||||
if ( $err_log ne "" ) {
|
||||
readingsSingleUpdate( $hash, "lastConnection", $response->status_line,
|
||||
1 );
|
||||
my ( $err, $data ) = HttpUtils_BlockingGet($param);
|
||||
|
||||
if ( $err ne "" ) {
|
||||
my $err_log = "Can't get $URL -- " . $err;
|
||||
readingsSingleUpdate( $hash, "lastConnection", $err, 1 );
|
||||
Log $hash, 1, "Error: $err_log";
|
||||
return "Error|Error " . $response->status_line;
|
||||
return "Error|Error " . $err;
|
||||
}
|
||||
|
||||
Log $hash, 4, length( $response->content ) . " characters captured";
|
||||
return $response->content;
|
||||
Log $hash, 4, length($data) . " characters captured: $data";
|
||||
return $data;
|
||||
}
|
||||
|
||||
#####################################
|
||||
@ -880,7 +879,7 @@ sub Start($) {
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer( gettimeofday() + $hash->{INTERVAL},
|
||||
"UWZ_Start", $hash, 1 );
|
||||
"UWZ_Start", $hash );
|
||||
return undef if ( IsDisabled($name) );
|
||||
readingsSingleUpdate( $hash, 'currentIntervalMode', 'normal', 0 );
|
||||
}
|
||||
@ -2542,7 +2541,7 @@ sub IntervalAtWarnLevel($) {
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer( gettimeofday() + $hash->{INTERVALWARN},
|
||||
"UWZ_Start", $hash, 1 );
|
||||
"UWZ_Start", $hash );
|
||||
|
||||
Log $hash, 4,
|
||||
"restart internal timer with interval $hash->{INTERVALWARN}";
|
||||
@ -2552,7 +2551,7 @@ sub IntervalAtWarnLevel($) {
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer( gettimeofday() + $hash->{INTERVALWARN},
|
||||
"UWZ_Start", $hash, 1 );
|
||||
"UWZ_Start", $hash );
|
||||
|
||||
Log $hash, 4,
|
||||
"restart internal timer with interval $hash->{INTERVALWARN}";
|
||||
@ -3624,7 +3623,7 @@ sub UWZSearchAreaID($$) {
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v2.2.0",
|
||||
"version": "v2.2.2",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user