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.

Initial Setup and Sending Data (Ingest)

1

Sign up for Heisenware

If you haven't done so yet, sign up and create your account first.

2

Generate Client Credentials

Navigate to the App Manager > Integrations page. Add a new MQTT integration to generate the specific username and password for your external MQTT client.

3

Configure your MQTT Client

Configure your external client using the connection details and instructions provided in the MQTT integration guide. You will need the username and password generated in Step 2.

4

Start Publishing Data

Publish some test data on a topic from your external client to Heisenware. This ensures there is data to visualize in the next step.

5

Subscribe using the Internal MQTT Client

Your Heisenware tenant includes a default internal MQTT client.

  • Open the App Builder for your app.

  • Use the onJsonMessage (or onStringMessage) function belonging to the internal client.

  • Enter the topic you are publishing on into the function.

  • Trigger the function manually. You are now subscribed.

  • Enable Test Mode to see incoming data appear inside the event handler.

6

Work with the Incoming Data (Optional)

To process the data, we recommend connecting the event handler to a Memory function.

  • The Memory makes the incoming data available as a regular function output.

  • From here, you can modify, store, forward, or visualize the data as needed.

Receiving Data on Your Client (Egress)

You must complete the Initial Setup (steps 1–3 above) before proceeding.

1

Publish Data to the Internal Broker

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

You can manually fill the message input box or use dynamic data.

The Data Simulation class is a great way to create dynamic data for testing. You can prepare this simulated data using a modifier before publishing.

2

Subscribe with your External Client

Configure your external MQTT client to subscribe to the topic you defined in Step 1. You will now receive the data published by Heisenware.

Last updated