Skip to content

MQTT Client

The MQTT protocol is intended primarily for the exchange of data between Internet of Things devices and servers and client devices, eg smartphones.

Its main advantage is maintaining a two-way connection, thanks to which it is possible to easily control a device located in the local network from a smartphone in the operator's local network.

Elements of page

MQTT Client

  1. Connection status with the MQTT server.
  2. A part of MAC address of the device that the client uses as a clientID when connecting to the server.
  3. Connection configuration form.
    • Enabling the MQTT client.
    • Enable user/password authentication.
    • Use TLS.
    • Use LWT (to publish connection state on [Topic prefix]/connected topic, 1 - connected, 0 - disconnected).
    • Send by modem instead of Ethernet connection (option available only with LTE module).
    • The server address can be given as the IP address or the host name.
    • The communication port, used by default for connections without encryption, is 1883.
    • Login/username used for authentication.
    • Password used for authentication.
    • Prefix is ​​a base part of the topics used by LK. All sending topics and subscription topic begin with the prefix.
    • Sending period, that is period of time between consequent send of selected data.
    • The keep-alive parameter.
    • Selection of readings to be sent cyclically (mark desired).
  4. Buttons for saving settings and a link to mqtt.ats.pl, which allows you to use the MQTT client. The page contains an MQTT client configuration form on the device, with the following fields:

mqtt.ats.pl service

The service mqtt.ats.pl is free and allows you to connect up to 5 devices.

Data from connected devices are archived and available for viewing on charts.

It is also possible to define events similar to those in Events tab, with conditions that can include multiple devices - an event on one can be used to control others.

Using the MQTT WebSocket client available on the website, you can remotely control your devices. There is also a mobile application that allows you to view readings and control devices.

Instructions for connecting tcPDU with the server can be found in the mqtt.ats.pl documentation.

MQTT commands

The method of sending commands via MQTT and the available commands are described in the Commands section.