Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

ParameterDescriptionUnit / sizeDefault value

Kotva
fd
fd
Full Debug

Activates detailed debug information about sending and receiving values.YES/NONO

Kotva
mv
mv
MQTT Version

The version of the MQTT protocol that will be used to connect to the MQTT server. It is possible to use the older MQTT 3.1.1 standard (October 2014) or the newer MQTT 5.0 standard (March 2019). MQTT brokers usually support both standards, the older standard is simpler and more economical.

MQTT 3.1.1

MQTT 5.0

MQTT 3.1.1
Kotva
un
un
User Name
User name used in a CONNECT message to connect to the MQTT server.-
Kotva
pw
pw
Password
Password used in a CONNECT message to connect to the MQTT server.-
Kotva
tc
tc
Topic Filter
The name of one topic or a multiple-topic filter sent within the SUBSCRIBE message. Using the filter the MQTT client specifies topics, within which it wants to receive messages.
Note: topics are hierarchically sorted, a slash (/) is used as the separator, a plus (+) is used as a one-level mask, a hash (#) character is used as a mask for multiple levels.
Examples of filter: a/b , level1/+ , # , +/+/+/up
Note: the change of the Topic Filter parameter will be reflected after restarting the communication - e.g. due to the breakdown of the TCP connection, as long as all stations on the line are switched off (StOff) and switched on again, or after a restart of the KOM process. In the first two cases, the message UNSUBSCRIBE is sent to the original Topic Filter and then SUBSCRIBE to the new Topic Filter (this can be important in so-called persistent sessions when the Client ID parameter is specified and the MQTT server remembers the state of the client even after the TCP connection is broken).
Note: for Payload Type = Sparkplug Host, the filter spBv1.0/# is sufficient to receive all Sparkplug messages.
Note: for Payload Type = Sparkplug Edge Node, a SUBSCRIBE message is automatically sent to all NCMD/DCMD topics derived from the addresses of Edge Node/Device stations configured on the link.

Example:

  • for an Edge Node station with the address myGroup/myEdgeNode, a SUBSCRIBE message is sent to the topic spBv1.0/myGroup/NCMD/myEdgeNode
  • for a Device station with the address myGroup/myEdgeNode/myDevice1, a SUBSCRIBE message is sent to the topic spBv1.0/myGroup/DCMD/myEdgeNode/myDevice1

Note: Payload Type = Sparkplug Edge Node, a SUBSCRIBE message is automatically sent to the topic spBv1.0/STATE/<primaryHostApplication> if the Sparkplug Host ID parameter is specified (<primaryHostApplication> is the value of this parameter), so that the D2000 KOM process is informed about the connection/disconnection of the Primary Host Application. If a STATE message about the Primary Host Application disconnection is received (STATE message with online=false) and multiple IP addresses are specified in the line configuration, the D2000 KOM process disconnects from the current MQTT server and tries other MQTT servers until it finds one to which the Primary Host Application is connected (STATE message with online=true).

-#

Kotva
sq
sq
Subscribe QoS

The desired maximum level of validation (QoS) sent within the SUBSCRIBE message.
The MQTT server can then send PUBLISH messages with such or lower levels of confirmation (but not higher). PUBLISH messages sent by the MQTT server will be confirmed by the D2000 KOM process according to the level of confirmation specified in them. The higher the level of confirmation, the more messages between the client and the server are exchanged (1 at QoS_0, 2 at QoS_1, and 4 at QoS_2).
QoS_0
QoS_1
QoS_2
QoS_1
Kotva
ci
ci
Client ID

Unique client identifier (Client Identifier) sent within the CONNECT message.
Note: it is possible to enter a blank string - in which case the server can assign a unique name to the client (if it supports such functionality) or return an error. However, if the Client ID is not specified, the Clean Session Flag parameter settings will be ignored (as the server will assign a unique name each time).

The tested MQTT server (thethings.network) returned an error if the Client ID was blank and Clean Session Flag=NO.

Note: Some MQTT brokers (PIXII.COM, Eclipse Mosquitto) identified clients only by Client ID. In practice, this meant that two different D2000 systems that connected to the same broker were considered as one client, and the broker closed an existing connection that it considered old when a new connection was established, or it did not allow a new connection to be created and returned the error Connection Refused, identifier rejected (2).
After setting the Client ID to a unique value, the communications started to work without connection breakdowns.

-D2000kom
Kotva
cs
cs
Clean Session Flag

Parameter Clean Session Flag of the CONNECT message. The NO value means that the server uses the current session state (connection) - e. g. after the collapse and recovery of the TCP connection. This means that all unconfirmed PUBLISH messages with QoS_1 and QoS_2 are resent (optionally also QoS_0, depending on the implementation).
The YES value means that the session is re-created, and unconfirmed PUBLISH messages are not repeated.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored, and Clean Session Flag is set to YES (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored, and Clean Session Flag is set to YES (see the description of the Sparkplug Host ID parameter).

YES/NONO

Kotva
pq
pq
Publish QoS

Level of confirmation (QoS) used to send PUBLISH messages through the D2000 KOM process.
Sending the PUBLISH message is the outcome of writing into the output tag with the OUT_VALUE address. The higher the confirmation level, the more messages between the client and server are exchanged (1 for QoS_0, 2 for QoS_1, and 4 for QoS_2).
QoS_0
QoS_1
QoS_2
QoS_0

Kotva
pr
pr
Publish Retain

Setting the Retain flag used when sending PUBLISH messages by the D2000 KOM process. Activating the Retain flag causes the last message sent by the D2000 KOM process to be available on the MQTT server to other clients immediately after they are connected, as well as after the D2000 KOM process is disconnected.YES/NONO

Kotva
ka
ka
Keep Alive

Parameter Keep Alive sent as part of a CONNECT message.
If it is non-zero, it indicates the interval in seconds in which the client must send a message (if it does not send it, the MQTT broker can disconnect the client). If it has no data to send, it will at least send a PING request. A zero value means that the MQTT broker does not require periodic messaging.

The recommended Keep Alive value is several minutes.

The D2000 KOM process sends PING requests according to the settings of the Keep Alive and Ping Interval parameters (whichever interval expires first).

0-65535 sec0

Kotva
pi
pi
Ping Interval

If the MQTT server did not send any message during the specified time interval, the D2000 KOM process sends a PING request and waits for a PING response (until time Reply Timeout).

A value of 0 turns off sending the PING request messages. The parameter allows detection of TCP connection failure.

0-3600 sec60

Kotva
pt
pt
Payload Type

The setting of message parsing:

  • Text only - the message is not parsed, it is assigned to the I/O tag with the address IN_TOPIC
  • JSON - the message is parsed as JSON data. If there is an I/O tag with the address IN_TOPIC, the whole message will be assigned to it.
    If there are I/O tags with addresses JA=json_address, they will be populated with the appropriate data from the JSON message. If no such addresses exist in the message, the I/O tags will be invalidated.
  • Sparkplug Host - the message is parsed as Sparkplug B payload (binary coded), The D2000 KOM process behaves as a Host Application (data consumer).
  • Sparkplug Edge Node- the message is parsed as Sparkplug B payload (binary coded), The D2000 KOM process behaves as an Edge Node (data producer).

Text only

JSON

Sparkplug Host

Sparkplug Edge Node

Text only

Kotva
tf
tf
Time Field Name

If Payload Type=JSON, the name of the field with a timestamp. If the field name is not specified or the field is not found, the current time is assigned to the values.
For more information on the field name format, see  I/O tags with addresses JA=json_address.
--
Kotva
tm
tm
Time Mask
Mask for parsing a value in the field with a timestamp. Special masks are:
  • UNIX - the numeric value represents the number of seconds from epoch 00:00:00 01.01.1970 UTC.
  • UNIXMS - the numeric value represents the number of milliseconds from epoch 00:00:00.000 01.01.1970 UTC.

Note: Whether the time is interpreted as local or UTC with a configured offset depends on the time station parameters settings.

-yyyy-mm-dd hh:mi:ss.mss

Kotva
imt
imt
Ignore Missing Time

Ignoring a missing timestamp - if it is not present in the JSON payload, no warning will be issued.YES/NONO

Kotva
wf
wf
Will Flag

Parameter Will Flag of a CONNECT message. A value of Yes means that the server will send a Last Will message to interested parties if the connection to the D2000 KOM process is lost.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored and Last Will will be sent (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored and Last Will will be sent (see the description of the Sparkplug Host ID parameter).
YES/NONO

Kotva
wq
wq
Will QoS

The acknowledgment level (QoS) used when sending a Last Will message in the event of a loss of connection to the D2000 KOM process.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored, and QoS_1 level will be set (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored, and QoS_1 level will be set (see the description of the Sparkplug Host ID parameter).
QoS_0
QoS_1
QoS_2
QoS_0

Kotva
wr
wr
Will Retain

The setting of the Retain flag used when sending a Last Will message if the connection to the D2000 KOM process is lost.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored and Retain is set to YES (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored and Retain is set to NO (see the description of the Sparkplug Host ID parameter).
YES/NONO

Kotva
wtp
wtp
Will Topic

The topic used to send the Last Will message if the connection to the D2000 KOM process is lost.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored, and Topic is set according to the Sparkplug standard (see the description of the Sparkplug Host ID parameter).
-

Kotva
wm
wm
Will Message

Contents of the Last Will report if the connection to the D2000 KOM process is lost.
Note: If Payload Type = Sparkplug Host and the Sparkplug Host ID parameter is not empty, this parameter is ignored (see the description of the Sparkplug Host ID parameter).
Note: If Payload Type = Sparkplug Edge Node, this parameter is ignored, and Last Will is set according to the Sparkplug standard (see the description of the Sparkplug Host ID parameter).
-
Kotva
rt
rt
Reply Timeout

If the MQTT server does not respond to the SUBSCRIBE, UNSUBSCRIBE, and PING requests within the required time or the D2000 KOM process fails to read a complete message (and only part of it is read), the D2000 KOM process declares an error, closes the connection, and opens it again. Value 0 turns off the timeout.
The parameter enables the handling of problematic behavior of the MQTT server.

sec20
Kotva
wt
wt
Wait Timeout

A timeout of a single reading from a TCP connection. D2000 KOM repeats reading of spontaneous data Max. Wait Retry times and if no data is read, the reading is timeouted and finished (and may be followed by a further reading or writing). By lowering Wait Timeout and Max. Wait Retry parameters, it is possible to achieve a faster writing response of the D2000 KOM process at the expense of a higher CPU load when the MQTT server has no data.
Note: if a lot of messages come from the MQTT server and the D2000 KOM also needs to write values, we recommend setting a lower parameter value (e.g. 0.005 sec) so that writing is not blocked by reading (in any case, after 10 received messages, there is an interruption during which the accumulated writes can be performed).

sec0.100
Kotva
mwr
mwr
Max. Wait Retry
The number of repetitions of reading from the TCP connection. See the description of the Wait Timeout parameter.-3

Kotva
pe
pe
Payload Encoding

Payload field encoding. The MQTT protocol does not specify the content of the Payload field; the ISO-8859-1 standard encoding is suitable for both text and binary content, and UTF-8 is suitable if UTF-8 encoded texts are transmitted. Currently supported encodings are:

  • UTF-8

  • ISO-8859-1

  • Windows-1250

-

ISO-8859-1

MQTT 5.0 Parameters

Kotva
tam
tam
Topic Alias Maximum

Number of Topic Aliases that can be sent by the MQTT broker (parameter is sent in the CONNECT message). The value 0 (default) means that Topic Aliases are not used. The parameter is used only for MQTT Version = MQTT 5.0.

Topic Aliases are numeric identifiers from the interval <1 ... Topic Alias ​​Maximum>, which are sent by the D2000 KOM and the MQTT Broker instead of text identifiers.

Note: In the CONNACK message (response to CONNECT), the MQTT broker optionally sends its value "Topic Alias ​​Maximum", which has the meaning of the number of Topic Aliases that can be sent by the D2000 KOM process (e.g. test.mosquitto.org sends the value 10). D2000 KOM uses Topic Aliases only if the value of its configuration parameter Topic Alias ​​Maximum is non-zero.
Note: Topic Aliases are sent by the D2000 KOM process only when writing values ​​(NDATA/DDATA/NCMD/DCMD), it does not use them for NBIRT/DBIRTH/NDEATH/DDEATH messages (within MQTT Sparkplug) due to alias saving.

00 - 65535

Sparkplug parameters

Kotva
rot
rot
Reorder Timeout

If Payload Type = Sparkplug Host: Timeout (in seconds) for the arrival of a missing NDATA/DDATA message(s). NDATA/DDATA messages contain a sequence number (0..255), while the NBIRTH message contains a sequence number of 0 (resets the sequence). If the D2000 KOM detects a gap in the sequence and the missing message(s) do not arrive within the Reorder Timeout, it sends an NCMD command with the metric 'Node Control/Rebirth' to the corresponding station, which causes the corresponding Edge Node to send an NBIRTH message (and DBIRTH messages for all its Devices). This parameter is implemented on the recommendation of the Sparkplug specification.
Note: Setting Reorder Timeout=0.000 disables missing message detection.

05.0000-59.999

Kotva
rum
rum
Report Unknown Metrics

The parameter activates listings of unknown metrics and topics that do not have their own stations, but end up at a station with the address ".*" (if there is any). The listings will be in the line log as error messages even if the debug on the line is turned off (to facilitate the addition of I/O tags).

YES/NONO

Kotva
nt
nt
Nonstandard Topic

Activation of parsing of non-standard SparkPlug topics (if Payload Type = Sparkplug Host).
The standard topic has the form 'namespace/group_id/message_type/edge_node_id/[device_id]' e.g. 'spBv1.0/Owner/DDATA/devicebase1/local_inputs'.
A non-standard topic has several levels instead of group_id, e.g., 'spBv1.0/Basel/Packaging/DDATA/Falcon11/plannedProductionQuantity'.
Note: writing to I/O tags on stations with a non-standard SparkPlug topic is not supported.

YES/NONO

Kotva
iuq
iuq
Ignore Unknown Quality

Within the metric, it is possible to define a property called Quality of type Int32. According to the Sparkplug standard, it must be one of the values ​​0=BAD, 192=GOOD, 500=STALE. Any other D2000 Kom process reports as an error. The Ignore Unknown Quality parameter can be used to suppress this error message.

YES/NONO

Kotva
bdm
bdm
Browse Dataset Mode

The parameter specifies which addresses of the Dataset metric are displayed when browsing:

  • Columns only: one address is displayed for each dataset column (e.g. Dataset[*]^ColA)
  • Items only: the address of each item is displayed (e.g. Dataset[1]^ColA, Dataset[2]^ColA, ...)
  • Columns + Items: addresses for both columns and items are displayed
-
Columns only

Kotva
is
is
Item Separator

Separator of individual levels in Templates used when entering the address of the I/O tag in Sparkplug mode.
The default value is "->", so the address of the I/O tag can be e.g. SA=Template1->SubTemplate2->Item. If the template name contains the pair "->", it is possible to replace this separator (e.g. "=>").


->

Kotva
hi
hi
Sparkplug Host ID

If Payload Type = Sparkplug Host:

Identifier of Host Application (D2000 is a Host Application). 
If specified, the D2000 KOM process will send a STATE message (with online=true) according to the MQTT Sparkplug standard after connecting to the MQTT server. This message announces that it is alive (equivalent to the NBIRTH and DBIRTH messages sent by Edge Nodes and Devices). At the same time, it sets the Will Topic/Will Message in the CONNECT message according to the Sparkplug standard (STATE message with online=false), with Will QoS=QoS_1, Will Retain=YES, Clean Session Flag=YES.
If the identifier is not specified, the D2000 KOM does not send the STATE message (and the Will parameters are configurable).
According to the MQTT Sparkplug standard, the identifier is mandatory for theSparkplug Host mode (without specifying it, the D2000 KOM process pretends to be an "anonymous" client and does not send a STATE message)..

If Payload Type = Sparkplug Edge Node:

Identifier of Primary Host Application (Identifier of the Host Application that is defined as primary - the most important - for this Edge Node).
If the identifier is specified, the D2000 KOM process waits for a STATE message after connecting to the MQTT server. When it is received and contains online=true, it sends an NBIRTH message with definitions and values ​​of all output I/O tags of the station corresponding to the Edge Node and optionally DBIRTH messages for stations corresponding to Device/Sensor devices (if such stations are configured). If the STATE message contains online=false (i.e., the Primary Host Application is not connected to the MQTT server), the D2000 KOM disconnects from the MQTT server and tries another MQTT server according to the communication link configuration, provided that multiple MQTT servers are configured. If a single MQTT server is configured, the D2000 KOM waits to receive a STATE message with online=true from the Primary Host Application and only then starts sending NBIRTH/DBIRTH/NDATA/DDATA messages.
If the identifier is not specified, the D2000 KOM process sends NBIRTH and possibly DBIRTH messages immediately after connecting to the MQTT server (and subsequently sends NDATA/DDATA messages with value changes).
According to the MQTT Sparkplug standard, the specification of the Primary Host Application is optional for theSparkplug Edge Node mode.
Note: Regardless of the value of the Sparkplug Host ID parameter, the D2000 KOM sets the Will Topic/Will Message in the CONNECT message according to the Sparkplug standard, with Will QoS=QoS_1, Will Retain=NO, Clean Session Flag=YES.

--

Kotva
sfl
sfl
Store & Forward

If Payload Type = Sparkplug Edge Node, the parameter enables Store & Forward functionality for all stations on the line. If communication is down, values ​​are stored in memory and sent with the is_historical flag when communication is restored.
Note: this setting can be changed for individual stations using the Store & Forward station parameter.

YES/NONO

Kotva
ctt
ctt
Convert Datatype/Timestamp to Text

Adding a textual representation of the value type (e.g. Int32) and a timestamp to the text I/O tag with IN_SP2JS address used to convert the Sparkplug payload to JSON for optional parsing in an ESL script.

YES/NONO

...