Skip to content

Sparkplug Groups

Sparkplug Groups organize edge nodes into logical namespaces within the Sparkplug B protocol.

Sparkplug Groups List Screenshot placeholder: List of Sparkplug groups

What is a Sparkplug Group?

A Sparkplug Group (equivalent to Sparkplug B "group_id") is a logical grouping that appears in MQTT topics:

spBv1.0/{group_id}/{message_type}/{edge_node_id}/{device_id}

Examples: - spBv1.0/Plant1/DDATA/Gateway01/Pump01 - spBv1.0/WaterTreatment/DBIRTH/Edge03/Tank02

Groups typically represent: - Physical locations (Plant1, Building3) - Geographic sites (Dallas, Toronto) - Departments (Production, Maintenance) - Logical systems (WaterTreatment, PowerGen)

Creating a Sparkplug Group

Add Sparkplug Group Screenshot placeholder: Add Sparkplug group form

  1. Navigate to MQTT → Sparkplug Groups
  2. Click Add Group
  3. Configure:

Group Settings

  • Group Name: Descriptive name (e.g., "Plant 1")
  • Group ID: Sparkplug group_id (e.g., "Plant1")
  • Used in MQTT topics
  • Must be unique
  • No spaces or special characters
  • Alphanumeric and underscores only

  • Click Save

MQTT Topic Structure

Topic Format

All Sparkplug messages use this format:

spBv1.0/{group_id}/{message_type}/{edge_node_id}/{device_id}

Message Types

  • NBIRTH: Node birth (gateway announces itself)
  • NDEATH: Node death (gateway disconnection)
  • DBIRTH: Device birth (device schema announcement)
  • DDEATH: Device death (device disconnection)
  • DDATA: Device data (tag values)
  • DCMD: Device command (write to device)
  • NCMD: Node command (gateway control)

Example Topics

Node birth:

spBv1.0/Plant1/NBIRTH/Gateway01

Device data:

spBv1.0/Plant1/DDATA/Gateway01/PLC_01

Device command:

spBv1.0/Plant1/DCMD/Gateway01/PLC_01

Best Practices

Naming Conventions

Group IDs: - ✅ Use meaningful names: Plant1, Dallas_Site, WaterTreatment - ✅ Be consistent across your organization - ❌ Avoid generic names: Group1, Test, Default - ❌ No spaces: Use underscores instead

Next Steps