From fb223f4000e8c14f6a9609f4cb44b0da1dac668b Mon Sep 17 00:00:00 2001 From: martins <> Date: Sat, 12 Jan 2019 01:20:11 +0000 Subject: [PATCH] 98_Verkehrsinfo.pm: bugfix internalTimer (Forum #95654) git-svn-id: https://svn.fhem.de/fhem/trunk@18219 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_Verkehrsinfo.pm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 75a9afcc6..09f034071 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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. + - bugfix: 98_Verkehrsinfo.pm: internalTimer - change: 32_withings: improve Aura handling - bugfix: 49_SSCam: fix blocking sscam operation if snap was executed with arguments and aatribute snapEmailTxt is not set, diff --git a/fhem/FHEM/98_Verkehrsinfo.pm b/fhem/FHEM/98_Verkehrsinfo.pm index ff6917b45..e647ce709 100644 --- a/fhem/FHEM/98_Verkehrsinfo.pm +++ b/fhem/FHEM/98_Verkehrsinfo.pm @@ -25,6 +25,10 @@ ############################################################################ # # Changelog: +# 2019-01-12, v2.4 +# Bugfix: Attribut disable InternalTimer parameter 4 = 0, nonblocking +# Bugfix: Verkehrsinfo_GetUpdate, skip InternalTimer start if the Attribut disable != 0 +# # 2018-10-21, v2.3 # Feature: Attribut disable added # @@ -566,7 +570,9 @@ sub Verkehrsinfo_GetUpdate($) { if ( $hash->{Interval}) { RemoveInternalTimer ($hash); } - InternalTimer(gettimeofday()+$hash->{Interval}, "Verkehrsinfo_GetUpdate", $hash, 1); + if (AttrVal($name,"disable","0") == "0"){ + InternalTimer(gettimeofday()+$hash->{Interval}, "Verkehrsinfo_GetUpdate", $hash, 0); + } Log3 $hash, 4, "Verkehrsinfo: ($name) internal interval timer set to call GetUpdate again in " . int($hash->{Interval}). " seconds"; my $param = {