MAX: clear Error on reconnect

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2187 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2012-11-25 09:51:02 +00:00
parent 9a5f7c22e6
commit 0f65472bd3
2 changed files with 8 additions and 1 deletions

View File

@ -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}}) {

View File

@ -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";