MQTT & Sparkplug B

AnywhereSCADA uses MQTT with the Sparkplug B specification as its connectivity layer. Every space comes with a fully managed MQTT broker — no infrastructure to set up or maintain.

Connection Details

Each space provides a dedicated set of credentials:

SettingValue
Broker URLmqtts://mqtt1.anywherescada.joyautomation.com:8883
UsernameYour space's short ID (e.g. abc1234)
PasswordAuto-generated (visible on your space page)
ProtocolSparkplug B over MQTT 5.0

Find your credentials on your space page under the Broker URL, Username, and Password fields. Use the copy buttons to quickly copy each value.

Screenshot: Space page with MQTT connection details highlighted

What Is Sparkplug B?

Sparkplug B is an open specification built on top of MQTT that defines:

  • Topic namespace — a structured hierarchy: spBv1.0/{group}/{message_type}/{node}/{device}
  • Payload encoding — Protocol Buffers (protobuf) for efficient, typed data
  • Birth/death certificates — automatic online/offline detection for nodes and devices
  • State management — SCADA host state awareness for store-and-forward
  • Alias resolution — numeric aliases for metric names to reduce message size

Message Types

MessageDirectionPurpose
NBIRTHNode → BrokerNode comes online with its metric schema
NDEATHBroker → ClientsNode went offline (Last Will & Testament)
DBIRTHNode → BrokerDevice comes online with its metrics
DDEATHBroker → ClientsDevice went offline
NDATANode → BrokerNode metric value update
DDATANode → BrokerDevice metric value update
NCMDSCADA → NodeCommand to a node
DCMDSCADA → DeviceCommand to a device
STATESCADA HostSCADA application state (online/offline)

Supported Data Types

AnywhereSCADA stores and displays the following Sparkplug B metric types:

  • Float / Double — floating-point values (temperature, pressure, flow rates)
  • Integer — signed/unsigned 8, 16, 32, and 64-bit integers
  • Boolean — true/false states (valve open/closed, motor running/stopped)
  • String — text values

UDT Templates

AnywhereSCADA supports Sparkplug B User-Defined Types (UDTs). When your edge node publishes template definitions in birth certificates, metrics that belong to a UDT are grouped by template name on the dashboard and display a template badge for easy identification.

Connecting a Device

Step 1: Configure Your MQTT Client

Use any Sparkplug B-compliant client. Popular options:

  • Eclipse Tahu — reference Sparkplug B implementation (Java, C, Python)
  • Cirrus Link MQTT Modules — Ignition MQTT Transmission/Engine
  • Tentacle — open-source edge server with built-in Sparkplug B and Modbus support
  • Custom clients — any MQTT library + Sparkplug B protobuf encoding

Configure the client with your space's MQTT credentials (broker URL, username, password).

Step 2: Publish Birth Certificates

When your node connects, it should publish:

  1. NBIRTH — declares the node and its metric schema
  2. DBIRTH — declares each device and its metrics

AnywhereSCADA uses birth certificates to build the network topology and display metrics.

Step 3: Publish Data

Send NDATA or DDATA messages whenever metric values change. AnywhereSCADA receives updates in real time and displays them on the dashboard.

Screenshot: Dashboard showing live metrics arriving from a connected device

Topic Namespace

Sparkplug B topics follow this structure:

spBv1.0/{group_id}/{message_type}/{edge_node_id}
spBv1.0/{group_id}/{message_type}/{edge_node_id}/{device_id}
  • group_id — logical grouping (e.g. Plant1, BuildingA)
  • edge_node_id — the connecting application or gateway
  • device_id — an individual device behind the edge node

TLS / Security

All connections use TLS on port 8883. Unencrypted connections are not accepted. Each space's credentials are isolated — devices in one space cannot access another space's data.

Troubleshooting

Device Not Appearing

  • Verify your credentials (username = space short ID, not your email)
  • Confirm you're connecting to port 8883 with TLS enabled
  • Check that your client publishes proper NBIRTH / DBIRTH messages
  • Look at the Network Visualization page for connection status

Metrics Not Updating

  • Ensure you're sending DDATA or NDATA messages after the initial birth
  • Verify the metric names in data messages match those declared in the birth certificate
  • If using aliases, ensure the alias-to-name mapping was established in the birth certificate
  • Check your client's MQTT connection status — reconnects require re-publishing births

Connection Drops

  • Trial accounts: connections are terminated after the 8-hour window expires. Start a new session or upgrade to Production.
  • Production accounts: check your network connectivity and MQTT client keep-alive settings