From 7c2095db997e3a361b7b71dcac2d069a6000cd81 Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Sun, 25 Nov 2012 09:51:02 +0000 Subject: [PATCH] MAX: clear Error on reconnect git-svn-id: https://svn.fhem.de/fhem/trunk@2187 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_MAXLAN.pm | 3 +++ fhem/FHEM/10_MAX.pm | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/00_MAXLAN.pm b/fhem/FHEM/00_MAXLAN.pm index 7b8780805..caca3c152 100755 --- a/fhem/FHEM/00_MAXLAN.pm +++ b/fhem/FHEM/00_MAXLAN.pm @@ -462,6 +462,9 @@ MAXLAN_Parse($$) Log 2, "Got configdata for unimplemented devicetype $devicetype"; } + #Clear Error + Dispatch($hash, "MAX,Error,$addr", {RAWMSG => $rmsg}); + #Check if it is already recorded in devices my $found = 0; foreach (@{$hash->{devices}}) { diff --git a/fhem/FHEM/10_MAX.pm b/fhem/FHEM/10_MAX.pm index 1a192a025..b5a4d7a14 100755 --- a/fhem/FHEM/10_MAX.pm +++ b/fhem/FHEM/10_MAX.pm @@ -302,7 +302,11 @@ MAX_Parse($$) $shash->{windowOpenDuration} = $args[8]; } elsif($msgtype eq "Error") { - $shash->{ERROR} = join(",",$args[0]); + if(@args == 0) { + delete $shash->{ERROR} if(exists($shash->{ERROR})); + } else { + $shash->{ERROR} = join(",",$args[0]); + } } else { Log 1, "MAX_Parse: Unknown message $msgtype";