Connect to a MQTT broker and map points.

TutorialsDevices | Tutorial | How-to Guide | Reference


This Tutorial Teaches how to:

  • Configure MQTT client
  • Subscribe to topics
  • Publish tag values using Sparkplug B
  • Map topics to tags

Prerequisites:


1. Set Up the MQTT Broker and Simulator

Start the Built-in Broker

  1. Navigate to Data Explorer → MQTT Tools
  2. Click Run Local Built-in Broker to start the broker
  3. Connect to the broker (connection will show as established)

Run the MQTT Publisher Simulator

  1. Start the MQTT Publisher Simulator
  2. Verify data is publishing - you'll see:
    • Cities (e.g., Barcelona)
    • Solar panels with properties:
      • Name
      • Power
      • Temperature
      • Real-time changing values

2. Configure MQTT Client

  1. Navigate to Devices → Protocols
  2. Select MQTT Message Queuing Telemetry Transport 
  3. Create channel:
    • Name: MQTTClient
    • Protocol: MQTT Client
  4. Go to Device → Nodes
    1. Name: IoT_Sensors
  5. Open PrimaryStation and configure:
    1. BrokerURL: 127.0.0.1
    2. Port: 502
    3. ClientID: FrameworX



3. Create Points

  1. Navigate to Devices → Points
  2. Add points for each expected topic:

Temperature Tank 1 Sensor:

  • TagName: TankFarm/Tank1/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank1/temperature
  • AccessType: Read

Temperature Tank 2 Sensor:

  • Name: TankFarm/Tank2/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank2/temperature
  • AccessType: Read

Temperature Tank 3 Sensor (write):

  • Name: TankFarm/Tank3/Temp
  • Node: IoT_Sensors
  • Topic: TankFarm/Tank3/temperature
  • AccessType: Write



4. Test Connection

  1. Start Runtime
  2. Open Devices → Devices Monitor
  3. Use MQTT client tool (like MQTT Explorer) to:
    • Publish test messages
    • Verify FrameworX publishes

In this section...