From 534e1156aadab6084f1119c2530eaae5af68e30a Mon Sep 17 00:00:00 2001 From: mgernoth <> Date: Sun, 24 Jul 2016 14:45:34 +0000 Subject: [PATCH] 00_HMUARTLGW.pm: gracefully handle an unset hmId (use id of io) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11844 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_HMUARTLGW.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FHEM/00_HMUARTLGW.pm b/FHEM/00_HMUARTLGW.pm index d7e7a15de..3496575a7 100644 --- a/FHEM/00_HMUARTLGW.pm +++ b/FHEM/00_HMUARTLGW.pm @@ -151,6 +151,7 @@ sub HMUARTLGW_Initialize($) sub HMUARTLGW_SendPendingCmd($); sub HMUARTLGW_SendCmd($$); +sub HMUARTLGW_GetSetParameterReq($); sub HMUARTLGW_getAesKeys($); sub HMUARTLGW_updateMsgLoad($$); sub HMUARTLGW_Read($); @@ -696,6 +697,10 @@ sub HMUARTLGW_GetSetParameterReq($) { if ($hash->{DevState} == HMUARTLGW_STATE_SET_HMID) { my $hmId = AttrVal($name, "hmId", undef); + if (!defined($hmId)) { + $hash->{DevState} = HMUARTLGW_STATE_GET_HMID; + return HMUARTLGW_GetSetParameterReq($hash); + } HMUARTLGW_send($hash, HMUARTLGW_APP_SET_HMID . $hmId, HMUARTLGW_DST_APP); } elsif ($hash->{DevState} == HMUARTLGW_STATE_GET_HMID) {