Deploy a lightweight IIoT solution at the edge.

How-to ExamplesArchitecture → Edge IIoT


Download the sample solution: Edge IIoT Example.dbsln

This guide shows how to use the Edge IIoT Example, focusing on the built-in MQTT broker, data publishing in SparkplugB, and how external clients can consume this data.


Configuration workflow

  1. Download and open the Edge IIoT Example project.

  2. Verify the built-in MQTT broker operation.

  3. Publish data using SparkplugB.

  4. Demonstrate how external clients can access the data.


Step 1: Open the Solution

  • Download the Edge IIoT Example project (link available in the documentation).

  • Open the solution in Solution Manager.


Step 2: Built-in MQTT Broker

  • The built-in MQTT broker is already configured in the example.

  • It starts automatically when the solution goes to Runtime → Startup, and it stops when the solution is shut down.

  • This process is controlled by tasks, ensuring proper initialization and shutdown.

  • You can check these tasks under ServerStartup and ServerShutdown, where the broker start and stop commands are defined.

  • No manual adjustment is required.


Step 3: Publish SparkplugB Data

  • Navigate to Devices → Points.

  • Check the configuration for points prepared for publishing using the SparkplugB protocol.

  • Additionally, you can enable the option in Runtime → Startup called Publish to built-in MQTT broker.

Result: The configured points are published to the built-in broker in SparkplugB format.


Step 4: Access Data from External Clients

Data can be accessed in two ways:

  1. Via MQTT Broker (SparkplugB)

    • Any MQTT client (e.g., MQTT Explorer, Node-RED) can connect to mqtt://<server-IP>:1883.

    • Subscribe to SparkplugB topics, for example:

      spBv1.0/EdgeNode01/Group01/#
  2. Via Internal Devices and TagProvider

    • The same data being published is also available through configured Devices inside the solution.

    • A TagProvider is also included, allowing internal access to the same values without going through the broker.


Step 5: Test and Monitor

Communication

  • Open Property Watch to monitor tag values.

  • Confirm quality status: 192 = Good.

External Client

  • Connect to the built-in broker using an MQTT client.

  • Validate that SparkplugB messages from the configured points are being received.


Expected Result

  • Built-in MQTT broker runs automatically.

  • SparkplugB data publishing is active.

  • Two access modes are available:

    1. External consumption via MQTT clients.

    2. Internal access via Devices and TagProvider.


In this section...