German | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Maschinen per MQTT mit Assets verbindenWenn eine Maschine mit einem Asset verbunden werden soll stehen nun 2 Wege zur Verfügung.
Die Anbindung per MQTT am Beispiel des Lenze x500 ist Thema dieses Artikels. Sie haben bereits ein Gateway welches Sie mit der der Plattform verbinden möchten? Dann schauen Sie bitte hier ob ihr Gerät die Anforderungen erfüllt. Allgemein
Ein MQTT-Telegramm besteht aus ein Topic und eine Nutzlast (Payload). Außerdem benötigt ein Router auch Verbindungsdaten, wie URL, Zugangsdaten um seine Telegramme an einen Broker senden zu können. All diese Infromationen URL, Zugangsdaten, Server-Zertifikat und Topic werden von der Asset Performance Plattform vorgegeben und sind im Router einzustellen.MQTT selbst Die PayloadDie Asset Performance Plattform stellt einen Broker bereit, der nur eine verschlüsselte und authentifizierte Verbindung erlaubt. Die MQTT Protokoll Spezifikation definiert nicht wie die Payload gestalltet sein muss, damit die Systeme sich verstehen. gestaltet sein muss. Diese Lücke füllt die die Sparkplug B Spezifikation für MQTT Nutzdaten.
Der Lenze x500 überträgt seine Daten in der MQTT-Payload Sparkplug - B konform. Die Asset Performance Plattform kann die Nutzlast im Sparkplug B Format einlesen. Ausnahme ist die Formatierung im JSONMit der Einschränkung das die Payload als Klartext JSON formatiert sein muss. Die Verwendung des Google Protocol Buffer Schema, wie in der Spezifikation beschrieben, ist in Vorbereitung. Die Spezifikation zu Sparkplug B ist hier zu finden https://sparkplug.eclipse.org/specification/ Eine Payload nach Sparkplug B format stellt sich wie folgt dar:
Die Keys von oben nach unten sind folgendermaßen zu verstehen:
Payload Beispiel:
Einstellungen in der Asset Performance Plattform
Um eine Verbindung für ein Asset zuerstellen kann über das Connection Icon der Konfigurationsdialog aufgerufen werden. In diesem Dialog kann der Typ der Verbindung ausgewählt werden. Hier muss der Eintrag “x500 per MQTT” gewählt werden. Danach kann die Auswahl mit “Speichern” bestätigt werden, denn weitere Einstellungen sind nicht nötig. Die Verbindungsdaten werden jetzt vom System erzeugt. Diese Verbindungsdaten müssen nun im Router eingestellt werden, was abhängig vom Routerhersteller ist. Im nächsten Abschnitt wird dies für den x500 exemplarisch beschrieben. Neben den Zugangsdaten kann hier das Serverzertifikat heruntergeladen werden. Diese ist nötig, damit der Client die Verbindung überprüfen kann. Diese Verbindungseinstellungen können jederzeit über den gleichen Weg wieder angezeigt werden. Einstellungen im x500 bzw. x4remoteDatentypenliste |
English | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Connect a machine via MQTTIf a machine is to be connected to an asset, there are now 2 options available.
| <value> | optional | Wert des Datenpunkts, sofern ein Wert publiziert werden soll
Info |
---|
Sparkplug is an open-source specification hosted at the Eclipse Foundation that provides MQTT clients the framework to seamlessly integrate data from their applications, sensors, devices, and gateways within the MQTT Infrastructure. You can find the specification here: https://sparkplug.eclipse.org/specification/ |
The Lenze x500 transmits its data Sparkplug B compliant. The Asset Performance Platform can read the payload in Sparkplug B format. With the restriction that the payload must be formatted as plain text JSON. The use of the Google Protocol Buffer Schema, as described in the specification, is in preparation.
A payload in Sparkplug B format is as follows:
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||
---|---|---|
| ||
{
"timestamp": <send timestamp>,
"metrics": [{
"name": <metric_name>,
"alias": <alias>,
"timestamp": <collect timestamp>,
"dataType": <datatype>,
"value": <value>
}],
"seq": <sequence_number>
} |
The keys from top to bottom are to be understood as follows:
Key | Bedeutung | |
---|---|---|
<send timestamp> | mandantory | Timestamp when the telegram was send. |
metrics | mandantory | Array von Datenpunktobjekten. Es können 1..n Datenpunktojekte hier eingefügt werden. |
<metric_name> | mandantory | Name of the datapoint |
<alias> | optional | Alias for the datapoint. |
<collect timestamp> | mandantory | Timestamp when the datapoint was requested/deliverd. |
<datatype> | mandantory | Datatype of the datapoint. You can find a list at the end. |
<value> | optional | Value of the datapoint. If a value shall be published. |
<sequence_number> |
zwingend
Sequenznummer. Fortlaufend steigend.
mandantory | continuous sequence number |
Example payload:
Code Block | ||
---|---|---|
| ||
{ "metrics": [ { "alias": 2, "datatype": 9, "name": "scCloud_rOEErt", "timestamp": 1721829360000, "value": 75.28211975097656 }, { "alias": 11, "datatype": 10, "name": "scCloud_lrQuantityOK", "timestamp": 1721829360000, "value": 3589.0 } ], "seq": 215, "timestamp": 1721829360042 } |
Settings in
der Asset Performance PlattformEinstellungen im x500 bzw. x4remote
Datentypenliste
Comming soon.
the Asset Performance Platform
To create a connection for an asset, the configuration dialog can be called up via the connection icon.
The connection type can be selected in this dialog. The entry “x500 via MQTT” must be selected here.
The selection can then be confirmed with “Save”, as no further settings are required. The connection data is now generated by the system. This connection data must now be set in the router, which depends on the router manufacturer. The next section describes this for the x500 as an example.
In addition to the access data, the server certificate can be downloaded here. This is necessary so that the client can check the connection.
These connection settings can be displayed again at any time in the same way.
Settings in the x500 or x4remote
Data type list
Expand | ||
---|---|---|
| ||
|