MQTT Publisher for SIMATIC CPU
The “Message Queue Telemetry Transport” is a simply structured binary Publish/ Subscribe protocol on TCP/IP level. It is suitable for messaging between devices with minimum functionality and for transmission via unreliable networks with low bandwith and high latency. With these characteristics, MQTT plays a vital role for the IoT and in M2M communication.
The application example provides you with a function block for the SIMATIC CPU. The “LMqtt_Publisher” function block integrates the MQTT client function and allows you to transmit MQTT messages to a broker (publisher role). In this, the communication can be secured via a TLS connection.
The following picture shows the secure mqtt-messaging with a SIMATIC S7-1500.
Advantages of MQTT
The MQTT protocol stands out with the following characteristics:
Light-weight protocol with low transport overhead
Minimum requirement for network bandwith thanks to push mechanism
Function for re-connecting after disconnection
Re-sending messages after disconnection
Mechanism for notifying interested parties after an unpredicted disconnection of a client
Simple use and implementation thanks to a small set of commands
Quality of Service (QoS level) with different reliability levels for the message delivery
Optional encryption of messages via SSL/TLS
Authentification of publishers and subscribers via user name and password
Documentation and project example for an unsecure messaging (S7-1500, S7-1200, S7-300)
Add unsecure variant.