2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 09:55:38 +00:00

LandroidUtils.pm: small fixes (Forum #111959)

git-svn-id: https://svn.fhem.de/fhem/trunk@27439 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2023-04-13 08:07:55 +00:00
parent 245751f31c
commit 0a6bba3dea

View File

@ -190,7 +190,8 @@ Landroid_connect3($)
if($readingName eq "mqtt_topics_command_out") {
push @subs, $val;
$attr{$m2d->{NAME}}{readingList}="$val:.* {json2nameValue(\$EVENT)}"
if(!$attr{$m2d->{NAME}}{readingList} && $m2c->{autocreate});
if($m2c->{autocreate} &&
!AttrVal($m2d->{NAME}, "readingList", undef));
}
$m2c->{mqttEndpoint} = $val if($readingName eq "mqtt_endpoint");
}
@ -230,9 +231,9 @@ Landroid_connect4($)
$m2c->{clientId} = "$prefix/USER/$m2c->{userId}/FHEM/$wxid";
my $a = $attr{$m2c_name};
$a->{keepaliveTimeout} = 600;
$a->{maxFailedConnects} = 20;
$a->{nextOpenDelay} = 180;
$a->{keepaliveTimeout} = 600 if(!AttrVal($m2c_name, "keepaliveTimeout",0));
$a->{maxFailedConnects} = 20 if(!AttrVal($m2c_name, "maxFailedConnects", 0));
$a->{nextOpenDelay} = 180 if(!AttrVal($m2c_name, "nextOpenDelay", 0));
MQTT2_CLIENT_Disco($m2c, 1); # Make sure reconnect will work
MQTT2_CLIENT_connect($m2c, 1);
}