2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 01:06:04 +00:00

73_km200.pm: Bugfix

git-svn-id: https://svn.fhem.de/fhem/trunk@10707 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
sailor-fhem 2016-02-03 12:29:46 +00:00
parent b097feccff
commit 9f2c88e717

View File

@ -471,6 +471,9 @@ sub km200_Attr(@)
my @KM200_DONOTPOLL = (); my @KM200_DONOTPOLL = ();
my @temp = @a; my @temp = @a;
### Stop the current timer
RemoveInternalTimer($hash);
### Delete the first 3 items of the array ### Delete the first 3 items of the array
splice @temp, 0, 3; splice @temp, 0, 3;
@ -512,9 +515,6 @@ sub km200_Attr(@)
### Message for debugging purposes ### Message for debugging purposes
Log3 $name, 5, $name. " : km200 - The following services will not be polled: ". $a[3]; Log3 $name, 5, $name. " : km200 - The following services will not be polled: ". $a[3];
### Stop the current timer
RemoveInternalTimer($hash);
### Interrupting all currently running Polling ### Interrupting all currently running Polling
@{$hash->{Secret}{KM200DYNSERVICES}} = ""; @{$hash->{Secret}{KM200DYNSERVICES}} = "";
$hash->{temp}{ServiceCounterDyn} = 0; $hash->{temp}{ServiceCounterDyn} = 0;
@ -522,8 +522,8 @@ sub km200_Attr(@)
### Delete all Readings ### Delete all Readings
fhem( "deletereading $name .*" ); fhem( "deletereading $name .*" );
### Re-start the sounding of values from KM200 but wait the period of $hash->{POLLINGTIMEOUT} + 1s ### Re-start the sounding of values from KM200 but wait the period of $hash->{POLLINGTIMEOUT} + 10s
InternalTimer(gettimeofday()+$hash->{POLLINGTIMEOUT}+1, "km200_GetInitService", $hash, 0); InternalTimer(gettimeofday()+$hash->{POLLINGTIMEOUT}+10, "km200_GetInitService", $hash, 0);
Log3 $name, 5, $name. " : km200 - Sounding of services re-started after change of DoNotPoll attribute"; Log3 $name, 5, $name. " : km200 - Sounding of services re-started after change of DoNotPoll attribute";
} }
### Check whether time-out for Read-Back has been provided ### Check whether time-out for Read-Back has been provided