MergenHub Envest
Home/Docs/Modules

Data Bridge (IoT gateway)

REST server, REST client and MQTT client agents; payload formats; Kepware-compatible endpoints.

The Data Bridge (formerly IoT Gateway) moves data out of MergenHub to clouds, brokers and third-party systems, and lets simple HTTP clients read or write tags without OPC UA. It runs as its own Windows service (MergenHubDataBridge), so a slow cloud endpoint can never affect scanning.

Extensions › Data Bridge — agent list and the agent editor
Extensions › Data Bridge — agent list and the agent editor

Agents

AgentDirectionWhat it does
REST serverinboundKepware-compatible HTTP endpoints (/iotgateway/read, /iotgateway/write, /iotgateway/browse) with the same JSON shapes as Kepware's IoT Gateway, so existing integrations work unchanged
REST clientoutboundPushes selected tags to a URL (POST/PUT) on change or on a schedule; JSON/XML/CSV/key-value formats; custom headers and auth
MQTT clientoutboundPublishes selected tags to a broker (QoS, retain, TLS, username/password or certificate); JSON payloads, one topic per tag or grouped; optional Sparkplug-style templates

Each agent has its own tag list, publish rate, on change / deadband filters and a status page with counters and the last error.

REST server quick start

  1. Add a REST server agent, choose the tags, allow writes if needed.
  2. Log in (session cookie or API token) and read:
curl -b c.txt "http://localhost:8090/iotgateway/read?ids=Plant.PLC1.Flow&ids=Plant.PLC1.Pressure"
{"readResults":[{"id":"Plant.PLC1.Flow","s":true,"r":"","v":412.6,"t":1757067641008}, …]}
  1. Write (when allow write is on):
curl -b c.txt -X POST http://localhost:8090/iotgateway/write -H "Content-Type: application/json" \
     -d '[{"id":"Plant.PLC1.Setpoint","v":55}]'

MQTT client quick start

  • Broker mqtt://broker.example.com:1883 (or mqtts:// with TLS), client id, credentials.
  • Topic template such as plant/{channel}/{device}/{tag} or a single topic with a JSON array.
  • Publish mode: on change (with deadband) or every N ms.
  • Payload example:
{"id":"Plant.PLC1.Flow","v":412.6,"q":"Good","t":"2026-09-05T10:20:41.008Z"}

Reliability

  • Agents buffer when the destination is down and flush when it returns (store-and-forward in memory with a bounded queue).
  • The agent status shows connected / retrying and the last error text; failures are also in the Event log.
  • Because the bridge is a separate process, restarting it (Settings › Services) does not interrupt OPC UA or scanning.

Security notes

  • The REST server uses the same users, tokens and resource ACL as the main API; only tags the user may read are returned.
  • Prefer HTTPS and API tokens for external systems; never expose the web port without TLS.
  • MQTT: use TLS and per-device credentials on the broker; MergenHub validates the broker certificate unless you disable it for testing.