mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
00_MQTT2_SERVER.pm: add clientId (Forum #104687)
git-svn-id: https://svn.fhem.de/fhem/trunk@20401 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f30060a71c
commit
dab59556d8
@ -41,6 +41,7 @@ MQTT2_SERVER_Initialize($)
|
||||
my @attrList = qw(
|
||||
SSL:0,1
|
||||
autocreate:no,simple,complex
|
||||
clientId
|
||||
disable:0,1
|
||||
disabledForIntervals
|
||||
keepaliveFactor
|
||||
@ -453,6 +454,7 @@ MQTT2_SERVER_doPublish($$$$;$)
|
||||
my $ac = AttrVal($serverName, "autocreate", "simple");
|
||||
$ac = $ac eq "1" ? "simple" : ($ac eq "0" ? "no" : $ac); # backward comp.
|
||||
|
||||
$cid = AttrVal($serverName, "clientId", $cid);
|
||||
Dispatch($server, "autocreate=$ac\0$cid\0$tp\0$val", undef, $ac eq "no");
|
||||
my $re = AttrVal($serverName, "rawEvents", undef);
|
||||
DoTrigger($server->{NAME}, "$tp:$val") if($re && $tp =~ m/$re/);
|
||||
@ -615,6 +617,15 @@ MQTT2_SERVER_ReadDebug($$)
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
|
||||
<a name="clientId"></a>
|
||||
<li>clientId <name><br>
|
||||
set the MQTT clientId for all connections, for setups with clients
|
||||
creating a different MQTT-ID for each connection. The autocreate
|
||||
capabilities are greatly reduced in this case, and setting it requires to
|
||||
remove the clientId from all existing MQTT2_DEVICE readingList
|
||||
attributes.
|
||||
</li></br>
|
||||
|
||||
<li><a href="#disable">disable</a><br>
|
||||
<a href="#disabledForIntervals">disabledForIntervals</a><br>
|
||||
disable distribution of messages. The server itself will accept and store
|
||||
|
Loading…
Reference in New Issue
Block a user