In Development

Equipment Gateway

Auto-generate equipment APIs from a single YAML config

equipment-gateway
equipment-gateway

The Problem

🔀

Protocol Fragmentation

Manufacturing floors use a mix of Modbus TCP, OPC-UA, and MQTT devices from different vendors. Each protocol requires its own library, connection logic, and data parsing — making integration a recurring engineering bottleneck.

⌨️

Manual API Development Per Equipment

Every new equipment model required developers to write custom REST endpoints, register mappings, and polling logic from scratch. Adding a single product type could take days of boilerplate coding and testing.

📡

No Unified Monitoring

Equipment status was checked through vendor-specific tools or manual inspections. There was no single dashboard to visualize real-time health, detect anomalies, or track historical trends across all connected devices.

Before

Custom backend code written for every new equipment model

After

Add a YAML file and REST APIs are auto-generated — zero backend code per product

Before

Separate tools and scripts per communication protocol

After

Unified protocol adapter layer handling Modbus TCP, OPC-UA, and MQTT transparently

Before

Equipment status checked manually or via vendor-specific software

After

Real-time monitoring dashboard with time-series visualization and alerting

Approach

Configuration-Driven Architecture

Instead of writing code for each equipment type, the gateway reads YAML configuration files that define equipment models — registers, data types, polling intervals, and API endpoints. A code-generation layer transforms these definitions into fully functional REST APIs at startup. Protocol adapters abstract away communication differences, so the same YAML schema works whether the device speaks Modbus TCP, OPC-UA, or MQTT. This approach turns equipment onboarding from a development task into a configuration task, enabling operations engineers to add new products without writing a single line of code.

Define
Execute
Collect
Report

BDD Pipeline Flow

Key Features

yaml-driven-equipment-config
yaml-driven-equipment-config

YAML-Driven Equipment Config

Define equipment models declaratively in YAML — register addresses, data types (INT16, FLOAT32, BOOL), scaling factors, and polling tiers. The gateway parses these definitions at startup and auto-generates typed REST endpoints, entity schemas, and polling schedules. No backend code changes needed to onboard a new product.

multi-protocol-support
multi-protocol-support

Multi-Protocol Support

Pluggable protocol adapter architecture supporting Modbus TCP, OPC-UA, and MQTT out of the box. Each adapter implements a common interface for read/write operations, so equipment definitions remain protocol-agnostic. Adding a new protocol means implementing one adapter — all existing YAML configs work automatically.

auto-generated-rest-api
auto-generated-rest-api

Auto-Generated REST API

REST endpoints are dynamically generated from YAML definitions — GET for current values, POST for write commands, and WebSocket streams for real-time updates. The Entity Store maintains in-memory state with change detection, serving cached responses in microseconds while 3-tier polling (100ms / 500ms / 1s) keeps data fresh from the equipment.

real-time-equipment-monitoring-dashboard
real-time-equipment-monitoring-dashboard

Real-time Equipment Monitoring Dashboard

Visual dashboard built with ReactFlow showing live equipment topology and real-time sensor values. Time-series data streams into InfluxDB for historical trend analysis, anomaly detection, and configurable alerting thresholds. Engineers can monitor entire production lines from a single screen.

Architecture

SPAREST / WSConfig LoadTime-seriesPollPollSubscribeModbus TCPOPC-UAMQTT
Browser
React + ReactFlow
FastAPI Gateway
YAML Config
InfluxDB
Modbus TCP Adapter
OPC-UA Adapter
MQTT Adapter
Equipment / PLC
Client
Server
Database
Service
External

Results

0
Lines of Code Per Product

New equipment types onboarded with YAML config only

100ms
Min Polling Interval

3-tier polling with register auto-merging for efficiency

3
Protocols Supported

Modbus TCP, OPC-UA, and MQTT via pluggable adapters

24/7
Continuous Monitoring

Real-time equipment health tracking with alerting