How-to
Name Sparkplug B group, edge node and device IDs
Short answer
Use one Group ID per site (ACME Brewery), one Edge Node ID per aggregation point (Ignition 1), and one Device ID per controller (Wago PLC). Keep forward slash, plus and hash out of the IDs. Write setpoints to the same MQTT Engine tag the PLC publishes: Engine converts the write into a Sparkplug command, Transmission performs it through the local driver, and a DATA message updates the tag.
On this page
Name the three Sparkplug B identifiers by architectural level: one Group ID per site (ACME Brewery), one Edge Node ID per aggregation point (Ignition 1), and one Device ID per controller (Wago PLC, Siemens PLC). Keep all three PLCs in one group, because they sit at one site. For the setpoint question, write to the same MQTT Engine tag the PLC publishes: Engine turns the write into a Sparkplug command, MQTT Transmission performs it through the local Ignition driver, and the accepted value comes back as a DATA message on that same tag. A separate command tag buys you nothing.
What each identifier names #
A unified namespace is one shared, consistently named structure for the plant's data: a standardized way to organize and name it, holding the enterprise's structure and events in one place. In Sparkplug B, that structure starts with three user-configurable IDs, and each names a different architectural level:
| Identifier | What it names | Brewery example |
|---|---|---|
| Group ID | A meaningful group of edge nodes, in practice one operational site | ACME Brewery |
| Edge Node ID | One Edge of Network (EoN) publisher: the gateway or Ignition instance that aggregates devices | Ignition 1 |
| Device ID | One physical or logical device under that edge node; optional at the protocol level | Wago PLC |
The ID strings are UTF-8, and three characters are reserved in all of them: forward slash, plus and hash. Those are the MQTT separators and wildcards, and an ID containing one breaks the topic it sits in.
In Ignition, the MQTT Engine tag provider lays this hierarchy out as Edge Nodes/{Group ID}/{Node ID}/{Device ID}, with the Node ID element carrying the Edge Node ID. The names you choose become the folder names every subscriber reads, which is why they are worth choosing once, properly.
Naming rules that scale from one site to many #
- One Group ID per operational site. Name it for the site, ACME Brewery rather than plain Brewery, so a second site later gets its own group and the first is never renamed.
- One Edge Node ID per aggregation point. Every Ignition instance or gateway that publishes devices is one edge node. Ignition 1 leaves room for Ignition 2 at the same site.
- One Device ID per controller. Manufacturer-based names such as Wago PLC or Siemens PLC are right as long as they uniquely and persistently identify the device.
- Do not split one site's controllers into separate groups just because they are separate controllers. Site membership decides the group; controller identity decides the device.
- Name for the engineer reading it in three years. Subscriptions, historians and audits all key on these strings, so favor names that still mean something after the project team changes.
Worked example: naming a three-PLC brewery namespace #
The inputs, from the installation being named: one site; three PLCs; one Ignition edge instance aggregating all three and publishing them; more Ignition instances expected over time; more sites possible later.
The rule, in words: the site becomes the Group ID, the aggregation point becomes the Edge Node ID, the controller becomes the Device ID, and no ID contains a reserved character.
The arithmetic:
- Sites: 1, so Group IDs: 1, namely ACME Brewery.
- Aggregation points: 1, so Edge Node IDs: 1, namely Ignition 1.
- Controllers: 3, so Device IDs: 3. Two are Wago PLC and Siemens PLC; the third is named by the same rule, and if it repeats a make already used, add the line or area so the three stay unique.
- Device paths in the tag provider: 1 group × 1 edge node × 3 devices = 3. Two read Edge Nodes/ACME Brewery/Ignition 1/Wago PLC and Edge Nodes/ACME Brewery/Ignition 1/Siemens PLC; the third repeats that pattern with its own Device ID.
Result: three device paths sharing one group and one edge node. When the node comes online, each device announces itself with its own DBIRTH, carrying the group, edge node and device identity together.
Decision: one site = one group, one aggregation point = one edge node, one controller = one Device ID. A second gateway at the same site becomes Ignition 2 inside ACME Brewery; a second site gets a new Group ID of its own. Three PLCs at one site never become three groups.
Where a setpoint write goes #
Write to the same tag. The return path is built into Sparkplug B, and it runs like this:
- Write the setpoint or on/off value to the MQTT Engine tag, the same tag the PLC's measurement arrives on.
- Engine converts the write into a Sparkplug command message addressed to that edge node and device.
- MQTT Transmission receives the command and performs the write through the local Ignition driver, exactly as if the write had been made at the edge.
- A successful driver write changes the edge-side tag.
- That change is published as a DATA message, and Engine updates the same tag, so the display settles on the value the PLC accepted, not on a local echo.
A separate tag that the PLC subscribes to would duplicate state: two tags for one setpoint, with the PLC reconciling between them. Nothing in the Sparkplug flow asks for it.
Two caveats come with the modules: device writes can be disabled in MQTT Engine, in MQTT Transmission, or in both, and a configured security context can stop the command. A command arriving at the edge is still not proof the PLC accepted the value; only the returning DATA message is.
If data flows PLC-to-Ignition but commands never arrive at all, that is a subscription or permissions fault of its own, not a naming one, and it is covered in Sparkplug B sends data but receives no SCADA commands.
Enable and verify the write path #
- Enable device writes in MQTT Transmission.
- Enable device writes in MQTT Engine.
- Confirm the security context permits Engine to issue the command.
- Make the first write to a non-critical tag: the command acts on the process exactly like a setpoint entered locally, so prove the loop somewhere harmless first.
- Confirm the edge-side tag changed.
- Confirm the PLC itself holds the requested value.
- Confirm the returning DATA message updated the Engine tag.
If the loop breaks, isolate in order: the command was blocked before the edge (writes disabled or security), the driver write failed at the edge, or the tag change was never published. Each failure leaves a different witness: no command on the wire, a command with no tag change, or a tag change with no DATA message.
After a reconnect, the host can ask an edge node to republish its full state, and when that is worth triggering is its own question, covered in when to use the Sparkplug rebirth tag on an edge node. When a command, a rebirth request included, goes missing in transport instead, troubleshooting Sparkplug MQTT rebirth command losses traces that specific loss.
Questions asked
Is the Device ID required for every PLC?
No. The Device ID is optional, and an edge node can carry metrics itself. Give each PLC its own Device ID anyway: it is what lets a consumer filter one edge node's data by device, and a subscriber can use the # wildcard to receive every device under that node in one subscription.
Are spaces allowed in IDs like ACME Brewery?
Yes. The reserved set is the three MQTT separator and wildcard characters, forward slash, plus and hash, and spaces are not in it, so ACME Brewery, Ignition 1 and Wago PLC stand as valid names. Apply the same reserved-character rule to every ID you add later.
Should Ignition write the setpoint to the same tag or a separate one?
The same tag. Engine converts the write into a Sparkplug command, Transmission performs it through the local Ignition driver, and the new value returns as a DATA message on that tag. The value you then see is the one round-tripped through the PLC, not a local echo of what you typed.
What happens to these names when the system grows?
A second Ignition gateway at the same site becomes a second Edge Node ID, Ignition 2, inside the existing group. A second site gets its own Group ID. No already-published device name has to change, which is the point of naming by architectural level instead of by project.