mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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
This commit is contained in:
parent
d311677862
commit
534e1156aa
@ -151,6 +151,7 @@ sub HMUARTLGW_Initialize($)
|
|||||||
|
|
||||||
sub HMUARTLGW_SendPendingCmd($);
|
sub HMUARTLGW_SendPendingCmd($);
|
||||||
sub HMUARTLGW_SendCmd($$);
|
sub HMUARTLGW_SendCmd($$);
|
||||||
|
sub HMUARTLGW_GetSetParameterReq($);
|
||||||
sub HMUARTLGW_getAesKeys($);
|
sub HMUARTLGW_getAesKeys($);
|
||||||
sub HMUARTLGW_updateMsgLoad($$);
|
sub HMUARTLGW_updateMsgLoad($$);
|
||||||
sub HMUARTLGW_Read($);
|
sub HMUARTLGW_Read($);
|
||||||
@ -696,6 +697,10 @@ sub HMUARTLGW_GetSetParameterReq($) {
|
|||||||
if ($hash->{DevState} == HMUARTLGW_STATE_SET_HMID) {
|
if ($hash->{DevState} == HMUARTLGW_STATE_SET_HMID) {
|
||||||
my $hmId = AttrVal($name, "hmId", undef);
|
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);
|
HMUARTLGW_send($hash, HMUARTLGW_APP_SET_HMID . $hmId, HMUARTLGW_DST_APP);
|
||||||
|
|
||||||
} elsif ($hash->{DevState} == HMUARTLGW_STATE_GET_HMID) {
|
} elsif ($hash->{DevState} == HMUARTLGW_STATE_GET_HMID) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user