title: "MQTT Integration — Choose the Right Connection Path" tags: [mqtt, sparkplugb, tagprovider, device-module, data-explorer, integration, router] description: "Router skill for MQTT integration. Determines whether to use TagProvider (dynamic discovery), Device Module (static tags with alarms/historian), or DataExplorer (interactive browsing) based on what the user needs." version: "1.0" author: "Tatsoft"
FrameworX offers three distinct paths for connecting to MQTT brokers. Each serves a different purpose. This skill helps you pick the right one before loading detailed implementation steps.
User asks about MQTT
|
+-- "Browse what the broker has" or "explore MQTT topics"
| --> Skill MQTT DataExplorer (interactive discovery, future)
| --> For now: navigate to DataExplorer.MQTTTools, start broker/simulator,
| connect and browse manually. Then decide TagProvider or Device Module.
|
+-- "Connect to MQTT for monitoring" or "dynamic tags" or "asset navigation"
| --> Skill MQTT TagProvider
| Use when: data is dynamic/unknown upfront, monitoring/visualization focus,
| no need for alarms or historian on individual points
|
+-- "Create tags from MQTT" or "alarms on MQTT data" or "historian for MQTT"
| --> Skill MQTT Device Module
| Use when: need local persistent tags, alarms, historian, scripting,
| or structured UserTypes (mandatory for SparkplugB)
|
+-- "Both browsing AND alarms on critical points"
--> Hybrid: TagProvider for full namespace browsing +
Device Module for the specific points that need alarms/historian
--> Load both skills
| Aspect | TagProvider (Discovery Services) | Device Module (Channel/Node/Points) | DataExplorer (future) |
|---|---|---|---|
| Skill page | Skill MQTT TagProvider | Skill MQTT Device Module | Skill MQTT DataExplorer |
| Creates | UnsTagProviders + UnsAssetTree | DevicesChannels + DevicesNodes + DevicesPoints + UnsTags (+ UnsUserTypes for SpB) | Uses new MCP tab actions on MQTT Tools page |
| Tags | Dynamic (exist only at runtime) | Local persistent tags in UNS | Wraps both paths above |
| Alarms | Not possible on dynamic tags | Yes, on local tags | N/A — delegates to the other skills |
| Historian | Not possible on dynamic tags | Yes, on local tags | N/A |
| SparkplugB | Works (use MQTTspB protocol) | Works, but REQUIRES UserTypes | Auto-detects and routes |
| Discovery | Full namespace auto-discovered | Must know topic structure upfront | Interactive browsing |
| Best for | Monitoring dashboards, asset navigation | Control systems, alarmed points, historical trending | Unknown brokers, first-time exploration |
search_docs('Skill MQTT TagProvider', labels='skill')
search_docs('Skill MQTT Device Module', labels='skill')
search_docs('Skill MQTT DataExplorer', labels='skill')
Both TagProvider and Device Module use the same MQTT protocols. Always call list_protocols before writing protocol-dependent tables.
| Protocol | Name in FrameworX | Interface | TagProvider | Device Module |
|---|---|---|---|---|
| MQTT (flat) | MQTT | Custom | Yes | Yes — simple tags |
| SparkplugB Collector | MQTTspB | TCPIP | Yes | Yes — REQUIRES UserTypes |
| SparkplugB Publisher | MQTTspBPub | TCPIP | No | Yes — for edge publishing |
Both paths can be tested with the built-in broker and simulator:
designer_action('navigate', 'DataExplorer.MQTTTools')
designer_action('builtin_broker', 'start') # Starts localhost:1883
designer_action('simulator', 'start') # Publishes SparkplugB sample data
The simulator publishes SparkplugB data: GroupID="Cities", 4 NodeIDs (Barcelona, Bilbao, Madrid, Sevilha), 4 Panels per city, 8 variables per panel (Current, Latitude, Longitude, Name, Power, State, Temperature, Voltage).