Evaluate the AutomationView desktop suite free for 30 days. No credit card required. Claim trial key →
arrow_back Back to Articles
HMI

Offline-First SCADA Dashboards: PWA & Service Worker Implementation

calendar_month
person Carvalho Raphael

Offline-First SCADA Dashboards: PWA & Service Worker Implementation

HMI
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    client["PWA Dashboard"]:::clientStyle
    sw["Service Worker"]:::swStyle
    cache["Local Cache (IndexedDB)"]:::cacheStyle
    server["SCADA Server"]:::serverStyle
    
    client -->|Requests Data| sw
    sw -->|Network Available| server
    sw -->|Network Down| cache
    server -->|Updates| cache
    
    classDef clientStyle fill:#2563eb,stroke:#fff,stroke-width:2px,color:#fff
    classDef swStyle fill:#16a34a,stroke:#fff,stroke-width:2px,color:#fff
    classDef cacheStyle fill:#dc2626,stroke:#fff,stroke-width:2px,color:#fff
    classDef serverStyle fill:#9333ea,stroke:#fff,stroke-width:2px,color:#fff
AutomationView Icon AutomationView

The Reality of Plant Floor Connectivity

Walk the floor of any heavy manufacturing facility, and you will quickly realize that ubiquitous, high-speed Wi-Fi is a myth. Dead zones behind massive metal enclosures, high electromagnetic interference (EMI) from variable frequency drives, and network congestion frequently cause transient connection drops. For an operator monitoring a critical process on a tablet, a spinning loading icon instead of an HMI is not just an inconvenience—it is a safety risk.

Offline-First SCADA Dashboards solve this exact problem. By leveraging Progressive Web Apps (PWAs) and Service Workers, modern web-based HMIs can maintain functionality, cache critical setpoints, and queue control commands even when the network completely drops. This architecture shifts the paradigm from “always-connected” to “resilient by default”.

Key Takeaways

  • Service Workers act as network proxies, allowing the HMI to serve cached assets and intercept failed requests instantly.
  • IndexedDB provides robust local storage for historical trends, ensuring operators can still analyze past data during a blackout.
  • Background Sync queues operator commands (e.g., acknowledging an alarm or changing a setpoint) and synchronizes them with the PLC once the connection is restored.

Understanding the Offline-First Architecture

Building an offline-first SCADA dashboard requires a fundamental shift in how the frontend interacts with the backend telemetry server. Instead of the browser directly calling the SCADA API, a Service Worker sits in the middle. It evaluates the network state and decides whether to fetch fresh data or serve fallback data from the local cache.

flowchart TD
    subgraph pwa_client ["PWA Client Application"]
        ui["React / Vue HMI"]:::uiStyle
        sw["Service Worker"]:::swStyle
        idb["IndexedDB (Telemetry)"]:::dbStyle
        cache_api["Cache API (Assets)"]:::dbStyle
    end
    
    scada_backend["SCADA Telemetry Server (REST / WebSockets)"]:::serverStyle

    ui -->|Request Assets or Data| sw
    sw -->|Check Local Storage| cache_api
    sw -->|Check Local Storage| idb
    sw -.->|Network Fetch (If Online)| scada_backend
    scada_backend -.->|Cache Updates| sw

    classDef uiStyle fill:#2563eb,stroke:#fff,stroke-width:2px,color:#fff
    classDef swStyle fill:#16a34a,stroke:#fff,stroke-width:2px,color:#fff
    classDef dbStyle fill:#dc2626,stroke:#fff,stroke-width:2px,color:#fff
    classDef serverStyle fill:#9333ea,stroke:#fff,stroke-width:2px,color:#fff

Asset Caching vs. Data Caching

To achieve a seamless offline experience, you must cache two distinct types of resources:

  • Application Shell (Cache API): This includes the HTML, CSS, JavaScript bundles, and images required to render the HMI interface. Once cached, the dashboard loads instantly from the device’s hard drive, regardless of network status.
  • Dynamic Telemetry (IndexedDB): Real-time tag values, alarm histories, and historical trend data. Because this data is structured and constantly updating, IndexedDB is preferred over the Cache API or LocalStorage (which is synchronous and size-limited).

Engineering Resilient Control Commands

Displaying cached data is straightforward, but what happens when an operator attempts to acknowledge an alarm or start a motor while offline? Simply disabling the button frustrates the user, and silently failing is dangerous.

Implementing the Background Sync API provides a robust queueing mechanism. When an operator triggers a control action offline, the Service Worker intercepts the POST request and stores it in IndexedDB. Once the tablet reconnects to the plant Wi-Fi, the Service Worker automatically replays the queued commands against the SCADA backend. To prevent stale commands from executing (e.g., starting a pump 30 minutes too late), engineers must implement strict TTL (Time-To-Live) validations on the server side.

Comparison: Traditional Web SCADA vs PWA SCADA

Feature Traditional Web SCADA PWA SCADA (Offline-First)
Load Time Depends entirely on network latency. Instantaneous (loaded from local Cache API).
Network Loss Behavior “Site cannot be reached” error or frozen UI. UI remains responsive; stale data is clearly marked.
Command Handling Fails immediately if offline. Queued locally and synced when online via Background Sync.
Mobile Installation Runs strictly in the browser tab. Installable as a native-like app on iOS and Android.

Upgrade Your HMI Today

Relying on fragile, always-connected dashboards is a liability in heavy industrial environments. Implementing Progressive Web App technologies ensures your operators have continuous access to critical interfaces, even in the deepest dead zones of your facility.

If you’re looking to accelerate your development, explore our collection of production-ready components and templates in the AutomationView Store. Our pre-built HMI assets are designed with modern web standards in mind, helping you deploy robust interfaces faster.

Frequently Asked Questions

Can PWAs access device hardware like native apps?

Yes. Modern PWAs can access Bluetooth, serial ports (via Web Serial API), and local file systems, making them incredibly powerful for direct PLC communication or local configuration tasks without a network.

How do operators know they are looking at offline data?

A well-designed PWA must always display a prominent “Offline Mode” banner. The HMI should also visually gray out or add timestamp indicators to tag values to indicate the data is stale, preventing operators from making decisions based on outdated telemetry.

Are Service Workers compatible with all industrial tablets?

Service Workers are supported by all modern browsers (Chrome, Edge, Firefox, Safari). However, older tablets running outdated, legacy browsers (like Internet Explorer 11) cannot utilize them. An offline-first architecture must be built with progressive enhancement, so legacy devices fall back to standard web behavior.

Share this article

Stay Updated with HMI

Get the latest articles and news delivered directly to your inbox.

Log in to Subscribe

You must be registered and logged in to manage subscriptions.

Recommended for you

Next-Gen WebAssembly HMI: Native Performance for SCADA

HMI
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    A["Legacy SCADA"]:::redNode -->|"Compute Constraints"| B["WebAssembly HMI"]:::blueNode
    B -->|"Native Speed"| C["Edge Gateways"]:::greenNode
    B -->|"Portability"| D["Browser Displays"]:::greenNode
    
    classDef redNode fill:#dc2626,stroke:#b91c1c,color:#ffffff
    classDef blueNode fill:#2563eb,stroke:#1d4ed8,color:#ffffff
    classDef greenNode fill:#16a34a,stroke:#15803d,color:#ffffff
AutomationView Icon AutomationView
calendar_month

Next-Gen WebAssembly HMI: Native Performance for SCADA

Key Takeaways: WebAssembly bypasses standard JavaScript interpreters, delivering highly deterministic execution for compute-intensive industrial interfaces. Hybrid approaches are dominating: standard web technologies handle the DOM layout while WebAssembly processes real-time math and heavy signal rendering. Portability allows automation engineers to write core logic in memory-safe languages and deploy identical binaries to edge gateways and control […]

Read Article arrow_forward

Deep Dive: Integrating HTML5 Web Components into Modern SCADA Systems

HMI
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    A["Legacy HMI"] -.-> B["Proprietary Plugin"]
    B -.-> C["Vendor Lock-In"]
    D["Modern SCADA"] -->|HTML5 + SVG| E["Web Server"]
    E -->|WebSockets| F["Any Browser/Device"]
    
    style A fill:#e74c3c,stroke:#c0392b,color:#fff
    style B fill:#e74c3c,stroke:#c0392b,color:#fff
    style C fill:#c0392b,stroke:#a1281a,color:#fff
    style D fill:#2ecc71,stroke:#27ae60,color:#fff
    style E fill:#3498db,stroke:#2980b9,color:#fff
    style F fill:#9b59b6,stroke:#8e44ad,color:#fff
AutomationView Icon AutomationView
calendar_month

Deep Dive: Integrating HTML5 Web Components into Modern SCADA Systems

The industrial landscape is aggressively pivoting away from proprietary HMI plugins like ActiveX or Java applets. By transitioning to standard web technologies, automation engineers unlock responsive, hardware-agnostic control panels accessible from any authorized device. This guide unpacks the technical framework required for seamless HTML5 SCADA integration. The Middleware Layer: Bridging OPC UA to WebSockets Traditional […]

Read Article arrow_forward

WebSocket vs SSE: Architecting Real-Time HMI Telemetry

HMI
%%{init: {'theme':'dark', 'themeVariables': { 'background': '#001c38' }}}%%
flowchart LR
    client["Web HMI Client"]
    server["SCADA Gateway"]

    client -->|"HTTP Upgrade (ws://)"| server
    server -->|"Full-Duplex (WebSocket)"| client
    
    client -.->|"Standard HTTP"| server
    server ==>|"Unidirectional Push (SSE)"| client

    classDef wsFill fill:#2563eb,color:#ffffff,stroke:#1e40af
    classDef sseFill fill:#16a34a,color:#ffffff,stroke:#166534
    
    client:::wsFill
    server:::wsFill
AutomationView Icon AutomationView
calendar_month

WebSocket vs SSE: Architecting Real-Time HMI Telemetry

WebSocket vs Server-Sent Events (SSE) for Real-Time HMI Telemetry Modern industrial control systems require sub-second data streaming to provide operators with accurate situational awareness. When architecting web-based HMI telemetry dashboards, automation engineers face a critical decision: should you implement full-duplex WebSockets or rely on unidirectional Server-Sent Events (SSE)? Both protocols eliminate legacy polling techniques, but […]

Read Article arrow_forward