MTConnect.NET-MQTT 7.2.0.105

dotnet add package MTConnect.NET-MQTT --version 7.2.0.105
                    
NuGet\Install-Package MTConnect.NET-MQTT -Version 7.2.0.105
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MTConnect.NET-MQTT" Version="7.2.0.105" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MTConnect.NET-MQTT" Version="7.2.0.105" />
                    
Directory.Packages.props
<PackageReference Include="MTConnect.NET-MQTT" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MTConnect.NET-MQTT --version 7.2.0.105
                    
#r "nuget: MTConnect.NET-MQTT, 7.2.0.105"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MTConnect.NET-MQTT@7.2.0.105
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MTConnect.NET-MQTT&version=7.2.0.105
                    
Install as a Cake Addin
#tool nuget:?package=MTConnect.NET-MQTT&version=7.2.0.105
                    
Install as a Cake Tool

MTConnect.NET Logo

MTConnect.NET-MQTT

MTConnect.NET-MQTT is an extension library to MTConnect.NET that provides MQTT Broker, Relay & Client classes for an MTConnect Agent. The MTConnectMqttBroker and MTConnectMqttRelay classes use an IMTConnectAgent interface and the MTConnectMqttDocumentServer class uses an IMTConnectAgentBroker interface.

Topic Structures

Document - Topics are the same as HTTP (Probe, Current, Sample, & Assets). Payloads are the corresponding MTConnect Response Documents. This provides a simple protocol that is performance based for applications with high frequency updates.

Entity - Topics are expanded where each Entity has its own topic. This provides an easy to read interface for tools such as NodeRed, etc.

Document Topic Structure

This topic structure is the official MQTT based protocol for MTConnect.

Topics

The Document Topic Structure uses the standard MTConnect Response documents as message payload and the standard MTConnect API endpoints as topics.

[TOPIC_PREFIX]/Probe/[DEVICE_UUID] - The topic where MTConnectDevices Response documents are published

[TOPIC_PREFIX]/Current/[DEVICE_UUID] - The topic where MTConnectStreams Response documents are published at the configured CurrentInterval

[TOPIC_PREFIX]/Sample/[DEVICE_UUID] - The topic where MTConnectStreams Response documents are published at the configured SampleInterval when new data is added to the Agent

[TOPIC_PREFIX]/Asset/[DEVICE_UUID]/[ASSET_ID] - The topic where MTConnectAssets Response documents are published

[TOPIC_PREFIX] is the configured TopicPrefix (default is MTConnect).

Protocol

Probe

Each device is sent in an MTConnectDevices Response document. The message is published upon Agent start/restart or when a Device is changed or a new Device is added.

Topic
[TOPIC_PREFIX]/Probe/[DEVICE_UUID]
Payload

The payload is formatted using the configured Document Format ID. The MQTT Relay and MQTT Broker Agent Modules default to json-cppagent. The MTConnectMqttClient class reads using json-cppagent-mqtt by default.

Learn More : See example MTConnectDevices Response Document Payload

Current
Topic
[TOPIC_PREFIX]/Current/[DEVICE_UUID]
Payload

The payload is formatted using the configured Document Format ID. The MQTT Relay and MQTT Broker Agent Modules default to json-cppagent. The MTConnectMqttClient class reads using json-cppagent-mqtt by default.

Learn More : See example MTConnectStreams Response Document Payload

Sample
Topic
[TOPIC_PREFIX]/Sample/[DEVICE_UUID]
Payload

The payload is formatted using the configured Document Format ID. The MQTT Relay and MQTT Broker Agent Modules default to json-cppagent. The MTConnectMqttClient class reads using json-cppagent-mqtt by default.

Learn More : See example MTConnectStreams Response Document Payload

Asset
Topic
[TOPIC_PREFIX]/Asset/[DEVICE_UUID]/[ASSET_ID]
Payload

The payload is formatted using the configured Document Format ID. The MQTT Relay and MQTT Broker Agent Modules default to json-cppagent. The MTConnectMqttClient class reads using json-cppagent-mqtt by default.

Learn More : See example MTConnectAssets Response Document Payload

Entity Topic Structure

This topic structure is designed to supplement the Document topic structure and be used for use cases that may require a more simple protocol that requires less payload parsing or the ability to subscribe to specific DataItems.

Entity topics are published by two sets of classes:

  • MTConnectMqttEntityServer : Used by the MQTT Relay and MQTT Broker Agent Modules. Uses the configured TopicPrefix (default is MTConnect) and the configured Document Format ID (default is JSON). Observations are always published using the Flat layout and Asset topics do not include the Asset Type.
  • MTConnectMqttBroker and MTConnectMqttRelay : Always use the MTConnect prefix. Observations are published using the layout set in the Format property (MTConnectMqttFormat.Flat or MTConnectMqttFormat.Hierarchy, default is Hierarchy) and Asset topics include the Asset Type. These classes also publish the Agent topics and the Device AgentUuid topic listed below.

Agent

Published by MTConnectMqttBroker and MTConnectMqttRelay.

MTConnect/Agents/[AGENT_UUID]/Information
MTConnect/Agents/[AGENT_UUID]/HeartbeatTimestamp

The Information payload is a JSON object describing the Agent (UUID, InstanceId, Version, Sender, DeviceModelChangeTime, HeartbeatInterval, ObservationIntervals, and the list of Device UUIDs). The HeartbeatTimestamp payload is the current Unix timestamp in milliseconds.

Devices

The Devices topics are used to send data that is in an MTConnectDevicesResponse document.

[TOPIC_PREFIX]/Devices/[DEVICE_UUID]/Device

MTConnectMqttBroker and MTConnectMqttRelay also publish the UUID of the Agent that the Device belongs to:

MTConnect/Devices/[DEVICE_UUID]/AgentUuid

Observations

MTConnectMqttEntityServer publishes each Observation to the Flat topic:

[TOPIC_PREFIX]/Devices/[DEVICE_UUID]/Observations/[DATA_ITEM_ID]

MTConnectMqttBroker and MTConnectMqttRelay use the MTConnectMqttFormat.Flat or MTConnectMqttFormat.Hierarchy option (Format property) to specify how the topics are structured.

MTConnectMqttFormat.Flat Format:

MTConnect/Devices/[DEVICE_UUID]/Observations/[DATA_ITEM_ID]

MTConnectMqttFormat.Hierarchy Format:

MTConnect/Devices/[DEVICE_UUID]/Observations/[COMPONENT_TYPE]/[COMPONENT_ID]/[DATA_ITEM_CATEGORY]/[DATA_ITEM_TYPE]/[DATA_ITEM_ID]
MTConnect/Devices/[DEVICE_UUID]/Observations/[COMPONENT_TYPE]/[COMPONENT_ID]/[DATA_ITEM_CATEGORY]/[DATA_ITEM_TYPE]/SubTypes/[DATA_ITEM_SUBTYPE]/[DATA_ITEM_ID]

When Observations are published for an Observation Interval, the Observations level is replaced by Observations[INTERVAL] (the Interval in milliseconds).

The "Flat" format is typically used for brokers that limit the topic depth (number of forward slash "/" characters). For example, AWS IoT Core.

Device Condition Observations

Condition messages are sent as an array of Observations since a Condition may have multiple Fault States. This is similar to how the Current request functions in an HTTP Agent.

Device Assets

MTConnectMqttEntityServer:

[TOPIC_PREFIX]/Devices/[DEVICE_UUID]/Assets/[ASSET_ID]

MTConnectMqttBroker and MTConnectMqttRelay:

MTConnect/Devices/[DEVICE_UUID]/Assets/[ASSET_TYPE]/[ASSET_ID]
MTConnect/Assets/[ASSET_TYPE]/[ASSET_ID]

Topics

The topics below are those published by MTConnectMqttEntityServer with the default TopicPrefix.

[Node] = (Payload)

- MTConnect
   ─ Devices
      ─ [DEVICE_UUID]
        - Device = (JSON)
        - Observations
          - [DATA_ITEM_ID] = (JSON)
          - [DATA_ITEM_ID] = (JSON)
          - [DATA_ITEM_ID] = (JSON Array for a Condition)
        - Assets
          - [ASSET_ID] = (JSON)

Example

- MTConnect
   ─ Devices
      ─ OKUMA.Lathe.123456
        - Device
        - Observations
          - L2avail = {"dataItemId":"L2avail","name":"avail","type":"AVAILABILITY","timestamp":"2023-02-07T20:02:26.8978653Z","result":"AVAILABLE"}
          - L2estop = {"dataItemId":"L2estop","name":"estop","type":"EMERGENCY_STOP","timestamp":"2023-02-07T20:02:26.8978653Z","result":"ARMED"}
          - L2p1execution = {"dataItemId":"L2p1execution","name":"p1execution","type":"EXECUTION","timestamp":"2023-02-07T20:02:26.7671421Z","result":"UNAVAILABLE"}
          - L2p1system = [{"level":"WARNING","dataItemId":"L2p1system","name":"p1system","type":"SYSTEM","timestamp":"2023-02-07T20:30:16.8639659Z","result":"Not Found","nativeCode":"404"},{"level":"FAULT","dataItemId":"L2p1system","name":"p1system","type":"SYSTEM","timestamp":"2023-02-07T20:30:38.9662297Z","result":"Internal Error","nativeCode":"500"}]         
        - Assets
          - 5.12 = {"assetId":"5.12","type":"CuttingTool","timestamp":"2023-02-07T13:36:04.7288143Z","deviceUuid":"OKUMA.Lathe.123456","serialNumber":"12345678946","toolId":"12","cuttingToolLifeCycle":{"cutterStatus":["AVAILABLE","NEW","MEASURED"],"location":{"type":"SPINDLE"},"programToolGroup":"5","programToolNumber":"12","measurements":[{"type":"FunctionalLength","value":7.6543,"units":"MILLIMETER","code":"LF"},{"type":"CuttingDiameterMax","value":0.375,"units":"MILLIMETER","code":"DC"}]}}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on MTConnect.NET-MQTT:

Package Downloads
MTConnect.NET

MTConnect.NET is a fully featured .NET library for MTConnect Agents, Adapters, and Clients. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10

MTConnect.NET-AgentModule-MqttAdapter

MTConnect.NET-AgentModule-MqttAdapter implements an Adapter to read data from an MQTT Broker for use with the MTConnectAgentApplication class in the MTConnect.NET-Applications-Agent library. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10

MTConnect.NET-AgentModule-MqttRelay

MTConnect.NET-AgentModule-MqttRelay implements MQTT with MTConnect to publish to an external broker. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10

MTConnect.NET-AgentModule-MqttBroker

MTConnect.NET-AgentModule-MqttBroker implements an MQTT Broker for use with the MTConnectAgentApplication class in the MTConnect.NET-Applications-Agent library. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10

MTConnect.NET-AdapterModule-MQTT

MTConnect.NET-AdapterModule-MQTT implements an adapter to send input data to an MQTT Broker to be read by an MTConnect Agent for Adapter Applications. Supports MTConnect versions up to 2.7. Supports .NET Framework 4.6.1 up to .NET 10

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.2.0.105 339 11/21/2026
7.2.0.105-prerelease 298 11/21/2026
7.2.0.103-prerelease 321 11/20/2026
7.0.0.2-prerelease 364 6/26/2026
6.9.0.2 5,516 10/16/2025
6.8.0 870 9/13/2025
6.7.0 989 6/22/2025
6.6.0 3,371 1/18/2025
6.5.1 1,290 12/3/2024
6.5.0 1,110 10/21/2024
6.4.7 1,268 8/21/2024
6.4.6 987 8/7/2024
6.4.5 556 8/2/2024
6.4.4 831 7/16/2024
6.4.3 858 6/14/2024
6.4.2 615 6/12/2024
6.4.1 1,002 5/17/2024
6.4.0 639 5/14/2024
6.3.2-beta 554 5/2/2024
6.3.1-beta 25,241 4/24/2024
Loading failed