Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
separatorpipe
printabletrue

...

The application is passive by design. For example, if the application has not observed a DBIRTH or NBIRTH message for a DDATA, a REBIRTH request will NOT be sent unless the user manually instigates that through the menu.

Info

Sparkplug Viewer V3B V4B is currently an open beta.

...

  • Anonymous

  • Server Authentication

  • Client Authentication

Broker Connection

Click Client > Connect > New Connection. You may also save and re-open your connection from file later if desired.

...

If the connection to your broker is lost, the application will retry that connection according to your Keep Alive value until you click Disconnect.image-20241025-190713.pngImage Removed

...

Broker Address
Configure an IP or hostname to connect to.

...

Subscribe To
Configure one or more topics to subscribe to. The most commonly used topics at time of writing are defaults. You may right left click a topic and choose to remove press the delete key to delete it if desired. To add a topic, type the topic name in the box and click the Add button.image-20241025-191038.pngImage Removedbottom row of the grid. You may choose a QoS between 0 and 2 for each topic.

Info

Some brokers are very sensitive to which topics they will permit clients to connect and subscribe to. Choosing a topic space or QoS level that is not appropriate for your broker configuration may result in an MQTT authentication error and disconnect.

...

Client ID
Provide a specific Client Id or accept a random Client Id (click button to generate a unique Id).

...

Clean Session
Opt into a clean session or not, with regard to MQTT.

Message Limit

The message limit is the maximum number of topics and payloads that will display at a time in the message list on the right side of the window. When the limit is reached, the oldest message will be cycled out of the display.

image-20241025-191432.png

Use Username/Password
If checked, the application will present the specified username and password to broker when connecting.image-20241025-191611.pngImage Removed

...

Enable TLS
Use the highest version of TLS available on the system to connect to the broker.

Verify Certificate ChainBroker Cert
Validate the server certificate presented by the broker before establishing a connection.
CA certificates in the Windows certificate store will be considered.
The CA certificates(s) in the CA Certificate box on this page will be considered if specified.

Suppress Hostname/IP Check

If checked, Sparkplug Viewer will still allow the TLS handshake to continue even though the broker’s certificate may be inauthentic for one of these reasons:

  • No CN (Common Name) in the Subject field that matches either the hostname or IP that Sparkplug Viewer is connecting to the broker at. Not required if there is a SAN (see next bullet point).

  • No SAN (Subject Alternate Name) extension that matches either the hostname or IP that Sparkplug Viewer is connecting to the broker at. Not required if there is a CN in the subject that has the IP or hostname (see previous bullet point).

  • The IP or hostname provided in either the CN or SAN does not match the IP or hostname that the Broker Address provided to Sparkplug Viewer. NOTE: This may not necessarily be the broker itself if there is some kind of TCP port forwarding in place, in which case you will need to suppress the error to connect.

Suppress Certificate Chain Check

If checked, Sparkplug Viewer will still allow the TLS handshake to continue even though the broker’s certificate chain may contain errors.

Client Certificate/Client Key
If the broker expects client authentication and you are using an X509 Certificate + Private Key file to authenticate, reference the file here. For the private key, PKCS8 format is expected. Both encrypted (specify a password in the box) or unencrypted keys (omit the password in the box) are supported.

...

Once a BIRTH message has be observed while the application is running, <NO NAME-n> will be replaced with the name of the metric.

...

Data View

In the pane on the right side of screen there is a Data view where you can inspect messages.

...

Enter the name of the Group and Edge Node and a click Send NCMD Rebirth. Example:

...

Plaintext MQTT

In the menu on the top left of the screen you can also publish Plaintext MQTT messages.

...

Click Client > Write > MQTT and provide the Topic and UTF8 payload contents in order to publish a plaintext payload. You may set Retain and QoS if desired.

...

Write to Metric

Inside of the Metric View you can right click on a Metric’s name (first column) and choose to write to a metric. Frequently it is useful to write to either a Device Metric (under EoN Devices) or an Edge Node Metric (under EoN Metrics). Right click the desired metric in the view and select the Write to Metric button. Fill in the desired value and choose Write.

...

Writing to a device metric will instigate an MQTT publish to topic spBv1.0/{GROUPID}/DCMD/{NODEID}/{DEVICENAME} i.e.

spBv1.0/TX/DCMD/GALV/G5

With a binary payload expressed in structured text similar to:

Code Block
{
  "timestamp": "1740082321586",
  "metrics": [
    {
      "alias": "7",
      "timestamp": "1740082321586",
      "datatype": 9,
      "floatValue": 1
    }
  ]
} 

If you check the box Force Write by Name, the name of the metric will be used in place of the alias integer.

...

Example payload rendered in structured text:

Code Block
{
  "timestamp": "1740082601750",
  "metrics": [
    {
      "name": "DPLOWLIMIT",
      "timestamp": "1740082601750",
      "datatype": 9,
      "floatValue": 1.1
    }
  ]
}

Disconnect

You may click Client > Disconnect to disconnect or just close the application when finished.

...