diff --git a/fhem/FHEM/00_MQTT2_CLIENT.pm b/fhem/FHEM/00_MQTT2_CLIENT.pm
index 811371542..c986829b4 100644
--- a/fhem/FHEM/00_MQTT2_CLIENT.pm
+++ b/fhem/FHEM/00_MQTT2_CLIENT.pm
@@ -653,7 +653,7 @@ MQTT2_CLIENT_getStr($$)
=item summary_DE Verbindung zu einem externen MQTT Server
=begin html
-
+
MQTT2_CLIENT
MQTT2_CLIENT is a cleanroom implementation of an MQTT client (which connects
@@ -661,7 +661,7 @@ MQTT2_CLIENT_getStr($$)
an IODev to MQTT2_DEVICES.
-
+
Define
define <name> MQTT2_CLIENT <host>:<port>
@@ -676,7 +676,7 @@ MQTT2_CLIENT_getStr($$)
-
+
Set
- publish -r topic value
@@ -694,15 +694,15 @@ MQTT2_CLIENT_getStr($$)
-
+
Get
-
+
Attributes
-
+
- autocreate [no|simple|complex]
if set to simple/complex, at least one MQTT2_DEVICE will be created, and
its readingsList will be expanded upon reception of published messages.
@@ -720,13 +720,13 @@ MQTT2_CLIENT_getStr($$)
attribute it is not really useful.
-
+
- clientId <name>
set the MQTT clientId. If not set, the name of the MQTT2_CLIENT instance
is used, after deleting everything outside 0-9a-zA-Z
-
+
- clientOrder [MQTT2_DEVICE] [MQTT_GENERIC_BRIDGE]
set the notification order for client modules. This is
relevant when autocreate is active, and the default order
@@ -739,52 +739,52 @@ MQTT2_CLIENT_getStr($$)
disable dispatching of messages.
-
+
- disconnectAfter <seconds>
if set, the connection will be closed after <seconds> of
inactivity, and will be automatically reopened when sending a command.
-
+
- ignoreRegexp
if $topic:$message matches ignoreRegexp, then it will be silently ignored.
-
+
- lwt <topic> <message>
set the LWT (last will and testament) topic and message, default is empty.
-
+
- keepaliveTimeout <seconds;>
number of seconds for sending keepalive messages, 0 disables it.
The broker will disconnect, if there were no messages for
1.5 * keepaliveTimeout seconds.
-
+
- lwtRetain
if set, the lwt retain flag is set
-
+
- mqttVersion 3.1,3.1.1
set the MQTT protocol version in the CONNECT header, default is 3.1
-
+
- msgAfterConnect [-r] topic message
publish the topic after each connect or reconnect.
If the optional -r is specified, then the publish sets the retain flag.
-
+
- msgBeforeDisconnect [-r] topic message
publish the topic bofore each disconnect.
If the optional -r is specified, then the publish sets the retain flag.
-
+
- qosMaxQueueLength <number>
if set to a nonzero value, messages are published with QoS=1, and are
kept in a memory-only buffer until acknowledged by the server.
@@ -792,31 +792,31 @@ MQTT2_CLIENT_getStr($$)
are queued, and resent when the connection is esablished.
-
+
- rawEvents <topic-regexp>
send all messages as events attributed to this MQTT2_CLIENT instance.
Should only be used, if there is no MQTT2_DEVICE to process the topic.
-
+
- subscriptions <subscriptions>
space separated list of MQTT subscriptions, default is #
Note: if the value is the literal setByTheProgram, then the value sent by
the client (e.g. MQTT_GENERIC_BRIDGE) is used.
-
+
- SSL
Enable SSL (i.e. TLS)
-
+
- sslargs
a list of space separated tuples of key:value, where key is one of the
possible options documented in perldoc IO::Socket::SSL
-
+
- username <username>
set the username. The password is set via the set command, and is stored
separately, see above.
diff --git a/fhem/FHEM/00_MQTT2_SERVER.pm b/fhem/FHEM/00_MQTT2_SERVER.pm
index 0716b57c0..cf5f72eb2 100644
--- a/fhem/FHEM/00_MQTT2_SERVER.pm
+++ b/fhem/FHEM/00_MQTT2_SERVER.pm
@@ -613,7 +613,7 @@ MQTT2_SERVER_ReadDebug($$)
=item summary_DE Standalone MQTT message broker
=begin html
-
+
MQTT2_SERVER
MQTT2_SERVER is a builtin/cleanroom implementation of an MQTT server using no
@@ -622,7 +622,7 @@ MQTT2_SERVER_ReadDebug($$)
and performance). It is intended to simplify connecting MQTT devices to FHEM.
-
+
Define
define <name> MQTT2_SERVER <tcp-portnr> [global|IP]
@@ -643,7 +643,7 @@ MQTT2_SERVER_ReadDebug($$)
-
+
Set
- publish -r topic value
@@ -652,15 +652,15 @@ MQTT2_SERVER_ReadDebug($$)
-
+
Get
-
+
Attributes
-
+
- clientId <name>
set the MQTT clientId for all connections, for setups with clients
creating a different MQTT-ID for each connection. The autocreate
@@ -669,7 +669,7 @@ MQTT2_SERVER_ReadDebug($$)
attributes.
-
+
- clientOrder [MQTT2_DEVICE] [MQTT_GENERIC_BRIDGE]
set the notification order for client modules. This is
relevant when autocreate is active, and the default order
@@ -683,12 +683,12 @@ MQTT2_SERVER_ReadDebug($$)
messages, but not forward them.
-
+
- ignoreRegexp
if $topic:$message matches ignoreRegexp, then it will be silently ignored.
-
+
- keepaliveFactor
the oasis spec requires a disconnect, if after 1.5 times the client
supplied keepalive no data or PINGREQ is sent. With this attribute you
@@ -700,13 +700,13 @@ MQTT2_SERVER_ReadDebug($$)
-
+
- rawEvents <topic-regexp>
Send all messages as events attributed to this MQTT2_SERVER instance.
Should only be used, if there is no MQTT2_DEVICE to process the topic.
-
+
- rePublish
if a topic is published from a source inside of FHEM (e.g. MQTT2_DEVICE),
it is only sent to real MQTT clients, and it will not internally
@@ -714,7 +714,7 @@ MQTT2_SERVER_ReadDebug($$)
to the FHEM internal clients.
-
+
- SSL
Enable SSL (i.e. TLS).
@@ -728,7 +728,7 @@ MQTT2_SERVER_ReadDebug($$)
also the SSL attribute.
-
+
- autocreate [no|simple|complex]
MQTT2_DEVICES will be automatically created upon receiving an
unknown message. Set this value to no to disable autocreating, the
diff --git a/fhem/FHEM/10_MQTT2_DEVICE.pm b/fhem/FHEM/10_MQTT2_DEVICE.pm
index e4ffd5517..0f6ac92a2 100644
--- a/fhem/FHEM/10_MQTT2_DEVICE.pm
+++ b/fhem/FHEM/10_MQTT2_DEVICE.pm
@@ -885,7 +885,7 @@ zigbee2mqtt_devStateIcon255($;$$)
=item summary_DE über den MQTT2_SERVER oder MQTT2_CLIENT kommunizierende Geräte
=begin html
-
+
MQTT2_DEVICE
MQTT2_DEVICE is used to represent single devices connected to the
@@ -893,7 +893,7 @@ zigbee2mqtt_devStateIcon255($;$$)
connecting MQTT devices to FHEM.
-
+
Define
define <name> MQTT2_DEVICE
@@ -903,32 +903,32 @@ zigbee2mqtt_devStateIcon255($;$$)
-
+
Set
see the setList attribute documentation below.
-
+
Get
see the getList attribute documentation below.
-
+
Attributes
-
+
- autocreate {0|1}
if set to 0, disables extending the readingList, when the IODev
autocreate is also set. Default is 1, i.e. new topics will be
automatically added to the readingList.
-
+
- bridgeRegexp <regexp> newClientId ...
Used to automatically redirect some types of topics to different
MQTT2_DEVICE instances. The regexp is checked against the
@@ -958,14 +958,14 @@ zigbee2mqtt_devStateIcon255($;$$)
-
+
- devicetopic value
replace $DEVICETOPIC in the topic part of readingList, setList and
getList with value. if not set, $DEVICETOPIC will be replaced with the
name of the device.
-
+
- devPos value
used internally by the "Show neighbor map" visualizer in FHEMWEB.
This function is active if the graphviz and devices readings are set,
@@ -975,7 +975,7 @@ zigbee2mqtt_devStateIcon255($;$$)
- disable
disabledForIntervals
-
+
- getList cmd reading [topic|perl-Expression] ...
When the FHEM command cmd is issued, publish the topic (and optional
message, which is separated by space from the topic), wait for the answer
@@ -1006,13 +1006,13 @@ zigbee2mqtt_devStateIcon255($;$$)
-
+
- imageLink href
sets the image to be shown. The "Show neighbor map" function initializes
the value automatically.
-
+
- jsonMap oldReading1:newReading1 oldReading2:newReading2...
space or newline separated list of oldReading:newReading pairs.
Used in the automatically generated readingList json2nameValue function
@@ -1025,7 +1025,7 @@ zigbee2mqtt_devStateIcon255($;$$)
oldReading.
-
+
- periodicCmd <cmd1>:<period1> <cmd2>:<period2>...
periodically execute the get or set command. The command will not take
@@ -1033,7 +1033,7 @@ zigbee2mqtt_devStateIcon255($;$$)
period is measured in minutes, and it must be an integer.
-
+
- readingList <regexp> [readingName|perl-Expression] ...
If the regexp matches topic:message or cid:topic:message either set
@@ -1070,11 +1070,12 @@ zigbee2mqtt_devStateIcon255($;$$)
- - setExtensionsEvent
+
+ - setExtensionsEvent
If set, the event will contain the command implemented by SetExtensions
(e.g. on-for-timer 10), else the executed command (e.g. on).
-
+
- setList cmd [topic|perl-Expression] ...
When the FHEM command cmd is issued, publish the topic.
Multiple tuples can be specified, each of them separated by newline, the
@@ -1102,7 +1103,7 @@ zigbee2mqtt_devStateIcon255($;$$)
-
+
setStateList command command ...
This attribute is used to get more detailed feedback when switching
devices. I.e. when the command on is contained in the list, state will
diff --git a/fhem/contrib/commandref_static.pl b/fhem/contrib/commandref_static.pl
index 4b6762c2f..c2d93423a 100755
--- a/fhem/contrib/commandref_static.pl
+++ b/fhem/contrib/commandref_static.pl
@@ -98,6 +98,8 @@ for my $lang (@lang) {
$modData{$mName}{$1} =$2 if($l =~ m/^=item\s+(summary[^ ]*)\s(.*)$/);
$modData{$mName}{modLinks}{$1} = 1
if($l =~ m//);
+ $modData{$mName}{modLinks}{$1} = 1
+ if($l =~ m//);
}
$modData{$mName}{modLangs} = join(",", @lang);
close(FH);
diff --git a/fhem/contrib/pre-commit b/fhem/contrib/pre-commit
index 1a19f5250..f6fe8354a 100755
--- a/fhem/contrib/pre-commit
+++ b/fhem/contrib/pre-commit
@@ -137,6 +137,7 @@ foreach my $row (split("\n", $fList)) {
} elsif(!$skip) {
$docCount++;
$hasLink = ($l =~ m/]+)>/i) {
diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js
index e83ed1afb..98f4613ac 100644
--- a/fhem/www/pgm2/fhemweb.js
+++ b/fhem/www/pgm2/fhemweb.js
@@ -307,26 +307,35 @@ FW_jqueryReadyFn()
if(!m)
return;
$("#devSpecHelp").remove();
- var sel = this;
- FW_getHelp(m[2], function(data) { // show either the next or the outer li
+ var sel=this, devName=m[2], selType=m[1];
+ FW_getHelp(devName, function(data) { // show either the next or the outer li
$("#content")
.append("");
$("#content > #workbench").html(data);
- var mtype = $("#content > #workbench a[name]").attr("name"), aTag;
- if(mtype) {
- var mv = (""+mtype+val).replace(/[^a-z0-9_]/ig,'_');
- aTag = $("#content > #workbench").find("a[name="+mv+"]");
+
+ var mtype = $("#content > #workbench a[id]").attr("id"), aTag;
+ if(!mtype)
+ mtype = $("#content > #workbench a[name]").attr("name"), aTag;
+
+ if(mtype) { // old style #1 syntax: MODULETYPEattrname
+ var mv = (""+mtype+"-"+selType+"-"+val).replace(/[^a-z0-9_-]/ig,'_');
+ aTag = $("#content > #workbench").find("a[id="+mv+"]");
+ if(!$(aTag).length) {
+ mv = (""+mtype+val).replace(/[^a-z0-9_]/ig,'_');
+ aTag = $("#content > #workbench").find("a[name="+mv+"]");
+ }
}
- if(!$(aTag).length) { // old style syntax without type
+ if(!$(aTag).length) { // old style #2 syntax without type
var v = (val).replace(/[^a-z0-9_]/ig,'_');
aTag = $("#content > #workbench").find("a[name="+v+"]");
}
+
if($(aTag).length) {
var liTag = $(aTag).next("li");
if(!$(liTag).length)
liTag = $(aTag).parent("li");
if($(liTag).length) {
- $(sel).closest("div[cmd='"+m[1]+"']")
+ $(sel).closest("div[cmd='"+selType+"']")
.after('')
$("#devSpecHelp").html($(liTag).html());
}