2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 07:56:03 +00:00

00_MQTT2_CLIENT.pm: add connectTimeout attrobute (Forum #120685)

git-svn-id: https://svn.fhem.de/fhem/trunk@24349 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-04-28 15:13:33 +00:00
parent 9c4280a19f
commit b25ea1bdf1

View File

@ -35,6 +35,7 @@ MQTT2_CLIENT_Initialize($)
autocreate:no,simple,complex
clientId
clientOrder
connectTimeout
disable:1,0
disabledForIntervals
disconnectAfter
@ -294,6 +295,11 @@ MQTT2_CLIENT_Attr(@)
$hash->{clientId} = $param[0] if($type eq "set");
}
if($attrName eq "connectTimeout") {
delete($hash->{TIMEOUT});
$hash->{TIMEOUT} = $param[0] if($type eq "set");
}
if($attrName eq "sslargs") {
$hash->{sslargs} = {};
for my $kv (split(" ",$param[0])) {
@ -734,6 +740,12 @@ MQTT2_CLIENT_getStr($$)
Note: Changing the attribute affects _all_ MQTT2_CLIENT instances.
</li></br>
<a id="MQTT2_CLIENT-attr-connectTimeout"></a>
<li>connectTimeout &lt;seconds&gt;<br>
change the HTTP connect timeout, default is 4 seconds. This seems to be
necessary for some MQTT servers in robotic vacuum cleaners.
</li></br>
<li><a href="#disable">disable</a><br>
<a href="#disabledForIntervals">disabledForIntervals</a><br>
disable dispatching of messages.