UNIHH-IOTUNIHH-IOT
Home
Guide
Manual
  • 简体中文
  • English
GitHub
Home
Guide
Manual
  • 简体中文
  • English
GitHub
  • Guide

    • Introduction
    • Quick Start
    • Architecture
    • Driver Development Guide
    • Deployment and Operations

Architecture

Overview

Five layers from top to bottom: physical devices connect through field buses into standalone protocol drivers; all interaction between drivers and core microservices runs over the EMQX message bus; the storage layer routes data by shape through policy routing.

UNIHH-IOT architecture

Services

Independent microservice processes

ModuleTypeDefault portResponsibility
unihh-gatewayMicroservice28000Single entry point, REST routing, CORS, JWT auth interception
unihh-adminMicroservice28001RBAC, device registry, thing models, driver lifecycle, control commands
unihh-dataMicroservice28002Point normalization, rule computing, alert triggering, storage routing
unihh-driver-modbusDriver28011Modbus TCP/RTU acquisition and register write-back
unihh-driver-s7Driver28012Siemens S7-200 SMART/300/1200/1500, DB blocks and memory areas
unihh-driver-opcuaDriver28013OPC UA NodeId acquisition and method calls

Shared Maven SDK modules

ModuleResponsibility
unihh-commonShared models (PointData, DriverInfo, DeviceConfig), unified response body, EMQX client foundation
unihh-protocolDriver base class AbstractDriverPlugin, polling engine DriverPollingEngine, endpoint controller BaseDriverController, IndustrialEndianUtils
unihh-storageStorage interface DataStorageEngine, router StorageEngineRouter, built-in Memory/Redis/MySQL/TDengine engines

Technology Stack

LayerTechnologyNotes
FrameworkJava 8 / 17 + Spring BootLean service runtime
BuildMavenMulti-module dependency management
GatewaySpring WebRouting, CORS, JWT interception
Message busEMQX 5.xMQTT 5.0 shared subscriptions and retained messages
Driver foundationunihh-protocolBase classes, polling engine, LWT keep-alive, REST debug endpoints
PersistenceTDengine 3.x / TimescaleDB / MySQLTime-series and configuration data
CacheRedisReal-time point mirror, tokens and sessions
FrontendVue 3 + Element Plus + Vite + EChartsAdmin console and industrial dashboards

Core Data Flows

Driver lifecycle and last-will keep-alive

Drivers register themselves on startup and stay alive with a 5-second heartbeat; abnormal disconnects are covered by both the LWT will message and the watchdog.

Driver lifecycle and LWT keep-alive sequence

Key points:

  • The admin center senses driver shutdown or crash within seconds, either via LWT or the watchdog;
  • The watchdog is the second line of defense: a driver is declared offline after 15 seconds without a heartbeat;
  • When a driver goes offline, its devices are cascaded offline to avoid phantom online states.

Acquisition and storage fan-out

Telemetry enters the data center over the bus, passes rule and alert checks, then lands in storage routed by data shape.

Acquisition and storage fan-out

Write-back control chain

Control commands pass gateway auth, then reach the driver over a dedicated MQTT topic and are written inside the channel lock.

Write-back control chain

Reads and writes on half-duplex buses (e.g. RS485) are queued through the channel lock automatically — see the Driver Management manual.

MQTT Topics

All driver interactions run over MQTT topics. The complete topic table lives in the MQTT Topic Reference.

Edit this page on GitHub
Last Updated: 11/13/26, 3:34 AM
Contributors: sunqi
Prev
Quick Start
Next
Driver Development Guide