SparkplugNet 1.5.0

Prefix Reserved
dotnet add package SparkplugNet --version 1.5.0
                    
NuGet\Install-Package SparkplugNet -Version 1.5.0
                    
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="SparkplugNet" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SparkplugNet" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="SparkplugNet" />
                    
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 SparkplugNet --version 1.5.0
                    
#r "nuget: SparkplugNet, 1.5.0"
                    
#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 SparkplugNet@1.5.0
                    
#: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=SparkplugNet&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=SparkplugNet&version=1.5.0
                    
Install as a Cake Tool

SparkplugNet

SparkplugNet is a library to use the Sparkplug industrial IoT (IIoT) standard in .Net. It uses MQTTnet in the background.

Build status GitHub issues GitHub forks GitHub stars License: MIT Nuget NuGet Downloads Known Vulnerabilities Gitter Blogger Patreon PayPal

All Contributors

Available for

Net Core and Net Framework latest and LTS versions

Structure

Sparkplug distinguishes between 5 different types of logical parts:

Part Description
Primary application The main application that needs to be always available to work with the data and store metrics.
Applications Other applications that work with the sent data and metrics.
EoN nodes (Later only called nodes) Logical devices that bundle data from end-of-network devices and publish their data.
MQTT enabled devices Sensors that work as a "hybrid" version of a node and a device and publish metrics and data.
Non MQTT-enabled devices Sensors that push data to nodes where the nodes publish their data to MQTT on their behalf.

Basic usage

For basic usage, see the How to use file or the example project.

To read and write Sparkplug B metrics as JSON, use the JSON extension.

Requirements

  • MQTT broker that implements 100% of the MQTT 3.1.1 specification
  • MQTT broker with QoS 0 and 1 support
  • MQTT broker with retained messages support
  • MQTT broker with last will and testament support
  • MQTT broker with a flexible security system
  • MQTT.fx has a Sparkplug data decoder. The binaries for version 1.7.1 can also be taken from https://github.com/SeppPenner/mqttfx171-backup (The software is now under development by a company and requires a license for version 1.7.1+).
  • mqttMultimeter for general MQTT debugging. I guess, a Sparkplug decoder could be added once this library here is up-to-date.
  • MQTTExplorer for general MQTT debugging.

Supported Sparkplug standards

  • Version 1.3.0 and above: Sparkplug, version 3.0, spAv1.0 (Marked as obsolete) and spBv1.0.
  • Version 1.2.0 and below: Sparkplug, version 2.2, spAv1.0 and spBv1.0.

Special notes

  • Version 1.4.0 moves to MQTTnet 5. The MQTTnet.Client namespace no longer exists, so the MqttClientTlsOptions and MqttClientWebSocketOptions handed into the Sparkplug options now come from the MQTTnet namespace. (BREAKING)
  • Version 1.3.4 renames all events from SomethingAsync to Something. (BREAKING)
  • Version 1.1.0 introduces the async event pattern and deprecates the "old, synchronous" events, Version 1.2.0+ will remove the old events completely. (BREAKING)
  • You can enable the global setting SparkplugGlobals.UseStrictIdentifierChecking which prevents users from using the following chars in identifiers:
.,\@#$%^&*()[]{}|!`~:;'"<>?

Further resources

Change history

See the Changelog.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://franzhuber23.blogspot.de/"><img src="https://avatars.githubusercontent.com/u/9639361?v=4?s=100" width="100px;" alt="HansM"/><br /><sub><b>HansM</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=SeppPenner" title="Code">💻</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=SeppPenner" title="Documentation">📖</a> <a href="#example-SeppPenner" title="Examples">💡</a> <a href="#maintenance-SeppPenner" title="Maintenance">🚧</a> <a href="#projectManagement-SeppPenner" title="Project Management">📆</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=SeppPenner" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/insightdocs"><img src="https://avatars.githubusercontent.com/u/23101485?v=4?s=100" width="100px;" alt="insightdocs"/><br /><sub><b>insightdocs</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=insightdocs" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/OffTravel"><img src="https://avatars.githubusercontent.com/u/19183574?v=4?s=100" width="100px;" alt="OffTravel"/><br /><sub><b>OffTravel</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=OffTravel" title="Code">💻</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=OffTravel" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cjmurph"><img src="https://avatars.githubusercontent.com/u/2868949?v=4?s=100" width="100px;" alt="cjmurph"/><br /><sub><b>cjmurph</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=cjmurph" title="Code">💻</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=cjmurph" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/BoBiene"><img src="https://avatars.githubusercontent.com/u/23037659?v=4?s=100" width="100px;" alt="Bo Biene"/><br /><sub><b>Bo Biene</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=BoBiene" title="Code">💻</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=BoBiene" title="Tests">⚠️</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/TimJoehnk"><img src="https://avatars.githubusercontent.com/u/93274944?v=4?s=100" width="100px;" alt="Tim Jöhnk"/><br /><sub><b>Tim Jöhnk</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=TimJoehnk" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Patrick2607"><img src="https://avatars.githubusercontent.com/u/9799823?v=4?s=100" width="100px;" alt="Patrick.GK"/><br /><sub><b>Patrick.GK</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=Patrick2607" title="Code">💻</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=Patrick2607" title="Tests">⚠️</a> <a href="#infra-Patrick2607" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/geraldasp"><img src="https://avatars.githubusercontent.com/u/1334535?v=4?s=100" width="100px;" alt="Gerald Asp"/><br /><sub><b>Gerald Asp</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=geraldasp" title="Tests">⚠️</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=geraldasp" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/adityashahazilen"><img src="https://avatars.githubusercontent.com/u/132545158?v=4?s=100" width="100px;" alt="adityashahazilen"/><br /><sub><b>adityashahazilen</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=adityashahazilen" title="Tests">⚠️</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=adityashahazilen" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/shouidar"><img src="https://avatars.githubusercontent.com/u/10144958?v=4?s=100" width="100px;" alt="shouidar"/><br /><sub><b>shouidar</b></sub></a><br /><a href="https://github.com/SeppPenner/SparkplugNet/commits?author=shouidar" title="Tests">⚠️</a> <a href="https://github.com/SeppPenner/SparkplugNet/commits?author=shouidar" title="Code">💻</a></td> </tr> </tbody> </table>

This project follows the all-contributors specification. Contributions of any kind welcome!

Product Compatible and additional computed target framework versions.
.NET 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on SparkplugNet:

Package Downloads
Uns.NET-SparkplugB

Uns.NET-Mqtt contains classes for implementing MQTT in a Unified Namespace. Supports .NET 6 up to .NET 8

SparkplugNet.Extensions.Json

JSON converters for Sparkplug B metrics using System.Text.Json or Newtonsoft.Json.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 66 11/22/2026
1.4.1 1,374 8/18/2026
1.4.0 45 11/22/2026
1.3.10 72,637 7/2/2024
1.3.9 360 7/2/2024
1.3.8 4,131 4/15/2024
1.3.7 487 3/27/2024
1.3.6 441 3/24/2024
1.3.5 371 3/21/2024
1.3.4 492 3/4/2024
1.3.3 409 3/3/2024
1.3.2 3,449 2/10/2024
1.3.1 727 1/5/2024
1.3.0 513 12/18/2023
1.2.0 9,548 11/20/2022
1.1.1 675 10/30/2022
1.1.0 1,624 10/4/2022
1.0.0 990 8/3/2022
0.7.0 1,129 3/24/2022
0.6.0 693 2/18/2022
Loading failed

Version 1.4.1.0 (2026-08-18): Moved to MQTTnet 5.2 (BREAKING), removed support for Net9.0, added support for Net10.0, updated NuGet packages, fixed the conversion of UInt32 metrics, fixed the identifier check for strict identifier checking, fixed reading incoming payloads, fixed the eclipse_tahu submodule.