Bring Modbus RTU / Modbus TCP devices into Virtuino Cloud — no native Modbus support needed, thanks to MQTT-to-Modbus gateways.
Most Modbus RTU devices live on an isolated RS-485 serial bus, and most Modbus TCP gateways sit behind your local router's firewall with no public IP — our cloud servers can't simply "dial in" to reach them. An MQTT-to-Modbus gateway solves this the other way around: it makes an outbound connection from your network to our broker, so no port-forwarding or exposing your equipment to the internet is required.
Configure your MQTT-to-Modbus gateway's MQTT client / MQTT publisher settings exactly as you would for any device connecting to Virtuino Cloud — see the full MQTT Connection Guide for details on every field. The essentials:
| Parameter | Value | Notes |
|---|---|---|
| *Broker Host | cloud.virtuino.com | Same host for both plain and TLS connections |
| *Port | 8883 TLS / SSL | Recommended — most gateways support TLS out of the box. Use 1883 only for local testing. |
| *Username | vr-abcd1234 |
Your Sub-account Key — found in Console → API & Connections |
| *Password | your MQTT password | Found in Console → API & Connections → MQTT Credentials |
| Client ID | device_gateway |
Any value you like — just make sure no other device on your account uses the same one. |
* Required field
Most MQTT-Modbus gateways let you define, per register, which MQTT topic to publish or subscribe to. Map each register to a bare topic — no Sub-account Key, no direction marker to write yourself — see Topic Structure for the full reference.
| Modbus Register | Register Type | Gateway Action | Topic |
|---|---|---|---|
| Holding Register 30001 (temperature) | Read (device → cloud) | Publish | plc1/temperature |
| Holding Register 30002 (humidity) | Read (device → cloud) | Publish | plc1/humidity |
| Coil 00001 (relay) | Write (cloud → device) | Subscribe | plc1/relay1 |
For coils/registers the gateway should write to (e.g. a relay controlled from your dashboard), subscribe to the topic instead of publishing to it — the gateway receives the value from Virtuino Cloud and writes it to the Modbus register.
device/field) when bridging Modbus — it keeps every PLC/gateway's registers grouped under its own device name, which scales much better than the flat format once you have more than a handful of registers.
Any MQTT-to-Modbus gateway works, as long as it can publish/subscribe to a standard MQTT broker over TLS with username/password authentication. Common options:
node-red-contrib-modbus) with our own node-red-contrib-virtuino nodes to build a fully custom polling/mapping flow on a Raspberry Pi or similar — no MQTT topics to type by hand.pymodbus) alongside an MQTT client library is straightforward to run on a Raspberry Pi or industrial PC if you need full control over polling logic.Whichever option you choose, the connection to Virtuino Cloud is always the same: standard MQTT, TLS on port 8883, authenticated with your Sub-account Key and MQTT password, publishing/subscribing to topics under your own namespace.