spb-gateway is a server process that connects to MTConnect agents and streams data from the agents to Sparkplug B's MQTT broker.
Usage:
spb-gateway [config file - default is spb-gateway.cfg]
# MTConnect agents information
agents:
- name: Mazak
url: https://demo.metalogi.io/Mazak
freq: 1
- name: Okuma
url: https://demo.metalogi.io/OKUMA
freq: 1
logging:
# serverity can be debug, info, warn, error or off, default is info
severity: info
# Sparkplug B's MQTT server and its MQTT port #
server:
#
#
# mqtt connect info
# cacert : <location of CA certificate file. Format: PEM>
# cert : <location of certificate file. Format: PEM>
# key : <location of key file. Format: PEM>
#
mqtt : ignition.metalogi.io
port : 1883
user : demo
password : demo
#
# additional optional connect info
# clientId : <mqtt session's client id>
# keepAlive : <PINGREQ interval, default is 30>
#
# SparkPlug B info
groupId : MTConnect Devices
edgeNodeId : Metalogi Node
# licenseKey: <your license key - default is demo mode if not provided>
agents
name / url / frequency
: Specify the MTConnect agent's URL and how often to poll the data.server
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-gateway\spb-gateway spb-gateway.cfg
Metalogi MetaAgent - SparkPlugB/MTConnect Gateway 2.2.0.1 - built on Tue Feb 21 23:46:54 2023
[2023-10-29T10:14:30] info Settings are loaded from spb-gateway.cfg
[2023-10-29T10:14:30] info Product SparkPlugB <=> MTConnect is licensed
[2023-10-29T10:14:30] info Agent Uri: https://demo.metalogi.io/Mazak
[2023-10-29T10:14:30] info Poll Interval: 1
[2023-10-29T10:14:30] info Device Id: Mazak
[2023-10-29T10:14:30] info Agent Uri: https://demo.metalogi.io/OKUMA
[2023-10-29T10:14:30] info Poll Interval: 1
[2023-10-29T10:14:30] info Device Id: Okuma