2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-08 05:15:10 +00:00

10_EnOcean: enhance remote management

git-svn-id: https://svn.fhem.de/fhem/trunk@11662 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus-schauer 2016-06-14 04:14:36 +00:00
parent b22542330b
commit f23bcaa347

View File

@ -6240,6 +6240,16 @@ sub EnOcean_Parse($$)
(undef, undef, $rorg, $data, $senderID, $destinationID, $funcNumber, $manufID, $RSSI, $delay) = @msg;
if (exists $modules{EnOcean}{defptr}{$senderID}) {
$hash = $modules{EnOcean}{defptr}{$senderID};
$name = $hash->{NAME};
if (!exists $attr{$name}{remoteID}) {
$attr{$name}{remoteID} = $senderID;
Log3 $name, 2, "EnOcean $name remoteID $senderID assigned";
if (exists($iohash->{helper}{remoteAnswerWait}{hex($funcNumber)}{hash}) &&
$iohash->{helper}{remoteAnswerWait}{hex($funcNumber)}{hash} == $hash) {
delete $iohash->{helper}{remoteAnswerWait}{hex($funcNumber)}{hash};
}
}
} elsif (exists($iohash->{helper}{remoteAnswerWait}{hex($funcNumber)}{hash})) {
# the remoteID is assigned to the requesting device
$hash = $iohash->{helper}{remoteAnswerWait}{hex($funcNumber)}{hash};