spb-sink-plugin
is a Sparkplug B interface provider plugin for MTConnect Agents. The plugin streams data from the agent to Sparkplug B's MQTT broker.
Please visit the Eclipse Sparkplug Working Group website for setup info.
Devices = _metaagent_.xml
Port = 7979
Adapters
{
Mazak
{
Host = demo.metalogi.io
Port = 7879
}
}
Sinks
{
SparkPlugB {
#
# mqtt connect info
#mqtt = <mqtt server hostname or ip>
#port = <mqtt server port #>
#user = <user id>
#password = <password>
mqtt = ignition.metalogi.io
port = 1883
user = demo
password = demo
#
# Secured connection info
# useTLS = [true, false] default is false
# cacert = <location of CA certificate file. Format: PEM>
# cert = <location of certificate file. Format: PEM>
# key = <location of key file. Format: PEM>
#
# additional optional connect info
# clientId = <mqtt session's client id>
# keepAlive = <PINGREQ interval, default is 30>
#
# Sparkplug B info
#
# The Ignition tags are constructed under Edge Nodes / <groupId> / <edgeNodeId>
#
groupId = MTConnect Devices
edgeNodeId = Metalogi Node
# licenseKey = <your license key - default is demo mode if not provided>
# override logger config
logger_config {
output = file spb-sink.log
level = info
}
}
}
mqtt
: MQTT server's hostname or IP address.port
: MQTT server's port number.user/password
: User/Password login for the MQTT server.clientId
: This clientId appended with a generated UUID establishes the MQTT session.keepAlive
: Send a PINGREQ every <keepAlive>
seconds.groupId / edgeNodeId
: The Ignition tags are constructed under Edge Nodes / <groupId> / <edgeNodeId>
.useTLS
: Use TLS protocol, default is false.key/cert
: The location of the client certificate and its key file for the secured connection.cacert
: The location of the CA certificate for the secured connection.
C:\Program Files\MetaAgent\examples\spb-sink-plugin>agent run
MTConnect Agent Version 2.2.0.592 - built on Mon Oct 9 22:38:46 2023
[2023-10-29 05:36:00.152367] [0x00000f7c] [trace] Found file 'agent.cfg' in path "C:\\Program Files\\MetaAgent\\examples\\spb-sink-plugin"
[2023-10-29 05:36:00.152367] [0x00000f7c] [info] Loading configuration from: "C:\\Program Files\\MetaAgent\\examples\\spb-sink-plugin\\agent.cfg"
Loading configuration from:"C:\\Program Files\\MetaAgent\\examples\\spb-sink-plugin\\agent.cfg"