From f2b7042f70dfd90f9ea7db44538c5b34ac3e9e28 Mon Sep 17 00:00:00 2001 From: mgehre Date: Fri, 23 Nov 2012 07:32:08 +0000 Subject: [PATCH] MAX: check for updated L: response after s: command git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2160 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_MAXLAN.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FHEM/00_MAXLAN.pm b/FHEM/00_MAXLAN.pm index 9de69803a..fb0010ad5 100755 --- a/FHEM/00_MAXLAN.pm +++ b/FHEM/00_MAXLAN.pm @@ -34,6 +34,9 @@ my @boost_durations = (0, 5, 10, 15, 20, 25, 30, 60); #Time after which we reconnect after a failed connection attempt my $reconnect_interval = 5; #seconds +#the time it takes after sending one command till we see its effect in the L: response +my $roundtriptime = 3; #seconds + my $metadata_magic = 0x56; my $metadata_version = 2; @@ -642,6 +645,8 @@ MAXLAN_SendDeviceCmd($$) { my ($hash,$payload) = @_; MAXLAN_Write($hash,"s:".encode_base64($payload,"")); + RemoveInternalTimer($hash); + InternalTimer(gettimeofday()+$roundtriptime, "MAXLAN_Poll", $hash, 0); return MAXLAN_ExpectAnswer($hash, "S:"); }