Skip to content
Learn › Connectors: open the docs menu

MQTT connector

This page shows how to connect Mammoth to an MQTT broker and save the messages published on a topic as a dataset, for example sensor readings from IoT devices.

Which connectors you can add depends on your plan.

What you need before connecting MQTT

  • A broker host reachable from the internet, and its port
  • A username and password, if the broker requires them
  • A topic that is publishing messages

Connect an MQTT broker

  1. Open the Connectors launcher and click MQTT (see Add a connector).
  2. Enter the connection details:
FieldWhat to enter
Broker HostThe broker address, such as broker.hivemq.com
PortDefault 1883, or 8883 for TLS
UsernameOptional
PasswordOptional
NameOptional label for this connection, such as Factory Floor Broker

Choose the MQTT topic and collection window

The MQTT connector's own setup form asks:

  • Topic: the topic to subscribe to, such as sensors/factory1/temperature
  • Collection Window (seconds): how long Mammoth listens for messages, from 1 to 600 seconds

Mammoth checks the topic before saving. Topic is active and receiving messages. means it is ready. In the connector workspace, you can tell the chat which topic you want.

MQTT update methods

After you save, an MQTT dataset's Update method offers two options: Replace all data or Add to existing data. MQTT refreshes don't use a key column.

Troubleshoot MQTT

  • No messages received. Ensure the broker is running and the topic is active. Check that something is publishing to the topic during the collection window, or lengthen the window.
  • Collection Window error: enter a whole number of seconds between 1 and 600.

Report an issue · support@mammoth.io