Home / Blog / Article

Interface Guide: Connecting Hardware to the Cloud

How industrial plants visualize machine data in real time – a comprehensive architectural guide from IoT Bridge to Next.js dashboard.

💻 Web DevelopmentPublished on June 2, 2026 | Read time: approx. 17 minutes | Author: Pragma-Code Editorial
Futuristic industrial manufacturing floor with robotic arms and cloud telemetry interface

Directly linking physical machine telemetry (OT) to modern web ecosystems (IT) revolutionizes industrial shopfloors: Discover how to bridge fieldbuses via hardened IoT bridges and Server-Sent Events to reactive Next.js dashboards – securely, in real-time, and without costly middleware license fees.

Part of our Themen-Hub series:

This article is an in-depth expert contribution from our content cluster. Discover the complete overview on our main page:Web Development

AI Context 2026

The Bridge Between Physical Shopfloors and Autonomous Cloud Intelligence

In the era of Agentic AI, closed-loop industrial optimization, and sub-second telemetry, exporting machine data to CSV spreadsheets once per shift is obsolete. Autonomous dispatch agents and digital twins demand low-latency, uninterrupted access to live industrial sensor streams. This architecture guide provides a hands-on technical roadmap for engineering leaders and SMEs to connect shopfloor machinery (OT) to modern web ecosystems (IT) securely, reliably, and without incurring exorbitant proprietary middleware licensing fees.

Executive Summary
  • OT/IT Convergence: Directly interfacing industrial fieldbuses with cloud backends eliminates data silos, forming the indispensable foundation for predictive maintenance, live OEE tracking, and automated AI process control.
  • 4-Tier Ingestion Pipeline: Telemetry streams directionally from PLCs via local industrial protocols (OPC UA, Modbus TCP) to an edge IoT Bridge, gets pushed over MQTT 5.0 to cloud brokers, and is persisted in a high-throughput Time-Series Database.
  • 60 FPS Browser Rendering: Web dashboards (React/Next.js) utilize Server-Sent Events (SSE) combined with client-side ringbuffer batching to eliminate main-thread bottlenecks and deliver outstanding INP (Interaction to Next Paint) benchmarks.
  • Zero-Trust Cybersecurity: Strict implementation of the Purdue Model with dual-NIC DMZ isolation, outbound-only firewalls, and mTLS device certificates shields manufacturing assets against cyberattacks while satisfying NIS2 and EU Cyber Resilience Act (CRA) compliance.

1. The Convergence of OT and IT in SMEs

For decades, factory floors and enterprise software ecosystems operated in strictly isolated domains. On one side stands Operational Technology (OT): programmable logic controllers (PLCs like Siemens S7-1500, Beckhoff TwinCAT, or Allen-Bradley ControlLogix), embedded microcontrollers, pneumatic actuators, and robotic workcells. These systems reside on isolated physical fieldbuses, are engineered for hard deterministic execution in the microsecond range, and frequently remain in operational service for 15 to 25 years without modification.

On the other side stands Information Technology (IT): cloud architectures, microservices, relational databases, and responsive Next.js web applications designed for global elasticity, continuous deployment cycles, and intuitive user interfaces. In an era of autonomous manufacturing and data-driven supply chains, maintaining this operational wall creates substantial inefficiencies and strategic vulnerabilities.

Organizations that interface their shopfloor telemetry directly with cloud applications capture measurable competitive advantages:

Predictive Maintenance & Anomaly Detection

Continuous vibration, power consumption, and thermal spectrum analysis enables machine learning models to detect mechanical bearing degradation weeks before catastrophic failure occurs, reducing unplanned downtime by up to 45 percent.

Live OEE Tracking & Automated Shift Reporting

Plant managers and shift supervisors monitor overall equipment effectiveness, scrap percentages, and production cycle velocity in real time across any device, completely replacing manual clipboard tallies and error-prone batch exports.

Automated ESG Auditing & Carbon Tracking

Granular electricity draw (kWh per produced part), compressed air leakage, and coolant temperatures are immutably logged with microsecond timestamps, streamlining ISO 50001 certification and mandatory EU sustainability filings.

The primary barrier in industrial digitization is rarely a lack of data. Modern manufacturing equipment outputs gigabytes of continuous telemetry. The core engineering hurdle lies in semantic protocol translation: A PLC communicates via proprietary binary registers or serial fieldbuses, whereas modern cloud APIs and agentic LLMs require strongly-typed, structured JSON payloads over standard web networking protocols.

2. The 4-Tier OT/IT Architecture: From Sensor to Dashboard

Transporting metrics from hostile factory floor conditions into reactive web browsers requires a decoupled 4-tier pipeline architecture. This separation of concerns ensures that heavy analytical queries or internet connectivity drops never disrupt the deterministic safety and control loops executing on the machine controllers.

⚙️
Tier 1: Sensors & PLCs

1. Field & Control Level

Physical sensors record raw industrial variables (hydraulic pressure, vibration, thermal load). The PLC executes control logic within a hard 1-to-10 ms cycle time and stores states in internal data blocks (DBs) or memory holding registers.

🔄
Tier 2: Edge Gateway

2. IoT Bridge & Normalization

A hardened industrial PC (IPC) situated in the control cabinet DMZ polls PLC registers via OPC UA or Modbus TCP. It validates schemas, filters telemetry noise with deadband algorithms, and serializes bytes into semantic JSON structures.

☁️
Tier 3: Cloud Backend

3. Broker, Storage & Ingestion

A high-performance MQTT broker (such as EMQX or HiveMQ) consumes inbound topics. Ingestion worker nodes stream records into a dedicated time-series database (TimescaleDB) and trigger live dispatch queues for connected clients.

📊
Tier 4: Web Application

4. Visualization & Digital Twin

A Next.js/React web dashboard ingests live streams through persistent Server-Sent Events (SSE). An optimized throttling hook buffers data points to render smooth 60 FPS charts on HTML5 Canvas surfaces without main-thread jank.

The transmission path across these tiers functions fully asynchronously. The progression from physical excitation on the tooling bed to rendered pixels on an executive screen follows a distinct timeline:

T + 0 ms: Machine-Level Sensor Excitation

A piezoelectric accelerometer detects high-frequency harmonic vibration on a main spindle bearing. The analog signal is digitized through an IO-Link bus master and registered in the PLC data block.

T + 50 ms: Edge Ingestion & Deadband Filtering

The local IoT Bridge reads the memory node over OPC UA. The Deadband Filtering algorithm detects an active deviation of 1.2 percent, formatting the payload into typed JSON.

T + 120 ms: Encrypted WAN Ingestion via MQTT 5.0

The edge gateway transmits the packet across an outbound-only TLS tunnel (port 8883) to the cloud broker. The message carries QoS Level 1 (at least once delivery) with custom timestamp user properties.

T + 180 ms: Ingestion & Time-Series Persistence

The cloud ingest worker appends the metric into an automated hypertable chunk in the Time-Series Database and routes the event to the active SSE channel.

T + 250 ms: Sub-Second Browser Graph Rendering

The React client receives the Server-Sent Event over HTTP/2. The batching hook renders the updated data point smoothly onto the canvas chart without dropping frames.

3. Industrial Protocols Compared: OPC UA, Modbus TCP & MQTT 5.0

Selecting suitable communication protocols across each pipeline segment dictates system security, bandwidth utilization, and development velocity. In industrial software engineering, three primary standards dominate:

While OPC UA and Modbus TCP are optimized for local shopfloor local-area networks, MQTT is the definitive standard for traversing WAN and cloud boundaries. A critical architectural flaw is exposing raw Modbus TCP ports directly over the internet via port forwarding: Because Modbus contains zero authentication mechanisms, any actor on the open internet can overwrite memory registers and physically compromise plant machinery.

4. The IoT Bridge: Protocol Translation & Edge Computing

The IoT Bridge is the critical architectural linchpin. It functions as a bidirectional translator: querying low-level machine registers (such as OPC UA NodeIDs or Modbus address 40001) on the local OT bus, transforming raw byte values into normalized JSON objects, and dispatching them securely to the cloud via TLS.

Typically, this bridge daemon runs on a fanless DIN-rail industrial PC (IPC) powered by hardened Linux (such as Alpine Linux or Debian with a read-only root filesystem). Whether deployed as a lightweight Go/Rust microservice or using Node.js/TypeScript, the architectural tenets remain identical.

The following production-ready TypeScript implementation demonstrates a resilient IoT bridge using node-opcua and mqtt. The script connects to a local injection molding machine, subscribes to temperature and hydraulic pressure nodes at 250 ms intervals, executes client-side deadband filtering, and publishes changes to the cloud broker over MQTT 5.0:

import { 
  OPCUAClient, 
  AttributeIds, 
  TimestampsToReturn, 
  ClientSubscription, 
  ClientMonitoredItemOrGroup, 
  DataValue 
} from "node-opcua";
import mqtt, { MqttClient } from "mqtt";

interface MachineTelemetryPayload {
  machineId: string;
  timestamp: string;
  temperatureCelsius: number;
  hydraulicPressureBar: number;
  cycleCount: number;
  operatingState: "RUNNING" | "IDLE" | "MAINTENANCE" | "ERROR";
}

// 1. Establish secure MQTT 5.0 cloud connection
const mqttClient: MqttClient = mqtt.connect("mqtts://broker.pragma-code.de:8883", {
  clientId: `edge-gateway-bavaria-01`,
  protocolVersion: 5,
  clean: false,
  username: "edge-auth-token-prod",
  password: "x509-authenticated-secret",
  reconnectPeriod: 2000,
  properties: {
    sessionExpiryInterval: 3600
  }
});

// Cache for edge deadband filtering (noise reduction)
let lastPublishedTemperature = 0;
const TEMPERATURE_DEADBAND_PERCENT = 0.5; // Only publish on >0.5% deviation

async function startIoTBridge() {
  const opcClient = OPCUAClient.create({
    endpointMustExist: false,
    connectionStrategy: { maxRetry: 10, initialDelay: 1000, maxDelay: 10000 }
  });

  try {
    // 2. Connect to local PLC in OT network
    await opcClient.connect("opc.tcp://192.168.10.50:4840");
    console.log("✓ OPC UA connection to PLC successfully established.");

    const session = await opcClient.createSession();
    
    // 3. Create high-frequency telemetry subscription
    const subscription = ClientSubscription.create(session, {
      requestedPublishingInterval: 250, // 250ms polling interval
      requestedLifetimeCount: 100,
      requestedMaxKeepAliveCount: 10,
      maxNotificationsPerPublish: 20,
      publishingEnabled: true,
      priority: 10
    });

    const itemToMonitor = {
      nodeId: "ns=3;s=Tooling_Temperature_Zone1",
      attributeId: AttributeIds.Value
    };

    const monitoredItem = ClientMonitoredItemOrGroup.create(
      subscription,
      itemToMonitor,
      { samplingInterval: 100, discardOldest: true },
      TimestampsToReturn.Both
    );

    // 4. Value change event listener
    monitoredItem.on("changed", (dataValue: DataValue) => {
      const currentTemp = parseFloat(dataValue.value.value.toFixed(2));
      
      // Deadband check: Has the value shifted beyond tolerance?
      const diff = Math.abs(currentTemp - lastPublishedTemperature);
      const percentChange = (diff / (lastPublishedTemperature || 1)) * 100;

      if (percentChange >= TEMPERATURE_DEADBAND_PERCENT || lastPublishedTemperature === 0) {
        lastPublishedTemperature = currentTemp;

        const telemetryPayload: MachineTelemetryPayload = {
          machineId: "injection-molding-unit-04",
          timestamp: new Date().toISOString(),
          temperatureCelsius: currentTemp,
          hydraulicPressureBar: 165.4,
          cycleCount: 142080,
          operatingState: currentTemp > 240 ? "ERROR" : "RUNNING"
        };

        // 5. Asynchronous streaming to cloud broker with MQTT 5.0 User Properties
        mqttClient.publish(
          "factory/munich/hall-2/injection-04/telemetry",
          JSON.stringify(telemetryPayload),
          {
            qos: 1, // At least once
            properties: {
              contentType: "application/json",
              userProperties: {
                facility: "Munich-South",
                sensorProtocol: "OPC-UA-IEC62541"
              }
            }
          }
        );
      }
    });

  } catch (error) {
    console.error("Critical error in IoT Bridge daemon:", error);
    setTimeout(startIoTBridge, 5000);
  }
}

startIoTBridge();

This edge abstraction completely isolates cloud backends from vendor-specific PLC register layouts. If the WAN uplink drops, the IoT bridge caches telemetry records in a local embedded SQLite or RocksDB store, forwarding the historical backlog automatically once connectivity recovers without losing a single data point.

5. Ingestion, Time-Series Storage & Digital Twins

Manufacturing facilities with dozens of automated assets rapidly generate massive telemetry footprints: A single production cell polling five metrics every 100 milliseconds writes 4.32 million rows per day. Across 20 lines, the database accumulates over 86 million records daily. Standard relational engines (like default MySQL or PostgreSQL tables) suffer severe performance degradation under continuous high-concurrency inserts and wide time-window aggregation queries.

TimescaleDB (PostgreSQL Hypertables)

Combines standard relational SQL syntax with automated time-partitioned chunking. Hypertables provide column-level compression (saving up to 90 percent disk storage) and enable seamless joins between raw sensor logs and ERP order tables.

InfluxDB 3.0 & ClickHouse

Columnar analytics powerhouses engineered for extreme ingestion throughput (millions of inserts per second). Features vectorized aggregation kernels and serves as a premier foundation for cloud-native telemetry pipelines.

Digital Twin & Asset Administration Shell (AAS)

Maps live machine telemetry onto standardized semantic models (Asset Administration Shell compliant with IEC 63278-1). Allows autonomous AI agents and web dashboards to query machine states vendor-neutrally.

Pro-Tip: Intelligent Edge Telemetry Downsampling

Never stream static, unchanged idle values indiscriminately into cloud infrastructure. By combining deadband filtering (publishing only on relative changes above 0.5%) with a periodic heartbeat interval (e.g., one ping every 60 seconds during steady states), you reduce ingestion compute and cellular data costs by up to 80 percent – without losing fidelity during rapid pressure spikes or operational faults.

6. Frontend Streaming: Server-Sent Events (SSE) vs. WebSockets

To render live machine telemetry in the browser with zero perceptible latency, traditional HTTP polling (polling fetch() every 2 seconds) is unacceptable: It introduces excessive HTTP header overhead, exhausts server connection pools, and lags behind sudden machine alarms. Modern web architectures utilize persistent streaming connections.

Comparison: WebSockets vs. Server-Sent Events (SSE)

WebSockets (Bi-directional)
  • Communication Channel: Full duplex. Client and server transmit data simultaneously. Ideal for interactive machine controls and chat systems.
  • Protocol Foundation: Custom TCP framing protocol (ws:// / wss://). Requires dedicated proxy handling and is often blocked by corporate firewalls.
  • Architectural Complexity: High. Developers must manually handle heartbeat pings, reconnect fallbacks, and load-balancer session affinity.
Server-Sent Events (Uni-directional)
  • Communication Channel: Server-to-client push only. Perfectly tailored for monitoring dashboards, sensor graphs, and real-time alerts.
  • Protocol Foundation: Native HTTP/2 standard (MIME type text/event-stream). Traverses enterprise firewalls, CDNs, and load balancers without custom rules.
  • Architectural Complexity: Minimal. Browsers provide native EventSource APIs with built-in reconnection logic and message ID resumption.

For 95 percent of industrial monitoring applications and B2B portals, Server-Sent Events (SSE) is the superior engineering choice. Because web clients exclusively consume telemetry and should never inject control signals directly over an unvetted web socket into machine PLCs (a violation of industrial OT security), SSE conserves server resources and eliminates complex connection state management.

7. Code Deep Dive: React/Next.js Hook for 60 FPS Telemetry

When telemetry events flood into web clients at high frequencies (e.g., 20 to 50 Hz), triggering a naive setState() on every message causes severe main-thread thrashing. The resulting DOM re-render storm creates noticeable interface stutter and degrades INP (Interaction to Next Paint) benchmarks, locking up user interactions.

A resilient React implementation decouples inbound event streams from React render lifecycles using a ref-based ringbuffer batching pattern. Telemetry packets accumulate inside a bufferRef and are flushed to UI state only at configured intervals (e.g., every 100 to 200 ms):

import { useState, useEffect, useRef, useCallback } from "react";

export interface TelemetryPoint {
  machineId: string;
  timestamp: string;
  temperatureCelsius: number;
  hydraulicPressureBar: number;
  operatingState: "RUNNING" | "IDLE" | "MAINTENANCE" | "ERROR";
}

interface UseMachineTelemetryReturn {
  telemetryHistory: TelemetryPoint[];
  latestPoint: TelemetryPoint | null;
  connectionState: "CONNECTING" | "CONNECTED" | "ERROR" | "DISCONNECTED";
  reconnect: () => void;
}

export function useMachineTelemetry(
  machineId: string,
  throttleIntervalMs: number = 150,
  maxHistoryPoints: number = 60
): UseMachineTelemetryReturn {
  const [telemetryHistory, setTelemetryHistory] = useState<TelemetryPoint[]>([]);
  const [latestPoint, setLatestPoint] = useState<TelemetryPoint | null>(null);
  const [connectionState, setConnectionState] = useState<
    "CONNECTING" | "CONNECTED" | "ERROR" | "DISCONNECTED"
  >("CONNECTING");

  // Ref buffer prevents triggering React re-renders on every raw SSE event
  const bufferRef = useRef<TelemetryPoint[]>([]);
  const lastFlushTimeRef = useRef<number>(Date.now());
  const eventSourceRef = useRef<EventSource | null>(null);

  const connectSSE = useCallback(() => {
    if (eventSourceRef.current) {
      eventSourceRef.current.close();
    }

    setConnectionState("CONNECTING");
    const es = new EventSource(`/api/telemetry/stream?machineId=${encodeURIComponent(machineId)}`);
    eventSourceRef.current = es;

    es.onopen = () => {
      setConnectionState("CONNECTED");
    };

    es.onmessage = (event: MessageEvent) => {
      try {
        const data: TelemetryPoint = JSON.parse(event.data);
        bufferRef.current.push(data);

        const now = Date.now();
        // Batching: only flush buffer when throttle window has elapsed
        if (now - lastFlushTimeRef.current >= throttleIntervalMs) {
          const flushedBatch = [...bufferRef.current];
          bufferRef.current = [];
          lastFlushTimeRef.current = now;

          if (flushedBatch.length > 0) {
            const newest = flushedBatch[flushedBatch.length - 1];
            setLatestPoint(newest);

            setTelemetryHistory((prev) => {
              const combined = [...prev, ...flushedBatch];
              return combined.slice(-maxHistoryPoints);
            });
          }
        }
      } catch (err) {
        console.error("Telemetry JSON parsing exception:", err);
      }
    };

    es.onerror = () => {
      setConnectionState("ERROR");
      es.close();
    };
  }, [machineId, throttleIntervalMs, maxHistoryPoints]);

  useEffect(() => {
    connectSSE();
    return () => {
      if (eventSourceRef.current) {
        eventSourceRef.current.close();
        setConnectionState("DISCONNECTED");
      }
    };
  }, [connectSSE]);

  return {
    telemetryHistory,
    latestPoint,
    connectionState,
    reconnect: connectSSE
  };
}

When combined with HTML5 Canvas-based chart libraries (such as Chart.js with decimation enabled or D3.js with canvas contexts), this architecture delivers locked 60 FPS animations even under dense industrial data loads. The browser main thread remains unblocked for immediate response to user filtering, zooming, and diagnostic drilldowns.

8. Cybersecurity, the Purdue Model & the Cyber Resilience Act (CRA)

Connecting factory assets to cloud networks inherently expands the attack surface. Ransomware campaigns capable of compromising controllers and halting manufacturing lines for weeks represent existential risks for industrial SMEs. These operational threats are underscored by stringent regulatory mandates under the NIS2 Directive and the EU Cyber Resilience Act (CRA).

Modern OT cyber defense relies on strict architectural segmentation following the industrial Purdue Reference Model:

1. OT Network Isolation & Air-Gapping

Field sensors (Level 0/1) and PLC control networks (Level 2) must never route traffic through standard enterprise internet gateways. Industrial switches operate in isolated VLANs with no default routing to corporate office subnets.

2. DMZ with Dual-NIC Physical Isolation

The IoT bridge sits within an industrial DMZ (Level 3.5). The edge hardware features two separate physical network interface cards: NIC A polls local PLC registers; NIC B transmits encrypted streams to the WAN gateway. IP forwarding between NICs is permanently disabled.

3. Outbound-Only Firewalls & mTLS

The DMZ firewall drops all inbound connection attempts originating from the WAN. The IoT bridge establishes connections strictly outbound to the cloud broker over port 8883, secured via mutual TLS using device-specific x509 certificates.

4. CRA & NIS2 Firmware Hardening

Edge operating systems implement cryptographic Secure Boot, hardware watchdogs, automated vulnerability patching, and immutable read-only root filesystems to prevent tampering with bridge binaries.

Cost Trap: Proprietary Middleware Licensing & Vendor Lock-In

Legacy automation vendors routinely charge five-figure license fees and recurring maintenance charges for proprietary "OPC routers" and proprietary IoT gateways. Adopting open-source edge architectures (such as Node-RED, custom Go bridges, or Eclipse Kura) running on standard industrial PCs saves SMEs tens of thousands of euros while granting total source code ownership and integration agility.

9. 5-Stage Implementation Roadmap for SMEs & Conclusion

Successfully connecting factory hardware to web applications is not a matter of inflated budgets, but of disciplined software architecture. SMEs aiming to break down data silos and modernize industrial operations should execute against a proven 5-stage roadmap:

  1. 1. Inventory & Protocol Compatibility Audit

    Document all PLC controller models, firmware revisions, and available bus interfaces across the shopfloor (verifying OPC UA, Modbus TCP, S7 communication, or IO-Link support).

  2. 2. Network Segmentation & DMZ Establishment

    Architect a dedicated control cabinet DMZ adhering to the Purdue Model, configuring outbound-only firewall policies and zero-trust segmentation prior to hardware rollout.

  3. 3. Edge Prototyping with Deadband Filtering

    Deploy a lightweight IoT bridge on a DIN-rail IPC to validate register polling, test JSON serialization schemas, and verify bandwidth optimization algorithms.

  4. 4. Cloud Ingestion & Time-Series Persistence

    Provision a hardened MQTT broker and wire ingestion pipelines into TimescaleDB or InfluxDB with automated retention policies for historical reporting.

  5. 5. Reactive Next.js Web Dashboard Rollout

    Deploy a Server-Sent Events (SSE) streaming frontend featuring throttled batching hooks to guarantee fluid 60 FPS visual analytics across all desktop and mobile devices.

Quick-Check: Your Industrial OT/IT Roadmap

Vendor Neutrality: Prioritize open standards like OPC UA and MQTT over proprietary licensed middleware.
Security First: Zero open inbound ports to OT; mandate x509 mTLS certificates for all edge bridges.
Edge Reduction: Deadband filtering drastically lowers cellular transmission and cloud ingestion fees.
Web Performance: Server-Sent Events with client batching deliver smooth 60 FPS and superior INP responsiveness.

Do you have questions about connecting your machinery to web and cloud systems?

Schedule a Free Initial Consultation

Have a vision?

Let's check together how we can make your idea take flight.

Book your free strategy call now

Extended Specialized Glossary

IoT Bridge

A hardware or software component that acts as a translator between physical machine protocols (e.g. OPC UA, Modbus) and cloud services (e.g. MQTT, REST APIs).

Server-Sent Events (SSE)

A web technology where a server continuously pushes real-time updates to the browser over an existing HTTP connection without the client having to poll repeatedly.

Time-Series Database

A specialized database optimized for storing and querying data points indexed in time order, such as sensor readings or machine states.

Modbus TCP

A minimalist, open industrial protocol for Ethernet communication (port 502) based on directly reading and writing 16-bit register addresses in PLCs.

Purdue Model

An industrial control system reference architecture that segments network infrastructure into hierarchical levels (Level 0 through 5) and mandates strict DMZs for security.

Digital Twin

A real-time virtual representation of a physical asset or industrial process continuously synchronized with live telemetry data for monitoring, simulation, and autonomous optimization.

Deadband Filtering

An edge-level data reduction technique where sensor readings are only transmitted to the cloud when changes exceed a configured percentage threshold, eliminating telemetry noise.

Alexander Ohl

Alexander Ohl

Pragma-Code Support (AI)• Online

Hello! I am the Pragma-Code Assistant. How can I help you today? You can ask me about our services or select a topic below.