Skip to content

PUBLISH / SUBSCRIBE

MQTT device testing, from CONNECT to payload.

Connect your MQTT device to a test broker, inspect published messages, and trace acknowledgements and commands in the same workspace.

SingleIoT product guide · Updated October 14, 2026

UNDERSTAND THE EXCHANGE

What can you test with MQTT?

Use MQTT testing when your firmware publishes sensor readings, subscribes to commands or communicates through a gateway. A successful broker connection is only the first check: you also need to confirm that the device uses the expected topic, sends the correct payload and receives the right reply. SingleIoT brings these observations into the device console.

01

Broker connection

Verify the assigned hostname, port and credentials before troubleshooting the payload.

02

Topic and payload

Compare the publish topic, payload bytes and timestamps with your firmware’s expected output.

03

Commands and replies

Subscribe to the downlink topic and compare incoming commands with the device’s response.

SET UP YOUR FIRST TEST

How to test a MQTT device in SingleIoT

  1. 1

    Create an MQTT device

    Choose MQTT when adding a device and open its connection details. Confirm MQTT is available on your active plan.

  2. 2

    Configure the broker connection

    Use the device ID as the MQTT username and the device token as the password. Use the assigned TLS settings and trust material for a secure endpoint.

  3. 3

    Publish a known message

    Publish a small JSON payload under the assigned uplink topic. Start with a known value so you can compare the captured message with what the firmware sent.

  4. 4

    Inspect traffic and test a reply

    Open the live console, inspect the payload and subscribe to the assigned downlink topic before sending a command. Compare the response with your acknowledgement rule.

MQTT connection example

Start with a known message, then compare it with the captured frame.

MQTT · illustrative setup
Username:  <device UUID>
Password:  <device token>
Publish:   pg/<device UUID>/up/telemetry
Subscribe: pg/<device UUID>/down
Payload:   { "temperature": 26.5, "humidity": 62 }

Replace the placeholders with the values in your device workspace. This is the default topic pattern for SingleIoT’s MQTT gateway; use the connection details shown for your device.

Common MQTT testing problems

Change one setting at a time and use captured traffic to verify the result.

Connection rejected

Check the device ID and token, then verify that the device and MQTT protocol are enabled. A dashboard password is not a device token.

Connected, but no uplink frame

Check that you are publishing under the assigned pg/<device UUID>/up/ topic. Verify the topic in the publishing client rather than relying on a hard-coded firmware value.

No command arrives

Subscribe to pg/<device UUID>/down before sending a command. Inspect the outgoing frame and confirm the client is still connected.

TLS connection fails

Check hostname, port, certificate trust and client certificate requirements. A device endpoint may use a different certificate authority from the public website.

MQTT testing questions

Can I test MQTT without physical hardware?

Yes. An MQTT client or the supported simulator can send traffic to the assigned device endpoint. Use the device ID, token and topic details from your workspace.

Does the Free plan include MQTT?

The default Free plan includes MQTT. Check your active account plan for current protocol availability and limits.

See what your MQTT device actually sends.

Create a device workspace and inspect your first frame.

Create your workspace →