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 [Namespace]/[Group ID]/[Message Type]/[Edge Node ID]/[Device ID] where:

  • Namespace
    • This always begins with “spBv1.0” to indicate that the topic is using the Sparkplug B version 1.0 specification. This serves as an identifier for the protocol version being used, as well as the encoding used for the associated payload data
  • Group ID

    • This identifies a logical grouping of Edge nodes and devices. For example, you might use a group ID to represent a particular factory or plant location. It ensures data segregation between different groups, aiding in efficient data management and security.

  • Message Type
  • Edge Node ID
    • This uniquely identifies a specific edge node within in a group. Edge nodes are responsible for reporting data on behalf of devices they control or are connected to. The Edge Node ID helps in directing commands to the correct node and segregating data from various nodes.
  • Device ID (Optional)
    • If the message relates to a specific device controlled by the edge node, the device ID uniquely identifies that device.

Payload

The payload contains the following :

  • timestamp
    • The time stamp the payload was created
  • metrics
    • An array containing data specific to the message type being published
    • Parameters include:
      • name
        • Set to null in DATA messages if aliasing used
      • timestamp
      • dataType
      • value
      • alias
        • Set to null in BIRTH
        • Set to null in DATA messages if aliasing not used
      • isHistorical
        • Flag denoting the metric represents a historical value
        • Set to null for live data and True for historical data 
      • isTransient
        • Flag denoting the metric is a transient value
        • Set to null 
      • isNull
        • Flag denoting the metric has a null value
      • metaData
        • Included in BIRTH messages
        • Includes Tooltip and Documentation if they have been changed from the Ignition default. See the Ignition Tag Properties reference for all available properties.
      • properties
        • The Quality property
          • May be included in BIRTH and DATA messages
          • If the Quality property is not included, the quality of the tag data is considered Good. See the Ignition Tag Quality Code Reference for the Data Quality value reference
        • Additional property values
          • Included only in BIRTH messages
          • Included if they have been changed from the Ignition default or if they are custom properties. See the Ignition Tag Properties reference for all available properties.
  • seq
    • The message sequence number used to ensure that messages are processed in the correct order
  • uuid
    • Set to null
  • body
    • Set to null


Examples

Anchor
NBIRTH
NBIRTH
NBIRTH

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/TestGroup/NBIRTH/TestEdge


Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

[timestamp=1713266473578, metrics=[ 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=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=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=E_M1, 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=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=false, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[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], Metric [name=Node Control/Rebirth, 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]], seq=0, uuid=null, body=null]


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/NBIRTH/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

[timestamp=1713266453938, metrics=[ 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]], seq=6, uuid=null, body=null]


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 1

[timestamp=1713266761298, metrics=[Metric [name=DT1, 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], Metric [name=DT1, alias=null, timestamp=1713266730416, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=6, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730516, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=7, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730617, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=8, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730718, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=9, isNull=false]], seq=15, uuid=null, body=null]


Panel
borderColorblack
borderStylesolid
titleSparkplug Payload 1 Metrics (Examples)

Metric [name=DT1, 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]

Metric [name=DT1, alias=null, timestamp=1713266730416, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=6, isNull=false]

Metric [name=DT1, alias=null, timestamp=1713266730516, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=7, isNull=false]


Panel
borderColorblack
borderStylesolid
titleSparkplug Payload 2

[timestamp=1713266453943, metrics=[ 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]], seq=7, uuid=null, body=null]


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

Panel
borderColorblack
borderStylesolid
titleSparkplug Topic

spBv1.0/STATE/primary_host_id


Panel
borderColorblack
borderStylesolid
titleSparkplug Payload

{ "online" : true,  "timestamp" : 1668114759262} 

or

{ "online" : true,  "timestamp" : 1668114759452}