2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

00_HMUARTLGW.pm: don't try to send when device is not initialized

git-svn-id: https://svn.fhem.de/fhem/trunk@12664 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgernoth 2016-11-26 19:48:44 +00:00
parent 3aea167a1c
commit dce548dfe4

View File

@ -1481,6 +1481,13 @@ sub HMUARTLGW_Write($$$)
substr($msg, 10, 6),
substr($msg, 16, 6));
if (!defined($hash->{owner}) ||
!defined($hash->{Helper}{FW})) {
Log3($hash, 1, "HMUARTLGW ${name}: Device not initialized (state: $hash->{DevState}, " .
ReadingsVal($name, "cond", "").") but asked to send data. Dropping: ${msg}");
return;
}
if ($mtype eq "02" && $src eq $hash->{owner} && length($msg) == 24 &&
defined($hash->{Peers}{$dst})) {
# Acks are generally send by HMUARTLGW autonomously