Case Study — Industrial Gateway

Multi-protocol gateway orchestrating energy and industrial assets — bridging legacy field buses to cloud with secure OTA and custom on-device logic.

overview

The Industrial Gateway enables brownfield plants and energy sites to connect heterogeneous devices and protocols into a unified, secure data plane. It runs on embedded ARM (tested on Raspberry Pi), Linux and Windows hosts, and can be ported to other platforms. Typical use includes power optimization, multi-vendor synchronization, smart metering, and forwarding to cloud analytics and dashboards.

Running platforms

Embedded ARM • Linux hosted • Windows hosted • Portable to others

Storage

Local: InfluxDB, SQLite • Cloud storage (self-hosted or public cloud)

Highlights
  • JSON-based configuration
  • OTA updates
  • ThingsBoard integration
  • Built-in V8 for JavaScript custom logic
  • Web UI for easy configs (in development)
  • Protocol converter / multi-forwarder (e.g., M-Bus → Modbus)

protocols & interfaces

Communication protocols
Modbus TCP/IP Modbus RTU (RS-485) IEC-101 IEC-104 SunSpec M-Bus DALI bus CAN bus EtherCAT MQTT Digital I/O via GPIO

Supports protocol data conversion and multi-destination forwarding.

Communication interfaces
Bluetooth / BLE Serial GPIO SPI I2C Ethernet Wi-Fi LoRa

Interface availability depends on target hardware.

solution architecture

  • Adapters for Modbus, IEC-101/104, SunSpec, M-Bus, DALI, CAN, EtherCAT, MQTT.
  • Normalization with tag mapping, units and quality flags.
  • Buffering using local DB (InfluxDB/SQLite) with back-pressure & retry windows.
  • Rules engine running JavaScript (V8) for on-device logic and PLC writes.
  • Transport via MQTT with TLS/mTLS to cloud or self-hosted platforms (e.g., ThingsBoard).
  • OTA updates with rollback safety; JSON configs for rapid rollout.
  • Observability for device health, logs and metrics.
High-level data path
Field & plant

PLCs, meters, inverters, sensors
Modbus / IEC-101/104 / SunSpec / M-Bus / DALI / CAN / EtherCAT

Gateway

Adapters • JS rules • Buffer • Protocol convert • OTA

Cloud / DC

MQTT broker • ingestion • dashboards • reporting • integrations

tested sites & deployments

Supermarket — power control & management

Integrations: PV (inverters from FIMMER), Battery PRIME (SMA inverter + custom BMS), diesel generator (Modbus RTU), grid limit 40 kW, EV charging, pumps, lights, and site meters. Gateway optimizes daily power flows, enforces instant grid cap (40 kW), dispatches battery/PV/diesel as needed, and forwards live telemetry to cloud for reporting and integrations.

Outcome: Resolved over-limit spikes (>70 kW) by orchestrating storage and generation.

Large factory — solar park orchestration

Integrations: PV (FIMMER, Huawei), Battery PRIME (custom BMS + ABB (HITACHI) inverter), plant equipment and engines. Gateway synchronizes multi-vendor assets, performs site-level optimization, meters equipment, streams to a self-hosted cloud, and runs custom local/cloud logic per client requirements.

Outcome: Unified control across mixed vendors; site-specific rules executed reliably.

Shipyard — high-demand site control

Integrations: PV (inverters from FIMMER), Battery PRIME (custom BMS + HITACH modular inverter), heavy equipment and engines. Gateway coordinates production/consumption, enforces limits, meters loads, streams to cloud, and executes local & remote logic.

Outcome: Daily optimization and vendor synchronization under variable loads.

Warehouse campus — rooftop PV & tenants

Gateway handles energy optimization, HVAC and lighting control, smart metering, and per-tenant reporting/rules across locations.

Outcome: Fair allocation and savings transparency for multiple tenants.

Dual-grid store — battery arbitrage

Site with two grid connection points and one battery. Gateway switches the battery to inject/consume on either grid based on client logic and limits, performs smart metering, streams to cloud, and runs local/cloud-controlled logic.

Outcome: Reduced peak charges and improved resilience.

Power plant — generation & storage control

Orchestrates gas engines, steam turbines, solar, and batteries. Integrations with local TSO and facilitation for Virtual Power Plant aggregation.

Outcome: Optimal production and storage dispatch with grid integrations.

configuration & operations

Easy to configure
  • Single JSON file defines devices, adapters, tags, forwards, and rules.
  • Protocol converter: one-to-one, one-to-many (e.g., M-Bus → Modbus + MQTT).
  • Templateable deployments by site and vendor.
Operate & update
  • OTA updates with staged rollouts and rollback.
  • Local UI (under development) for quick edits and predefined profiles.
  • Health metrics, logs, and alerts for proactive maintenance.

tech stack

C / C++ JavaScript (V8) Python Linux (embedded & x86) Windows MQTT / TLS / mTLS InfluxDB SQLite IEC-101 / IEC-104 Modbus TCP / RTU SunSpec M-Bus DALI / CAN / EtherCAT ThingsBoard Docker (optional)

Deployed on Raspberry Pi and industrial PCs; adaptable to other targets.