HomeCase studiesConfigurable Edge PLC Monitoring and Water Pump...

Case study · Auckland, New Zealand

Configurable Edge PLC Monitoring and Water Pump Control Platform

Industrial IoT and utility field operations — remote monitoring and pump/level control for water infrastructure

Water utilities and rural pump operators frequently inherit heterogeneous PLC hardware scattered across remote bores, reservoirs, and lift stations where cellular links drop without warning and every site exposes different register maps. We engineered a configurable edge monitoring and supervisory control platform combining Python edge gateways, Socket.IO real-time telemetry streaming, a React and Tailwind web console, and a React Native field app sharing TypeScript and Redux domain models. Technicians configure site tag schemas dynamically without redeploying code, retain local SQLite ring buffers through outages, and issue interlocked pump commands with full acknowledgement audit trails.

Industry
Industrial IoT and utility field operations — remote monitoring and pump/level control for water infrastructure
Solution
A cross-platform telemetry, configurable dashboard, and field control system spanning Python edge PLC gateways, a Socket.IO relay layer, a React web console, and a React Native mobile app.
Platforms
Cross-platform
Stack
React Native · React · TypeScript · Tailwind · Socket.IO · Python
Location
Auckland, New Zealand · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Auckland, New Zealand. Names withheld by agreement.

Project Overview

Managing distributed water infrastructure across rural catchments and municipal pump stations around Auckland means contending with mismatched programmable logic controllers, patchy cellular coverage, and field technicians who need reliable telemetry on a phone while standing beside a wet well. Traditional SCADA packages lock operators to fixed control-room desktops or demand costly engineering hours every time a site swaps a level transducer or adds a bore pump. We built a configurable edge PLC monitoring, automation, and field operations platform combining Python edge gateways, Socket.IO real-time streaming, a React and Tailwind web dashboard, and a React Native mobile application powered by shared TypeScript and Redux state layers.

Business Bottleneck

Field crews faced two persistent problems: hardware heterogeneity and blind spots during backhaul dropouts. Because pump stations had been upgraded piecemeal across years, register layouts, scaling formulas, and fault bits varied widely from site to site. Hardcoding mobile screens for a single PLC template broke the moment a technician commissioned a new valve actuator. At the same time, telemetry bridges that streamed values purely in memory lost hours of reservoir trend history whenever cellular links flapped during storms—leaving engineers blind to pump-cycling faults that occurred mid-outage.

Architectural Strategy

We pushed protocol adaptation and outage resilience to the edge while keeping UI rendering completely schema-driven. Lightweight Python gateways sit beside site PLCs, translating Modbus registers into normalized tag payloads using versioned JSON schemas and buffering unsent intervals inside local SQLite storage. Live readings and supervisory commands flow over authenticated Socket.IO channels into normalized Redux stores shared conceptually between the React web console and the React Native field app.

Core Capabilities

  • Configurable Tag & Widget Schemas: Engineers map PLC register addresses, engineering units, hysteresis bands, and dashboard tiles (tank gauges, pump state switches, pressure trends) dynamically via configuration.
  • Store-and-Forward Edge Buffering: Python gateways persist timestamped telemetry locally in SQLite during cellular outages and replay backlogs automatically upon reconnection.
  • Interlocked Pump & Valve Control: Two-phase command execution validates operator permissions, hardware permissive bits, and timeout boundaries before confirming state transitions.
  • Unified Web & Field Experience: Control-room staff use a Tailwind-styled React console while roaming technicians use a cross-platform React Native app backed by identical TypeScript telemetry models.
  • Deadbanded Alarm Engine: Separates transient sensor noise from genuine high-level overflows, dry-run pump trips, and gateway heartbeat losses.

Technical Architecture

Flow: Site PLCs (Modbus/Serial) <-> Python Edge Gateway (SQLite Ring Buffer) <-> Socket.IO Telemetry & Command Relay <-> Redux + TypeScript Clients (React / Tailwind Web & React Native Mobile)

At each water station, the Python edge daemon runs an asynchronous polling loop driven by the site's active tag manifest. Raw register integers pass through configured linear scaling and deadband filters; any reading exceeding its delta threshold or sampling interval writes immediately to a local SQLite WAL buffer and queues for emission over a persistent TLS-secured Socket.IO connection.

When an operator toggles a pump setpoint from either the React console or React Native app, the client dispatches an optimistic commandPending Redux action carrying a correlation UUID and timeout deadline. The Socket.IO server authenticates the operator's site-control role and forwards the directive to the target gateway. The Python gateway checks local safety permissives, writes the coil or register, reads back the PLC confirmation register, and emits a matching command-acknowledgement event back through Socket.IO so all connected dashboards reconcile cleanly.

Technology Stack

Category Technology detail
Edge gateway runtime Python asynchronous daemon polling industrial PLCs over Modbus/TCP and serial
Edge outage buffer SQLite write-ahead log ring buffer storing unsent telemetry during backhaul drops
Real-time transport Socket.IO bidirectional namespaces for live telemetry, alarms, and control acks
Web operator console React with TypeScript and Tailwind CSS for responsive control-room views
Field mobile client React Native cross-platform iOS and Android app for on-site technicians
Client state layer Redux Toolkit normalized store synchronizing site topology, alarms, and tag streams
Configuration engine Schema-driven register-to-widget mapping enabling zero-code site onboarding
Shared domain types Strict TypeScript contracts shared across web console and mobile client
Control safety layer Two-phase command-verify lifecycle with interlock checks and operator audit trail

Engineering Trade-offs & Solutions

Architectural Dilemma Chosen Solution & Rationale
Hardcoded SCADA screens vs. schema-driven UI Custom screens per station create maintenance debt with every sensor retrofit. Defining telemetry panels as declarative tag-to-widget manifests lets field engineers onboard varied PLC hardware without touching React or React Native codebases.
In-memory streaming vs. SQLite edge persistence Volatile queues lose critical pump-fault history during rural cellular blackouts. Writing every polled interval to a bounded SQLite ring buffer guarantees chronological backfill when backhaul returns without exhausting edge flash storage.
Optimistic UI toggles vs. read-back confirmation Flipping a pump icon immediately on tap misleads operators if a command drops or a PLC interlock rejects it. Keeping switches in a spinner-locked pending state until the gateway returns a verified PLC read-back prevents dangerous false assumptions.
Raw register polling vs. edge deadbanding Streaming unchanged analog levels every second saturates rural cellular plans and floods Redux reducers. Edge deadbanding transmits steady state quietly while propagating rapid pressure spikes or tank trips instantaneously.

Security & Reliability

Edge gateways authenticate using site-specific credentials over TLS, while operator control actions require explicit role authorization scoped to assigned water zones. If a Socket.IO link drops mid-command, expired directives fail safe without leaving partial state, and local PLC ladder logic remains the ultimate guardian over physical tank high-high cutouts and pump dry-run protection. Every setpoint change, alarm acknowledgement, and schema edit records the acting user, timestamp, and before/after values for utility compliance audits.

Performance & Scale

Normalized Redux slices partition telemetry by siteId and tagId, allowing React and React Native views to subscribe granularly to visible cards without re-rendering inactive stations during multi-site alarm bursts. On reconnection after an outage, gateways drip-feed historical SQLite backlogs on a lower-priority stream so live alarm notifications and operator commands remain responsive in real time.

Operational Outcomes

Utility engineers gained the flexibility to commission diverse pump stations and reservoir sensors through configuration rather than bespoke app releases. Field technicians carried the same live visibility and interlocked control capability into remote pump sheds that control-room staff saw on Tailwind web dashboards, while continuous edge buffering eliminated telemetry gaps after regional network interruptions.

01 — Questions

asked about this kind of project

How does the system handle rural sites where cellular connectivity drops for hours?

Each Python edge gateway writes polled PLC register snapshots to a local SQLite ring buffer before attempting Socket.IO transmission. While offline, local PLC safety logic continues governing tank levels autonomously; once cellular backhaul recovers, the gateway drains buffered historical intervals in chronological order so trend graphs backfill without gaps.

Why make PLC register mappings configurable instead of hardcoding pump and tank widgets?

Water sites accumulate mixed PLC vendors and firmware revisions over decades—one bore station stores tank level in holding register 40012 as scaled milliamps while another uses 30004 in meters. A schema-driven tag mapper lets engineers bind register addresses, scaling factors, alarm thresholds, and UI widget types from configuration rather than shipping custom mobile or web builds per site.

How do you make remote pump start/stop commands safe over an asynchronous Socket.IO connection?

Remote commands never behave like fire-and-forget toggles. A command enters a pending state with a unique correlation ID and short expiry timer, routes to the specific site's Python gateway, verifies PLC permissive interlocks before writing the coil, and returns an explicit PLC read-back confirmation to Redux before the UI reflects the new running state.

How do React on the web and React Native on mobile stay aligned as new widget types are added?

Both applications share TypeScript schemas, Redux slice definitions, unit-conversion helpers, and alarm severity rules. Only the leaf presentation primitives differ—Tailwind-styled components on the web console and native components in React Native—preventing telemetry calculation drift between control room and field screens.

How do you prevent high-frequency PLC polling from overwhelming Socket.IO clients?

The Python gateway performs change-of-value deadbanding and configurable sampling intervals at the edge, emitting immediate deltas on significant level shifts or faults while batching steady-state readings. On the client side, Redux selectors memoize per-site streams so updating one pump station never triggers full-dashboard re-renders.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.