This Tutorial Teaches you to:
- Start the MQTT internal broker
- Start the MQTT SpB Simulator
- Set up publishers using Device channels
- Set up collectors using TagProvider Services
Prerequisites
Step 1: Set Up the MQTT Broker and Simulator
Start the Built-in Broker
- Navigate to Data Explorer → MQTT Tools
- Click Run Local Built-in Broker to start the broker
- Connect to the broker (connection will show as established)
Run the MQTT Publisher Simulator
- Start the MQTT Publisher Simulator
- Verify data is publishing - you'll see:
- Cities (e.g., Barcelona)
- Solar panels with properties:
- Name
- Power
- Temperature
- Real-time changing values
Step 2: Map and Publish Data Using Devices
Create Device Mapping
- Select a panel (e.g., Panel 1) from the simulator
- Click Map to the Solution
- Choose Publisher and New DeviceNode
- Confirm to create tags automatically
- Go to Devices → Channels
- Confirm if all the setting are as expected, including the Group ID from the broker.
- Go to Devices → Nodes
- Confirm if all the setting are as expected, including the Node ID from the broker.
- Check Points section for mapped tags (e.g., PAN01)
- Verify the address structure:
- Group ID: cities
- Node ID: Barcelona
- Device ID: Panel_1
Step 3: Collect Data Using Tag Provider
Create Tag Provider
- Navigate to Frameworks → Tag Provider Services
- Click Create New Tag Provider
- Select MQTT SparkPlug B Collector Connector
- Change the setting to connect to your broker
- Test the broker connection
Link to Asset Tree
- In Asset Tree, create a folder (e.g., "Barcelona")
- Link the tag provider to this folder
- Navigate the tree structure to see values
Access Asset Data
- Open Tools → Object Browser
- Navigate to your asset (e.g., Barcelona → Panel1 → Current)
- Copy the asset path using the top button
- Paste this path anywhere in the software to retrieve values
Enable Local Tag Publishing
- In Runtime → Startup, before running the solution, check "Publish to MQTT Broker" option (Advanced settings)
- This automatically publishes public local tags to the broker
- Go to Unified Namespace > Tags
- Create a new local tag (e.g., "LocalTagPower")
- Set visibility column to Public for read/write access
- Public: Read and write access
- Protected: Read-only access
- Private: Tag not visible
Step 5: Run and Monitor the Solution
Start Runtime
- In Runtime → Startup, Click Run Startup
- Verify all connections are active
Monitor Data Flow
- Use Diagnostic Tools → Property Watch to monitor tag values
- Use Object Browser to:
- Navigate to specific tags (e.g., Barcelona → Panel1 → Current)
- Copy tag paths
- Add tags to watch lists for testing
Verify Data Collection
- Check that asset values are updating in real-time
- Confirm data is flowing from:
- Simulator → Broker
- Broker → Device mappings
- Tag Provider → Asset tree
In this section...
The root page @parent could not be found in space 93Draft.