Skip to content

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

License

Notifications You must be signed in to change notification settings

Patrick2607/SparkplugNet

 
 

Repository files navigation

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

All Contributors

Available for

  • NetStandard 2.0
  • NetStandard 2.1
  • Net 6.0
  • Net 7.0

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.

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

Recommended brokers

Recommended clients

Supported Sparkplug standards

  • Version 1.3.0 and above: Sparkplug, version 3.0, spBv1.0.
  • Version 1.2.0 and below: Sparkplug, version 2.2, spAv1.0 and spBv1.0.

Special notes

  • 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)
  • Although it's not required to publish a BDSEQ metric with all messages according to the specification, this library includes it in any spBv1.0 message except the state messages in versions up to 1.0.0 because I think it's useful. From version 1.1.0 on, this behaviour can be controlled by setting AddSessionNumberToCommandMessages in the application options and AddSessionNumberToDataMessages in the node options.
  • The library uses Serilog for logging purposes because it's very extendable (Log.Logger or similar stuff in the examples refers to the Serilog library).

Further resources

Change history

See the Changelog.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

HansM
HansM

💻 📖 💡 🚧 📆 ⚠️
insightdocs
insightdocs

⚠️
OffTravel
OffTravel

💻 ⚠️
cjmurph
cjmurph

💻 ⚠️
Bo Biene
Bo Biene

💻 ⚠️
Tim Jöhnk
Tim Jöhnk

💻
Patrick.GK
Patrick.GK

💻 ⚠️ 🚇
Gerald Asp
Gerald Asp

⚠️ 💻

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.8%
  • Batchfile 0.2%