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. AllgemeinEin 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. Die 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 gestaltet sein muss. Diese Lücke füllt die die Sparkplug B Spezifikation für MQTT Nutzdaten.
Der Lenze x500 überträgt seine Daten Sparkplug B konform. Die Asset Performance Plattform kann die Nutzlast im Sparkplug B Format einlesen. Mit 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. 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 PlattformUm 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. x4remoteIn Arbeit Datentypenliste |
English | |||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Connect a machine via MQTTIf a machine is to be connected to an asset, there are now 2 options available.
The connection via MQTT using the example of the Lenze x500 is the topic of this article. GeneralAn MQTT telegram consists of a topic and a payload. In addition, a router also requires connection data such as URL and access data in order to be able to send its telegrams to a broker. All this information - URL, access data, server certificate and topic - is specified by the Asset Performance Platform and must be set in the router. The Asset Performance Platform provides a broker that only allows an encrypted and authenticated connection. The MQTT protocol specification does not define how the payload must be designed. This gap is filled by the Sparkplug B specification for MQTT user data.
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:
The keys from top to bottom are to be understood as follows:
Example payload:
Settings in the Asset Performance PlatformTo 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 x4remotecomming soon. Data type list |
...