mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
PROPLANTA: bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk@6857 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
50288f0c54
commit
d6d178b58c
@ -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) );
|
||||
|
Loading…
Reference in New Issue
Block a user