MTConnect.NET-MQTT 6.3.2-beta

This is a prerelease version of MTConnect.NET-MQTT.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MTConnect.NET-MQTT --version 6.3.2-beta                
NuGet\Install-Package MTConnect.NET-MQTT -Version 6.3.2-beta                
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="6.3.2-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MTConnect.NET-MQTT --version 6.3.2-beta                
#r "nuget: MTConnect.NET-MQTT, 6.3.2-beta"                
#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.
// Install MTConnect.NET-MQTT as a Cake Addin
#addin nuget:?package=MTConnect.NET-MQTT&version=6.3.2-beta&prerelease

// Install MTConnect.NET-MQTT as a Cake Tool
#tool nuget:?package=MTConnect.NET-MQTT&version=6.3.2-beta&prerelease                

MTConnect.NET Logo

MTConnect.NET-MQTT

MTConnect.NET-MQTT is an extension library to MTConnect.NET that provides an MQTT Broker & Client interface to an IMTConnectAgentBroker interface.

Updated for Version 6

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 it's own topic. This provides an easy to read interface for tools such as NodeRed, etc.

Document Topic Structure

Entity Topic Structure

Devices

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

MTConnect/Devices/[DEVICE_UUID]/Device

Device Observations

Observations may use the MTConnectMqttFormat.Flat or MTConnectMqttFormat.Hierarchy option 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]

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

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

Topic Structure (MTConnectMqttFormat.Flat)

[Node] = (Payload)

- MTConnect
   ─ Devices
      ─ [DEVICE_UUID]
        - Device = (JSON)
        - Observations
          - [DATA_ITEM_ID] = (JSON Array)
          - [DATA_ITEM_ID] = (JSON Array)
          - [DATA_ITEM_ID] = (JSON Array)
        - Assets
          - [ASSET_TYPE]
            - [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":"Interval Error","nativeCode":"500"}]         
        - Assets
          - CuttingTool
            - 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"}]}}

Topic Structure (MTConnectMqttFormat.Hierarchy)

[Node] = (Payload)

- MTConnect
   ─ Devices
      ─ [DEVICE_UUID]
        - Device = (JSON)
        - Observations
          - [COMPONENT_TYPE]
            - [COMPONENT_ID]
              - Events
                - [DATA_ITEM_TYPE]
                  - [DATA_ITEM_ID] = (JSON)
                  - SubTypes
                    - [DATA_ITEM_SUBTYPE]
                      - [DATA_ITEM_ID] = (JSON)
              - Samples
                - [DATA_ITEM_TYPE]
                  - [DATA_ITEM_ID] = (JSON)
              - Conditions
                - [DATA_ITEM_TYPE]
                  - [DATA_ITEM_ID] = (JSON Array)
        - Assets
          - [ASSET_TYPE]
            - [ASSET_ID] = (JSON)

Example

- MTConnect
   ─ Devices
      ─ OKUMA.Lathe.123456
        - Device
        - Observations
          - Device
            - OKUMA.Lathe
              - Events
                - AVAILABILITY
                  - L2avail = {"dataItemId":"L2avail","name":"avail","type":"AVAILABILITY","timestamp":"2023-02-07T20:02:26.8978653Z","result":"AVAILABLE"}
                - ASSET_CHANGED
                  - OKUMA.Lathe_assetCount = {"dataItemId":"OKUMA.Lathe_assetCount","name":"assetCount","type":"ASSET_COUNT","timestamp":"2023-02-07T20:02:26.7671421Z","result":"UNAVAILABLE","count":0}
          - Controller
            - L2ct1
              - Events
                - EMERGENCY_STOP
                  - L2estop = {"dataItemId":"L2estop","name":"estop","type":"EMERGENCY_STOP","timestamp":"2023-02-07T20:02:26.8978653Z","result":"ARMED"}
          - Path
            - L2p1
              - Events
                - EXECUTION
                  - L2p1execution = {"dataItemId":"L2p1execution","name":"p1execution","type":"EXECUTION","timestamp":"2023-02-07T20:02:26.7671421Z","result":"UNAVAILABLE"}
              - Conditions
                - SYSTEM
                  - 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":"Interval Error","nativeCode":"500"}]
              - Samples
                - PATH_FEEDRATE
                  - SubTypes
                    - ACTUAL
                      - L2p1Fact = {"dataItemId":"L2p1Fact","name":"p1Fact","type":"PATH_FEEDRATE","subType":"ACTUAL","timestamp":"2023-02-07T20:02:26.7671421Z","result":"UNAVAILABLE"}
        - Assets
          - CuttingTool
            - 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"}]}}

Assets

MTConnect/Assets/[ASSET_TYPE]/[ASSET_ID]

Note: Assets are sent to two topics. One for the "Global" assets and one for the Device that the Asset was added to

Topic Structure

[Node] = (Payload)

- MTConnect
   ─ Assets
      ─ [ASSET_TYPE]
        - [ASSET_ID] = (JSON)

Example

- MTConnect
  - Assets
      - CuttingTool
      - 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"}]}}

More Information

More information can be found in the MQTT-Protocol document (https://github.com/TrakHound/MTConnect.NET/blob/master/docs/MQTT-Protocol.md).

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. 
.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.3. Supports .NET Framework 4.6.1 up to .NET 8

MTConnect.NET-AgentModule-MqttRelay

MTConnect.NET-AgentModule-MqttRelay implements MQTT with MTConnect to publish to an external broker. Supports MTConnect Versions up to 2.3. Supports .NET Framework 4.6.1 up to .NET 8

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.3. Supports .NET Framework 4.6.1 up to .NET 8

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.3. Supports .NET Framework 4.6.1 up to .NET 8

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.3. Supports .NET Framework 4.6.1 up to .NET 8

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.5.1 422 12/3/2024
6.5.0 762 10/21/2024
6.4.7 908 8/21/2024
6.4.6 572 8/7/2024
6.4.5 262 8/2/2024
6.4.4 513 7/16/2024
6.4.3 504 6/14/2024
6.4.2 351 6/12/2024
6.4.1 545 5/17/2024
6.4.0 311 5/14/2024
6.3.2-beta 255 5/2/2024
6.3.1-beta 460 4/24/2024
6.3.0-beta 255 4/17/2024
6.2.2-beta 288 4/5/2024
6.2.1-beta 269 4/3/2024
6.2.0-beta 277 3/27/2024
6.1.3-beta 296 3/15/2024
6.1.2-beta 295 3/15/2024
6.0.11-beta 543 2/2/2024
6.0.10-beta 456 1/26/2024
6.0.9-beta 545 12/28/2023
6.0.8-beta 523 12/27/2023
6.0.7-beta 557 12/19/2023
6.0.5-beta 608 12/14/2023
6.0.3-beta 647 12/12/2023
6.0.1-beta 691 12/7/2023
5.4.4 289 6/6/2023
5.4.3 216 5/20/2023
5.4.1 339 3/28/2023
5.4.0 327 3/20/2023
5.3.0 336 3/14/2023
5.2.0 370 3/5/2023
5.1.0 355 3/3/2023
5.0.0 389 2/3/2023
4.6.0 565 11/28/2022
4.5.0 597 10/18/2022