For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect an external MQTT client

This guide explains how to connect an external MQTT client to your Heisenware tenant. You will learn to send data to Heisenware and receive data from Heisenware via MQTT.

Learn how to connect an external MQTT client to your Heisenware tenant to send data to and receive data from your Apps.

Initial setup and sending data (ingest)

1

Create a Heisenware account

If you do not have an account, sign up to get started.

2

Generate client credentials

  1. Open the App Manager and navigate to Integrations.

  2. Add a new MQTT integration to generate a dedicated username and password for your external MQTT client.

3

Configure your MQTT client

Configure your external client using the connection details and instructions from the MQTT Client connector documentation. Use the username and password you generated in the previous step.

4

Start publishing data

Publish test data to a specific topic from your external client. This provides live messages to verify your connection in the next steps.

5

Subscribe using the internal MQTT client

Each Heisenware tenant includes a default internal MQTT client.

  1. Open the App Builder for your App.

  2. Locate the onJsonMessage or onStringMessage function of the internal client in the Function Explorer and drag it onto the canvas.

  3. Enter your active topic name in the function settings.

  4. Trigger the function manually to subscribe the App to the topic.

  5. Run the App in test mode to view incoming messages in the event output.

6

Process incoming data

To work with incoming messages in your App's data flow, connect the event handler output to a memory function (part of the Data processing utility class).

The memory function converts the incoming real-time stream into a standard function output. From there, you can modify, store, forward, or visualize the payload as needed.

Receive data on your client (egress)

Complete the initial setup

Ensure you complete steps 1 through 3 of the initial setup to configure your client credentials before proceeding with egress configuration.

1

Publish data to the internal broker

Use the publishJson or publishString function in the Backend Builder to publish data to a specific topic.

You can enter a static message manually or bind dynamic data to the input box.

Generate test data

Use the Data simulation class to generate dynamic test values. You can format this simulated data using a modifier extension node before publishing.

2

Subscribe with your external client

Configure your external MQTT client to subscribe to the same topic you defined in the previous step. The client will now receive all payloads published by the App.

Last updated

Was this helpful?