MQTT Sources
Connect PEEK to your MQTT broker to observe device messages in real time.
How MQTT Sources Work
When you add an MQTT source, PEEK connects to your broker as a read-only subscriber. It does not publish any messages to your broker — it only listens. PEEK subscribes to the topic pattern you specify and processes every message that arrives.
Adding an MQTT Source
Navigate to Sources in the dashboard and click Add Source. Select MQTT and fill in:
| Field | Description | Example |
|---|---|---|
| Name | A label for this source | Production Broker |
| Broker URL | Your MQTT broker address | tcp://broker.example.com:1883 |
| Username | Broker username (if required) | peek-reader |
| Password | Broker password (stored encrypted) | — |
| Topic Pattern | MQTT topic filter to subscribe to | devices/# |
| Use TLS | Enable encrypted connection | Recommended for remote brokers |
Topic Patterns and Device ID Extraction
PEEK extracts the device ID from the MQTT topic. By default, it uses the second segment of the topic path. For example:
Topic: devices/sensor-001/telemetry
^^^^^^^^^^^
Device ID = sensor-001The wildcard # subscribes to all sub-topics. Common patterns:
- •
devices/#— all messages under thedevices/prefix - •
#— all messages on the broker (use with caution on busy brokers) - •
fleet/+/telemetry— single-level wildcard for specific topics
Offline Detection Threshold
Each source has an offline threshold (default: 300 seconds). If a device has not sent a message within this window, PEEK marks it as offline. Adjust this based on how frequently your devices report in.
Connection Security
For brokers that require TLS, enable the Use TLS option. Your broker credentials are stored encrypted at rest. We recommend creating a dedicated read-only MQTT user for PEEK so it has minimal permissions on your broker.