Back to Developers
Integration Guide

Connect Your Existing UNS

Already running Sparkplug B over MQTT? Connect your infrastructure to Flowstate in minutes. No hardware purchase required.

Prerequisites

MQTT broker running Sparkplug B

HiveMQ, Mosquitto, EMQX, or any Sparkplug B-compatible broker.

Edge devices publishing DBIRTH/DDATA messages

Your edge nodes must publish standard Sparkplug B lifecycle messages (NBIRTH, DBIRTH, DDATA, DDEATH).

Flowstate Connect subscription

Sign up at flowstateindustrial.com/pricing — $129/machine/month, 3-machine minimum.

No Sparkplug B infrastructure yet?

Flowstate Fleet ($199/machine/month) includes pre-configured hardware, a managed MQTT broker, and installation support. Compare plans

Step 1: Get Your Webhook Credentials

After signing up, go to Settings → Integrations in your Flowstate dashboard. You will see:

  • Webhook URL — the HTTPS endpoint your edge nodes will send data to
  • Webhook Secret — a 256-bit hex token for authenticating requests
  • GROUP_ID — your Sparkplug B Group ID (Parris method format)

Step 2: Configure Your Edge to Forward Data

Your edge node needs to forward Sparkplug B messages to the Flowstate webhook. The simplest approach: an MQTT bridge or a lightweight forwarder that subscribes to your local broker and POSTs to the webhook.

Example: curl test
curl -X POST \
  https://deafening-raven-601.convex.site/webhooks/asset-status \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Secret: YOUR_WEBHOOK_SECRET" \
  -d '{
    "groupId": "YOUR_GROUP_ID",
    "edgeNodeId": "CellA",
    "deviceId": "Motor_01",
    "messageType": "DDATA",
    "timestamp": 1713100000,
    "metrics": {
      "vibration_velocity": 2.4,
      "temperature": 45.2,
      "current_a": 12.5
    }
  }'

Step 3: Authentication

Every request must include the X-Webhook-Secret header with your organization's webhook secret.

You can rotate your secret in Settings → Integrations. The old secret remains valid for 24 hours after rotation (grace period).

Step 4: Sparkplug B Message Format

Flowstate accepts these Sparkplug B message types:

NBIRTH — Node birth
NDEATH — Node death
DBIRTH — Device birth (auto-discovers assets)
DDEATH — Device death
DDATA — Device data (metrics update)
NDATA — Node data

GROUP_ID format (Parris method):

{Enterprise}:{Site}:{Area} — e.g., "AcmeMfg:PlantA:CNCFloor"

Step 5: Verify Data Is Flowing

After sending your first DBIRTH message, check your Flowstate dashboard:

  1. Go to Operations — new devices appear as pending assets
  2. Approve the asset and classify it (machine, sensor, gateway)
  3. DDATA messages start populating real-time metrics
  4. Alerts fire automatically based on your configured rules

The 14-day money-back guarantee starts from your subscription date. If data isn't flowing and you need help, contact support.