Skip to main content
What is MQTT?
  • MQTT is a lightweight real-time messaging protocol that lets connected devices (clients) send data to a central server (broker) and receive updates immediately.
  • Access control can be added on the central server (broker) for security reasons, so devices (clients) must be authenticated before they can connect.
  • For more details about MQTT, please refer to MQTT Protocol.

How to Connect MQTT Clients via Authentication

Tier0 offers an embedded MQTT broker that allows third-party clients to connect and publish data to/subscribe to data from UNS.

  1. Log in to Tier0, select Connectivity.
IndexItemDescription
1Broker InfoDisplays the connection information of the internal MQTT broker.
2Current Online ConnectionsDisplays the number of current online connections to the internal MQTT broker.
3Client ListDisplays the list of connected clients and authentication.
  1. Click Auth.

  2. Click Create Auth, enter the description, and then click Create.

info
  • Make a note of the generated Client ID, Username, and Password. You will need them to configure the MQTT client.
  • The following clients are used as examples to show how to use the authentication to connect to the internal MQTT broker.
  1. Install an MQTT client, such as MQTTX, MQTT Explorer and others.
  2. Add a new connection in the MQTT client with the authentication information from Tier0.
  1. Add a new connection in MQTTX with the authentication information from Tier0.
  1. Click Connect.
  1. Add a new connection in MQTT Explorer with the username and password.
  1. Click ADVANCED, change the client ID.
  1. Click BACK and then CONNECT.
  • Node-RED
  1. Open your Node-RED instance, double-click the mqtt in node.
  2. Add a new MQTT broker with the authentication information from Tier0.
  1. Go back to the Connectivity page on Tier0, click the Clients tab and check whether the client is connected.
  2. Copy the topic of the data model under UNS, and publish a message to it on the client.
  1. Go back to UNS, check whether the data has been received under the target topic.