Skip to content
MaestroHub
Menu
Free trialdownload and run it todayStart the pilot

Integrations

Modbus to InfluxDB, without a script.

Poll Modbus registers with MaestroHub, decode and name them, and write them to InfluxDB as Line Protocol with measurements, tags and typed fields. Writes are buffered on disk if InfluxDB is unreachable.

The flow

One value, from the machine to InfluxDB. Illustrative.

Modbusfieldbus protocolinput register 30010
MaestroHub

Meter 4 active power · 37.2 kW · Good

  • named, unit, quality
  • origin stamped
  • buffered on disk
InfluxDBtime-series databasemeasurement power

Why do it with MaestroHub

More than a pipe from Modbus to InfluxDB.

01

Tags from the plant model

Asset and line tags come from the namespace, so Grafana queries filter cleanly.

02

Typed fields, decoded once

Floats stay floats and counters stay integers, decoded from the registers in one place.

03

Quality as a tag

Bad readings are marked, so a dashboard can hide or highlight them.

What lands in InfluxDB

An example. You choose the fields in the pipeline.

measurementtag: assetfield: valuetag: unittag: qualitytime
powerutilities/meter437.2kWgood2026-10-03T06:00:01Z

Set it up in three steps

  1. 1

    Connect Modbus

    Add a Modbus TCP, RTU or ASCII connection and create read functions for the registers and coils, with data type and scaling.

  2. 2

    Give the values meaning

    Map each value to a topic in the namespace with its name, unit and schema. Quality and origin are stamped on every value.

  3. 3

    Deliver to InfluxDB

    Add an InfluxDB output and map each value to a measurement, its tags and its fields.

Before you start

What each side needs, from the connector documentation.

Modbus

  • For Modbus TCP: the device address as host:port. The standard port is 502.
  • For RTU or ASCII: the serial device path (/dev/ttyUSB0 on Linux, COM3 on Windows) and the device's baud rate, data bits, parity and stop bits.
  • The Unit ID (slave address, 0 to 247) configured on the device.

Example settings

Transport Mode
tcp
IP Address:Port
192.168.1.10:502
Unit ID
1
Request Timeout (ms)
5000
Retry Count
2
Health Check Method
status
Modbus connector documentation

InfluxDB

  • An InfluxDB 2.x server URL, for example http://localhost:8086 or an InfluxDB Cloud URL.
  • The organization name. Test Connection fails if the server has no organization with that name.
  • An API token, created in the InfluxDB UI under Load Data, API Tokens.
  • A custom CA certificate in PEM if the server uses a private CA.

Example settings

Server URL
http://localhost:8086
Organization
<your-org>
Auth Token
<your-api-token>
Precision
ns
Bucket (Write)
sensors
Measurement (Write)
temperature
InfluxDB connector documentation

Things to know

Pitfalls and limits the documentation calls out, so they don't surprise you on site.

Modbus

  • Selecting ASCII mode does not change Data Bits or Parity. Many ASCII devices use 7E1, so set Data Bits to 7 and Parity to E yourself.
  • If every function in a Read Group returns exception 2 (illegal data address) but each works alone, the Coalesce Max Register Gap is too high. Lower it, or set it to 0.
  • Multi-register types need a matching quantity: float32 needs 2 registers, float64 needs 4. Wrong values usually mean the data type does not match the device's register format.

Limits

  • Per request: up to 125 registers or 2,000 coils for reads, 123 registers (FC16) or 1,968 coils (FC15) for writes.
  • RS-485 mode uses the Linux serial driver's RS-485 support and is ignored on Windows.

InfluxDB

  • Write Data must be a JSON array of points. A single object is refused; wrap it in [ ].
  • A point timestamp must be an RFC 3339 string or a Unix timestamp in nanoseconds. Any other value fails the write. Points without a timestamp get the event time.
  • The connector does not buffer points or retry a failed write itself.

Limits

  • The connector targets InfluxDB 2.x with Flux. InfluxDB 1.x and 3.x are not supported yet.

What teams use it for

Grafana dashboards

Live and historical machine data in the tools engineers already use.

Energy monitoring

Meter data per asset and shift.

Lightweight historian

A time-series store for sites without a historian.

Ways to connect Modbus to InfluxDB

In general terms. Check any specific product for its own details.

Compare a custom script, a flow tool, a cloud vendor's edge service and MaestroHub

Swipe sideways to see every column

A custom scriptA flow toolA cloud vendor's edge serviceMaestroHub
Talks ModbusA library you chooseCommunity plug-insDepends on the vendorBuilt in, one of 90+ connectors
Names, units and schemaYou write itYou build itPartly, in the vendor's modelOne governed namespace
Quality on every valueYou write itYou build itDepends on the vendorBuilt in, carried through calculations
Where each value came fromYou write itYou build itDepends on the vendorStamped on every value
Survives a network outageYou build itYou build itUsually, to that vendor's cloudOn disk, per destination, in order
Several destinations at onceOne script eachYes, flow by flowMostly that vendor's cloudAny mix, each with its own buffer
Permissions and auditYou build itYou build itCloud account permissionsRoles, single sign-on, audit trail
AI agents can use the dataYou build itYou build itDepends on the vendorThrough the MCP server

Questions

How do I store Modbus data in InfluxDB?

Poll Modbus registers with MaestroHub, decode and name them, and write them to InfluxDB as Line Protocol with measurements, tags and typed fields. Writes are buffered on disk if InfluxDB is unreachable.

Do I need to write code to connect Modbus to InfluxDB?

No. You configure the Modbus connection and the InfluxDB output in MaestroHub and join them with a pipeline. Transformations can be added where you need them.

Where does MaestroHub run for this?

On your own infrastructure next to the machines: an edge box, a virtual machine or Kubernetes. Nothing has to leave your network.

Why not just write a script for Modbus to InfluxDB?

A script works on day one. The cost comes later: decoding and naming values, handling bad quality, buffering through outages, keeping credentials safe, and doing it again for the next machine and the next destination. MaestroHub does those once, for every connector.

What else can Modbus data go to?

More than 90 connectors are included in every edition, among them historians, databases, cloud warehouses, message brokers and business systems, so the same values can feed several destinations at once.

Try Modbus to InfluxDB yourself.

The free trial includes every connector. No factory to hand? The Digital Factory Simulator serves OPC UA, Modbus, MQTT and more on your laptop.

Cookie preferences

Choose which categories of cookies you allow. Strictly necessary cookies are always on because the site cannot function without them.