mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 11:01:59 +00:00
MAXLAN: fix hang after pairing
git-svn-id: https://svn.fhem.de/fhem/trunk@2295 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
faa045abfc
commit
0f7d3b9b3b
@ -553,13 +553,13 @@ MAXLAN_Parse($$)
|
|||||||
}elsif($cmd eq "N"){#New device paired
|
}elsif($cmd eq "N"){#New device paired
|
||||||
if(@args==0){
|
if(@args==0){
|
||||||
$hash->{STATE} = "initalized"; #pairing ended
|
$hash->{STATE} = "initalized"; #pairing ended
|
||||||
return;
|
$hash->{pairmode} = 0;
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
my ($type, $addr, $serial) = unpack("CH6a[10]", decode_base64($args[0]));
|
my ($type, $addr, $serial) = unpack("CH6a[10]", decode_base64($args[0]));
|
||||||
Log 2, "Paired new device, type $device_types{$type}, addr $addr, serial $serial";
|
Log 2, "Paired new device, type $device_types{$type}, addr $addr, serial $serial";
|
||||||
Dispatch($hash, "MAX,define,$addr,$device_types{$type},$serial,0,1", {RAWMSG => $rmsg});
|
Dispatch($hash, "MAX,define,$addr,$device_types{$type},$serial,0,1", {RAWMSG => $rmsg});
|
||||||
|
|
||||||
$hash->{pairmode} = 0;
|
|
||||||
#After a device has been paired, it automatically appears in the "L" and "C" commands,
|
#After a device has been paired, it automatically appears in the "L" and "C" commands,
|
||||||
MAXLAN_RequestConfiguration($hash,$addr);
|
MAXLAN_RequestConfiguration($hash,$addr);
|
||||||
} elsif($cmd eq "A"){#Acknowledged
|
} elsif($cmd eq "A"){#Acknowledged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user