Knowledge Base

Build MQTT Sensor InfluxDB Logger Workflow

Duration: ~20 min · Level: Intermediate · Template: #161 MQTT Sensor → InfluxDB Logger · Deployment: On-prem

Prerequisites: Local Mosquitto broker, InfluxDB 2.x. Complements Building IoT Workflows with MQTT.

Build an MQTT telemetry pipeline from template #161: when a sensor message arrives, write the payload to InfluxDB for trending and dashboards.

What this template does

  1. MQTT Sensor Event — subscribes to sensors/+/telemetry.
  2. Write to InfluxDB — measurement sensor_reading with topic tag.

Step 1 — Load the template

  1. Studio → Templates → search MQTT Sensor InfluxDB.
  2. Load template #161.

Step 2 — MQTT

  1. Set broker host/port and topic filter to match your devices.
  2. Publish a test message: mosquitto_pub -t sensors/temp01/telemetry -m '{"value":22.5}'

Step 3 — InfluxDB

  1. Configure URL, token, org, bucket, measurement, and field mapping from {{payload}}.
  2. Add tags such as {{topic}} for multi-sensor dashboards.

Step 4 — Activate on-prem

MQTT subscribe requires on-prem Studio or an exported runtime on the gateway PC. Export with Export Runtime to Edge if the broker runs on a factory LAN.

Related tutorials

Nodlyn Assistant
Ask me anything about Nodlyn
Hi! 👋 I'm the Nodlyn assistant. Ask me about the product, workflow components, connectors, agent runtime, agent capabilities, deployment, and more. If I don't know an answer, I'll point you to our contact form.