From d6d178b58c7555a7a2c3e801f4413a99b755a7b1 Mon Sep 17 00:00:00 2001 From: tpoitzsch <> Date: Sat, 1 Nov 2014 20:03:27 +0000 Subject: [PATCH] PROPLANTA: bugfix git-svn-id: https://svn.fhem.de/fhem/trunk@6857 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/59_PROPLANTA.pm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/fhem/FHEM/59_PROPLANTA.pm b/fhem/FHEM/59_PROPLANTA.pm index db7d940b2..8d6c0bd0f 100644 --- a/fhem/FHEM/59_PROPLANTA.pm +++ b/fhem/FHEM/59_PROPLANTA.pm @@ -338,7 +338,9 @@ sub PROPLANTA_Set($@) when ("update") { PROPLANTA_Log $hash, 3, "set command: " . $a[1]; + $hash->{LOCAL} = 1; PROPLANTA_Start($hash); + $hash->{LOCAL} = 0; } default { @@ -393,14 +395,16 @@ sub PROPLANTA_Start($) $hash->{Interval} = AttrVal( $name, "Interval", 3600 ); - # setup timer - RemoveInternalTimer( $hash ); - InternalTimer( - gettimeofday() + $hash->{Interval}, - "PROPLANTA_Start", - $name, - 0 ); - + if(!$hash->{LOCAL} && $hash->{INTERVAL} > 0) { + # setup timer + RemoveInternalTimer( $hash ); + InternalTimer( + gettimeofday() + $hash->{Interval}, + "PROPLANTA_Start", + $name, + 1 ); + } + if ( AttrVal( $name, 'URL', '') eq '' && not defined( $hash->{URL} ) ) { PROPLANTA_Log $hash, 3, "missing URL"; @@ -420,8 +424,7 @@ sub PROPLANTA_Start($) ##################################### sub PROPLANTA_Run($) { - my ($string) = @_; - my ( $name, $server ) = split( "\\|", $string ); + my ($name) = @_; my $ptext=$name; return unless ( defined($name) );