Connectivity & Integrations
OpenMES links your factory machines to your business software. Connect PLCs, CNCs, sensors, and SCADA systems using MQTT, Modbus, and OPC UA. Then send production events to other platforms with webhooks and REST API tokens. This guide covers every connectivity feature – from broker setup to ERP modules – so you can build a fully connected digital factory.
Machine Connectivity Overview
The Connectivity module is your control center for all machine-to-MES communication. You can see every connection at a glance. Each one shows the protocol type (MQTT, Modbus, OPC UA), connection name, host and port, status (Connected, Disconnected, Error), and the last data exchange time. Every connection card has buttons to edit settings, test the link, or watch live data.
Factories need real-time data. Without a solid data link from machines to your MES, managers must rely on manual counts, paper logs, and late reports. OpenMES removes that delay. It reads machine data every fraction of a second, cleans up the values, and sends them to dashboards, OEE calculations, and automated alerts.
A food plant has older Modbus filling machines and new MQTT packaging robots. OpenMES connects to both at the same time. It pulls fill-level data from Modbus and cycle counts from MQTT into one dashboard. Supervisors see every line in a single view – no matter which protocol the machine uses.
MQTT – Publish / Subscribe Messaging
MQTT (Message Queuing Telemetry Transport) is a small, fast messaging protocol. It works great on devices with limited power and slow networks. That makes it perfect for IoT sensors, edge gateways, and modern factory equipment. OpenMES acts as an MQTT client. It listens to topics that your machines or edge devices publish.
Broker Configuration
To set up an MQTT connection, navigate to Connectivity → Add Connection → MQTT. You will need to provide:
| Field | Description | Example |
|---|---|---|
| Connection Name | A friendly name for this broker link | Plant-A Edge Gateway |
| Broker Host | IP address or hostname of the MQTT broker | 192.168.1.50 |
| Port | TCP port (1883 by default, or 8883 for TLS) | 1883 |
| Username / Password | Login details if the broker needs them | mes_client / •••• |
| Client ID | A unique name for this MES client on the broker | openmes-plant-a |
| Use TLS | Turn on encryption (recommended for production) | Yes |
Topic Subscriptions & Data Mapping
After connecting, you pick which MQTT topics OpenMES should listen to. Each topic maps to a data point on a specific workstation. For example, the topic factory/line-3/press-01/cycle_count maps to the "Cycle Count" point on workstation "Press 01" in Line 3. OpenMES supports wildcards (+ for one level, # for many levels), JSON parsing with JSONPath, and auto data-type conversion (integer, float, boolean, string).
Every incoming message gets a timestamp and is saved. This data feeds the Machine Monitor dashboard. It also triggers alerts when values go past set limits – for example, temperature above 85 C fires a warning.
An electronics assembly line has an edge gateway. It collects data from 12 pick-and-place machines and sends JSON messages to one MQTT broker. OpenMES subscribes to factory/smt/# and uses JSONPath to pull out placement counts, feeder errors, and nozzle temperatures. Each value maps to the right workstation point. Engineers get instant alerts when feeder jams hit 3 within 10 minutes.
Modbus – TCP and RTU Register Access
Modbus is one of the most common industrial communication protocols. You find it in PLCs, VFDs, power meters, and older automation gear. OpenMES supports both Modbus TCP (over Ethernet) and Modbus RTU (over RS-485 serial). You can read holding registers, input registers, coils, and discrete inputs from almost any Modbus device.
Connection & Register Mapping
When adding a Modbus connection, you pick the transport type (TCP or RTU), the device address (IP:port for TCP, COM port and baud rate for RTU), and the Modbus slave/unit ID. Then you create a register map – a table that tells OpenMES which registers to read and how to understand the raw data:
| Parameter | Description |
|---|---|
| Register Address | Start address (e.g., 40001 for the first holding register) |
| Register Count | How many registers to read in a row (1 for 16-bit, 2 for 32-bit) |
| Data Type | INT16, UINT16, INT32, FLOAT32, BOOL – tells how to read the bytes |
| Byte Order | Big-endian (AB) or Little-endian (BA); for 32-bit: ABCD, CDAB, BADC, DCBA |
| Scale / Offset | Simple math to convert raw values: value = raw * scale + offset |
| Polling Interval | How often to read this register (from 100 ms to 60 s) |
| Mapped Point | The workstation data point this value goes to |
OpenMES groups nearby register reads into single requests to save network traffic. Failed reads are retried with a configurable delay. If reads keep failing, a "Communication Lost" alert appears on the affected workstation.
A metal stamping shop has 8 presses running on Allen-Bradley MicroLogix PLCs from the early 2000s. Each PLC shares cycle count, tonnage, and die temperature over Modbus TCP. OpenMES reads registers 40001–40006 on each PLC every 500 ms. It converts raw INT16 values to real units (tons, degrees C) and shows live press performance on the dashboard. When tonnage goes above the die rating, the maintenance team gets an alert right away.
OPC UA – Unified Architecture for SCADA, DCS & CNC
OPC UA (Open Platform Communications Unified Architecture) is the modern standard for connecting industrial systems. It works on any platform. It has built-in security (encryption, login, signing) and supports complex data types. OpenMES connects as an OPC UA client to any compatible server – Siemens S7, Beckhoff TwinCAT, Fanuc CNC, Mitsubishi MELSEC, Kepware, Ignition, and more.
Server Connections & Node Browsing
To add an OPC UA connection, enter the server endpoint URL (e.g., opc.tcp://192.168.1.100:4840), pick a security policy (None, Basic256Sha256, Aes128Sha256RsaOaep), and add login details if needed. Once connected, OpenMES shows a node browser that mirrors the server's address space. You can browse the tree, check node details (data type, access level, description), and subscribe to nodes with one click. Subscribed nodes are watched all the time – the server sends value changes to OpenMES at a set interval, which uses less network traffic than polling.
Subscriptions for Real-Time Data
OPC UA subscriptions are the best way to get real-time data. Instead of polling, the server only tells OpenMES when a value changes or at a fixed time – whichever comes first. This saves bandwidth and CPU on both sides. You can set the sampling interval (how often the server checks for changes), the publishing interval (how often it sends updates), and deadband filtering (skip tiny changes) to fine-tune data flow for each node.
A machining shop connects 15 Fanuc CNC machines through OPC UA. OpenMES subscribes to spindle speed, feed rate, tool number, program name, and alarm status. The Machine Monitor dashboard shows all 15 machines live. When a CNC goes into alarm, OpenMES creates a downtime event on that workstation right away and sends a notification to the maintenance supervisor.
Machine Monitor – Live Data Dashboard
The Machine Monitor is a live, read-only dashboard. It pulls all machine data together – no matter which protocol – into one view. Each workstation card shows current values, units, sparkline charts (last 15 minutes), and status indicators (normal, warning, critical). The dashboard refreshes every second. It is great for big screens in the production office or on the shop floor.
Supervisors can filter by production line, sort by status (critical first), and click any card to see full data history with interactive charts. The Machine Monitor answers the question every production manager asks: "What are my machines doing right now?"
A 24/7 automotive parts supplier puts a 65-inch screen in the production office. It shows the Machine Monitor filtered to their busiest line. Shift supervisors see right away if any press is down, if temperatures are rising, or if cycle times are slipping. The sparkline charts help them catch slow problems before machines break down.
Webhooks – Outgoing HTTP Callbacks
Webhooks let OpenMES send production events to other systems in real time using HTTP POST requests. Other systems do not need to keep checking the OpenMES API for updates. Webhooks deliver data the moment something happens – a work order is created, a batch is done, or a machine changes state. This is key for building fast integrations with ERP systems, BI platforms, notification services, and custom apps.
Supported Events
| Event | Trigger | Payload Includes |
|---|---|---|
| work_order.created | A new work order is added | Order ID, product, quantity, priority, due date |
| work_order.updated | Any field on a work order changes | Order ID, changed fields (before and after) |
| work_order.completed | All batches done, order closed | Order ID, final quantities (good/scrap), duration |
| batch.started | An operator starts a batch | Batch ID, order ID, workstation, operator |
| batch.finished | Batch hits target or is closed by hand | Batch ID, quantities, cycle times |
| step.started | A routing step begins | Step ID, step name, workstation |
| step.completed | A routing step ends | Step ID, duration, quantities |
| machine.state_change | Machine status changes (running/idle/down) | Workstation ID, old state, new state, reason code |
For each webhook, you set a target URL, pick which events to listen for, add custom HTTP headers if needed (like auth tokens), and set up retries (up to 5 with growing delays). The delivery log shows every sent webhook with HTTP status code, response time, and payload – so troubleshooting is easy.
A furniture maker uses a custom ERP that needs to know when a work order is done to start shipping and invoicing. They set up a webhook on work_order.completed pointing to the ERP's REST endpoint. Seconds after the last batch finishes on the shop floor, the ERP gets the final quantities and creates a delivery note automatically – no manual data entry, no delays.
Modules – ERP & Third-Party Integrations
OpenMES comes with ready-made integration modules for popular ERP systems used in Polish and Central European factories:
Subiekt NEXO PRO
Sync products, customers, and orders between Subiekt NEXO PRO and OpenMES. Finished work orders can auto-create warehouse documents (PZ/WZ) in Subiekt. Product data flows from Subiekt into OpenMES, so you have one source of truth for SKUs, BOMs, and pricing.
Wapro Mag
Import material and product lists from Wapro Mag. Finished goods reported in OpenMES update Wapro Mag stock levels in near real time. The integration handles unit conversions and multi-warehouse mapping on its own.
OpenMES Pantheon
Full two-way sync with Datalab Pantheon ERP – work orders, BOMs, inventory movements, and production reports. Great for manufacturers in Slovenia, Croatia, and the wider Adriatic region using Pantheon as their main business system.
Each module has its own settings panel. There you enter connection credentials, choose what to sync, set how often it syncs, and check a detailed sync log that shows every record sent or received with its success or error status.
API Tokens – REST API Access
For custom integrations, mobile apps, and BI tools like Power BI, Grafana, or Metabase, OpenMES offers REST API access secured by bearer tokens. You can create multiple tokens, each with a name and optional expiry date. Tokens are shown only once when created – store them safely. You can revoke any token at any time without affecting other integrations.
The REST API uses standard patterns: JSON request/response bodies, pagination with page and per_page query parameters, filtering by field values, and sorting by any column. Rate limiting applies per token (default 60 requests/minute, changeable by admin). Full API docs are available at /api/documentation via Swagger UI.
API tokens give direct access to your production data. Always use HTTPS in production. Change tokens regularly. Give each integration its own token with only the access it needs. Remove tokens right away when you stop using an integration.
OpenMES