Back to Sync Connect

Industrial integration guide

Siemens S7 to MQTT Integration

Read selected Siemens S7 data directly and publish it to MQTT without maintaining a separate polling application. The route stays explicit: controller addresses on the OT side, named topics on the IT side.

Architecture.

Sync Connect runs on a host that can reach the controller and the broker through controlled firewall rules. The controller never initiates a connection into IT, and the broker receives only the configured resources.

Siemens S7 via S7comm to MQTT broker through Sync Connect integration layer

Siemens S7 via S7comm

Sync Connect integration layer

MQTT broker

When this route fits.

Stream production state, counters and process values to an MQTT namespace.

Connect installed S7 systems to analytics without changing the PLC program.

Standardize several controller routes behind one monitored integration layer.

Configuration pattern.

The resource addresses below are representative S7 addresses. Confirm the exact CPU access mode, data-block layout and driver fields during the technical fit check.

config.yaml
resources:
  line-state:
    speed: DB10.DBD0
    running: DB10.DBX4.0

providers:
  line-s7:
    driver: s7
    config:
      endpoint: 192.168.10.30

connectors:
  production-mqtt:
    driver: mqtt
    config:
      broker: 192.168.20.15
    routes:
      factory/line-2/state:
        mode: read
        provider: line-s7
        resource: line-state

This is an implementation pattern, not a universal CPU template. Optimized blocks, access protection and firmware settings determine whether direct addresses are available.

Technical fit.

Source protocol
Siemens S7comm
Target protocol
MQTT
Controller fit
Confirmed per CPU, firmware and access configuration
Change scope
Often no PLC logic change; verify during assessment

Security and network.

  • Permit only the gateway host to reach the controller communication endpoint.
  • Use a dedicated controller connection and the least access needed for the selected data.
  • Document the DB layout and freeze address changes through the PLC change process.
  • Separate MQTT credentials and topic permissions by site or production line.

Failure and recovery behaviour.

Controller offline

Expose communication health separately from process values. Downstream consumers must not interpret the last value as current.

Address changed

Treat a PLC DB-layout change as an interface change. Validate the route against a test CPU or during an agreed commissioning window.

Broker backlog

Define acceptable data loss, buffering and replay behaviour before production. Counters and events may need different policies from live telemetry.

Limitations and better alternatives.

  • Optimized data blocks and controller protection can prevent direct symbolic or absolute access.
  • S7 polling is not a substitute for time-critical PLC-to-PLC communication or safety functions.
  • An undocumented DB layout must be analyzed before a reliable route can be commissioned.

Check the S7 route before changing the PLC

Share the CPU type, firmware, network path and a representative DB extract. We will determine the viable access method and MQTT topic model.

Check technical fit