Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Basic Message Components

Topic 

The topic is published in the format spBv1.0/[Group ID]/[Verb]/[Edge Node ID]/[Device ID] where:

Payload

The payload contains the following :


Note
MQTT Transmission transmitters or the Injector Tag Agents are designed to use the Ignition tag folder hierarchy (Tag Path) in combination with any configured Sparkplug IDs to dynamically build the Group ID, Edge Node Id and Device ID used in the topic.

Payload

The payload contains the following :

  • timestamp
    • The time stamp the payload was created
  • timestamp
    • The time stamp the payload was created
  • metrics
    • An array containing the metrics being published.
    • For each metric parameters include:
    • name
      • Metric name when aliasing not used
      • For Ignition tags this is the tag Tag folder hierarchy not used in the topic namespace when aliasing not used
    • alias
      • Numeric value representing the tag rather than a name metric when aliasing is used
    • timestamp
      • Timestamp associated with the last tag metric change event
    • dataType
      • DataType associated with the tagmetric
    • isHistorical
      • Set to True to denote the metric represents a historical value
    • isTransient
      • Currently not used by MQTT Modules
      • Set to null
    • metaData
      • Used for customisation on top of the Sparkplug B protocol
      • Used by MQTT Modules for file transfers and custom decoding information for the metric
    • properties
      • Used for Ignition tag properties. See the Ignition

      • Included in BIRTH messages if tag Meta Data (Tooltip and Documentation) has changed from Ignition defaults
      properties
      • See the Ignition Tag Properties reference for all available properties.
      • Included in BIRTH messages if they values have been changed from the Ignition default or if they are custom properties. 

        Tip
        Cirrus Link modules often optimise payloads by excluding Good metric qualities from a payload. If the Quality property is not included, the quality of the tag data is considered payload is missing the quality property, it should be considered to be Good


    • value
    • isNull
      • Boolean Flag denoting the metric has a null value
  • seq
    • The message sequence number used to ensure that messages are processed in the correct order
  • uuid
    • Currently not used by MQTT Modules
    • Set to null
  • body
    • Currently not used by MQTT Modules
    • Set to null
Note
Where a parameter is not specific to the metric being published, it is set to null

Examples

Anchor
NBIRTH
NBIRTH
NBIRTH

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NBIRTH/TestEdge

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload Metrics (Examples)

Metric [name=Node Control/Next Server, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false]

Metric [name=Node Info/Transmission Version, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=null, properties=null, value=4.0.22-SNAPSHOT (b2024041611), isNull=false]

Metric [name=bdSeq, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=2, isNull=false]

Metric [ name=Motor, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=03081691ee14510415e1036a4d1f416d, description=], properties=PropertySet [propertyMap={}], value=Template [version=, templateRef=, isDefinition=true, metrics=[Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value=null, isNull=true]], parameters=[]], isNull=false]

Metric [name=E_T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engLow=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=1.0, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=false, isNull=false]}], value=null, isNull=true]

Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engUnit=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=RPM, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false]}], value=null, isNull=true]], parameters=[]], isNull=false]


Anchor
DBIRTH
DBIRTH
DBIRTH

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NBIRTHDBIRTH/TestEdge/TestDevice


Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=D_T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=192, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false], documentation=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=Some helpful docs, isNull=false]}], value={ "Key1": "Value3" }, isNull=false], Metric [name=Device Control/Rebirth, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false], Metric [name=D_M1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engHigh=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=60.0, isNull=false]}], value=12, isNull=false]], parameters=[]], isNull=false]], seq=1, uuid=null, body=null]

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload Metrics (Examples)

Metric [name=Device Control/Rebirth, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false]

Metric [name=D_T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=192, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false], documentation=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=Some helpful docs, isNull=false]}], value={ "Key1": "Value3" }, isNull=false]

Metric [name=D_M1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engHigh=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=60.0, isNull=false]}], value=12, isNull=false]], parameters=[]], isNull=false]]

Anchor
NDATA
NDATA
NDATA

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NDATA/TestEdge

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload Metrics (Examples)

Metric [name=E_M1, alias=null, timestamp=1713266452937, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445706, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false]

Metric [name=E_T1, alias=null, timestamp=1713266452939, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]]

Anchor
DDATA
DDATA
DDATA

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/DDATA/TestEdge/TestDevice

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload 2 Metrics (Examples)

Metric [name=D_M1, alias=null, timestamp=1713266452942, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445725, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false]

Metric [name=D_T1, alias=null, timestamp=1713266452947, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]]

Anchor
NDEATH
NDEATH
NDEATH

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NDEATH/TestEdge

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=bdSeq, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=2, isNull=false]], seq=7, uuid=null, body=null]

Anchor
DDEATH
DDEATH
DDEATH

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/DDEATH/TestEdge/TestDevice

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=bdSeq, alias=null, timestamp=1713266442358, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=5, isNull=false]], seq=7, uuid=null, body=null]

Anchor
NCMD
NCMD
NCMD

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NCMD/TestEdge

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266761298, metrics=[Metric [name=ET1, alias=null, timestamp=1713266730315, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=5, isNull=false]], seq=15, uuid=null, body=null]

Anchor
DCMD
DCMD
DCMD

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/DCMD/TestEdge/TestDevice

...

Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266761298, metrics=[Metric [name=DT1, alias=null, timestamp=1713266785263, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=25, isNull=false]], seq=12, uuid=null, body=null]

Anchor
STATE
STATE
STATE

Note

Sparkplug™ B payloads are not used for encoding in this payload and this allows Host/backend application(s) to work across Sparkplug™ payload types.

...