Need to connect Modbus and MQTT? The Weble WBox routes Modbus MQTT natively: one gateway speaks both protocols and maps data points in real time — no PC, no middleware, no cloud dependency.

Modbus to MQTT gateway

The protocols

Modbus

Modbus (TCP/IP and RTU) connects PLCs, meters, variable-speed drives and countless industrial devices.

Modbus driver →

MQTT

MQTT is the lightweight publish/subscribe protocol used by IoT devices and cloud brokers.

MQTT driver →

Further reading: How to connect Modbus to MQTT →

Typical use case

On an industrial site, PLCs, power meters, inverters and sensors speak Modbus, while the SCADA, historian or cloud platform expects MQTT. The WBox polls the Modbus devices and publishes their data to the broker, and writes setpoints from MQTT back to the equipment. It turns a fleet of serial and TCP Modbus slaves into a clean, topic-structured MQTT feed for Industry-4.0 dashboards, predictive maintenance or remote operation — without a SCADA gateway PC.

In the field

Weble customers run this routing in production:

How the WBox bridges Modbus and MQTT

Activate the Modbus and MQTT drivers. Holding and input registers are polled on a configurable cycle and published to MQTT topics as JSON, with scaling, signed values and word order handled per register. Commands on the write topics go back to holding registers. A JavaScript step can assemble a register block into one structured message, compute a derived value, or rate-limit publishing, so the broker sees meaningful data instead of raw register noise.

Step by step

  1. Wire the field side — wire the RS-485 segment (RTU) or point at the Modbus TCP devices.
  2. Enable the Modbus and MQTT drivers on the WBox — licence-activated, no extra hardware.
  3. Map each point to a topic: a Modbus value becomes site/area/point (publish), with QoS and the retained flag set per signal.
  4. Point the broker — host, port 8883, TLS and credentials — at your on-prem or cloud broker (AWS IoT, Azure, ThingsBoard, any MQTT 3.1.1/5).
  5. Subscribe a command topic to write back to Modbus, then watch every point live in the WBox monitor.

Example mapping

A worked example, all on one gateway:

  • Modbus holding 40001 active power (×0.1 kW) → MQTT topic plant/meter3/power_kw
  • Modbus input 30010 run status → retained MQTT topic plant/meter3/status
  • MQTT topic plant/meter3/cmd → Modbus holding 40020 command (write)

Capacity & limits

  • Modbus — Modbus addresses up to 247 slaves per line (RTU or TCP) — about 32 RTU devices per RS-485 segment before a repeater.
  • MQTT — MQTT imposes no point limit — topics scale with your broker and network.

On the WBox, a driver licence enables the whole protocol — there is no artificial per-point tier to unlock. Capacity scales with the gateway model, from the compact S103 to the E413: you are bounded by the field bus, not by your licence.

Frequently asked questions

How do I send Modbus data over MQTT?

The WBox reads the Modbus registers (RTU/TCP) and publishes them as MQTT messages (JSON) to your broker or cloud.

To which brokers or clouds?

Any MQTT broker (Mosquitto, HiveMQ…) or cloud (Azure, AWS, Google); topics and payloads are configurable.

Is the bridge bidirectional?

Yes: the WBox can subscribe to an MQTT topic and write the received value into a Modbus register.

Do I need extra hardware?

No: the Modbus and MQTT drivers are licence-activated on the same WBox gateway.

What you need

One WBox gateway with these two driver licences:

Route Modbus MQTT on your project

Find the right WBox gateway for your installation, or get in touch to validate your case.

Configure my gateway

← All routes