Sparkplug Edge Node

The Edge Node tag does all the work to prepare data for an MQTT server. It collects data from sensors or Edge Devices, formats it using the Sparkplug B naming and formatting protocol and publishes it to the MQTT server.

Edge Node tag RPC Service

For server configuration, the Edge Node has an RPC Service. As with other RPC Manager Services, a server list can be specified for the Edge of Node tag as opposed to the default server list. The first server listed will be the primary; Only the primary will handle the writes/reads and dissemination of information to the redundant servers. The RPCServerName of the Edge Node is automatically produced as soon as a name is applied to the Edge of Node tag. It will resemble the name of the tag (ex. If the tag is called Well1EON1 and is a child of context tag Well1 the RPCServerName may be Well1\Well1EON1)

As with other redundant server configurations, should the primary server fail, the next server on the list will become the new primary.

Sparkplug Edge Node properties Connection tab

Establish or edit the Edge Node ID, Group ID, MQTT Client ID. Specify Keep Alive time, reconnect attempts, max DDATA publish count and timeout limit. Toggle on tracing for troubleshooting or start publishing.

The topics namespace for Sparkplug B has the following format:
namespace/group_id/message_type/edge_node_id/[device_id]
Edge Node ID and Group ID are identified in this properties dialog. Note that topic names are case-sensitive.

Sparkplug Edge Node ID

Auto-generated unless specified. By default, this ID will include any parent tags and the tag name with the slash (/) substituted with two underscores (__) to keep the ID unique. For example, Edge Node tag "EoN1" appearing under context tag "Weather Station" will auto-generate the Sparkplug Edge Node ID "Weather Station__EoN1".

Group ID

Auto-generated unless specified. Part of the topics namespace for Sparkplug B.

MQTT Client ID

Auto-generated unless specified. This value is only used by the MQTT broker when establishing a connection. It may be useful to know this value if you are troubleshooting.

Sparkplug B SCADA Host ID

Optional. If you name a Sparkplug B SCADA Host ID then this Sparkplug Edge Node tag will only publish if the specified host is online.

Keep Alive (s)

The length of time to maintain an open connection between ping requests.

Reconnect Attempts

The number of times the Edge Node will try to connect to a server before it gives up and moves to the next specified server.

Maximum Active DDATA Publish Count

The maximum number of MQTT publish messages carrying DDATAClosed 2-Factor Authentication. that are in flight at any point in time. This limits the number of Publish modules taking up memory and CPU resources and is useful when the application is publishing DDATA at very high rates. It does limit the publishing rate but could keep the app responsive and give other modules the chance to execute. A buffering algorithm goes through the devices in a round-robin fashion and queues a single DDATA for a device if one is available.

It is a best practice for the Maximum Active DDATA Publish Count to equal the number of devices attached to the node. This way, all devices get a chance to publish. In a system with a high publishing rate, the larger this number the bigger the risk of overloading the stack and network.

Timeout Limit (s)

The period of time in seconds before we give up on an MQTT message.

Write Command Buffer Size

Defines the maximum number of write commands that each attached tag can buffer simultaneously. This setting applies to all tags attached to the same Edge of Node (EoN) tag. The minimum buffer size is 2.

Allow Incoming Write Commands

Enables the Edge Node tag to receive, process, and execute NCMD write commands.

Start Tracing

This should only be enabled when necessary for debugging, detailed analysis and identifying bottlenecks. Tracing is a logging tool designed to track and record operational data within the publisher.

Start Publishing

You must enable this to publish. Disabled by default so the full architecture, all Edge Device tags and I/O and Calculations device tags, can be configured before you start publishing. Every time this tag is enabled it publishes NBIRTHClosed Birth certificate for Sparkplug Edge Nodes and every time it is disabled it will publish NDEATHClosed Death certificate for Sparkplug Edge Nodes.

Sparkplug Edge Node properties Server tab

Select number of servers for redundancy or performance. Configure credentials and link a communications tag.

Number of Servers

Specify up to five servers. These servers are typically for redundancy. It is possible to configure a node command to change servers if the current server is performing too slowly.

Server

Click on the server you want to specify by default.

Configuration - Username

If your MQTT broker requires a username, specify it here.

Configuration - Password

If your MQTT broker requires a password, specify it here.

Configuration - Hash Password with MD5

You may enable this option to hash the MQTT broker password with MD5.

Configuration - Port

Specify the TCP/IP port tag you have configured for your MQTT communications.