Overview
Edge Protocol Adaptation is implemented on edge gateways to convert between industrial field protocols and cloud IoT protocols. Industrial field devices mostly use protocols such as Modbus, OPC-UA, BACnet, Profibus, while cloud IoT platforms often use MQTT and HTTP. Edge protocol adaptation collects data from industrial protocols, converts it into a unified platform standard format (such as a JSON object model), and reports it to the cloud, achieving "plug-and-play cloud connectivity for industrial devices." It also supports the reverse: control instructions sent from the cloud are converted to industrial protocols and written into device registers, enabling remote control. This conversion happens at the edge, avoiding the need to modify existing industrial equipment and lowering the barrier for cloud adoption.
The core of protocol adaptation is "data mapping": mapping Modbus register addresses, OPC-UA node IDs, BACnet object properties, and so on to object model attribute identifiers. Since the register definitions differ among devices of different manufacturers and models, configuration or driver descriptions are required. EdgeX Foundry's Device Service, Node-RED's industrial nodes, and various manufacturers' edge gateways all provide protocol adaptation capabilities.
Core Functions
Multi-protocol support
- Modbus RTU/TCP: The most widely used industrial protocol, supports reading and writing coils, discrete inputs, holding registers, and input registers
- OPC-UA: Service-oriented industrial standard, supports complex data types, secure communication, and information models
- BACnet: Building automation standard, commonly used for air conditioning, lighting, access control, and other equipment
- Proprietary Protocols: Extended via scripts or plugins, supports vendor-specific protocols
Data Mapping and Acquisition
Register Address → Thing Model Property (e.g., 40001 → temperature). Supports data type conversion (integer, float, string, bit field). Acquisition cycle configurable (polling interval, change reporting, event triggering). Supports batch read optimization to reduce request frequency.
Bidirectional Conversion
Uplink: Industrial protocol read → Thing model format → MQTT publish. Downlink: Cloud MQTT command → parse → industrial protocol write. Supports pre-write read verification and post-write confirmation. Details such as byte order and register type (e.g., single-precision float occupying 2 registers in Modbus) need to be handled.
Typical IoT Applications
Industrial Devices to the Cloud: PLCs, inverters, and temperature controllers connect to the edge gateway via Modbus, data is converted to MQTT and reported to the cloud platform, enabling remote monitoring, fault warning, and energy efficiency analysis.
Building Automation: BACnet devices such as air conditioning, lighting, and elevators are connected, and data is aggregated and uploaded to the smart building platform, supporting centralized control and energy optimization.
Energy Collection: Electric meters, water meters, and gas meters are connected via Modbus or DL/T645, with edge gateways performing protocol conversion and data aggregation, supporting the energy management platform.
Implementation Framework
EdgeX Foundry's Device Service provides standardized device access abstraction and allows development of protocol drivers such as Modbus and OPC-UA. Node-RED achieves protocol conversion through visual workflows, suitable for rapid prototyping. Commercial edge gateways (such as Huawei AR, Advantech) often include built-in protocol libraries. Selection should consider protocol coverage, performance, and scalability.