Sparkplug Decode
The Sparkplug specification version 3.0 requires all payloads to be sent in a
standardised Protobuf format. This is very efficient in bandwidth use, but is
not human readable. The Sparkplug Decode plugin automatically decodes all
Sparkplug messages arriving on topics matching spBv1.0/#
, decodes them into
JSON and republishes them to spJv1.0/#
.
broker to be usable for Sparkplug.
This provides a human readable version of each message, which is useful for
observation and debugging. Only valid Sparkplug messages will be forwarded and decoded to the spJv1.0/#
topic, while all others will be ignored.
The JSON schema used is from First draft of Sparkplug B JSON schema, however it is important to note that this feature is not currently supported by Sparkplug. It is possible that a standard JSON payload for Sparkplug may appear in the future, at which point the output of this plugin may be incompatible. For this reason it is recommended that you do not build your device management on the JSON output but use it only for observation and debugging.
Plugin Activation
To enable the plugin it must be loaded into the broker with, by adding the
following to your mosquitto.conf
:
global_plugin /usr/lib/cedalo_sparkplug_decode.so
There is no further configuration required.