Gateway GW22 / GW22-D Modbus TCP & MQTT Protocol Integration Guide
Official technical specification extracted from VTI Gateway Installation & Configuration Guide Firmware V2.0.0. Complete Modbus TCP register map, MQTT telemetry payload syntax, configuration keys, and field troubleshooting.
Engineering Quick Reference
The VTI Gateway GW22 / GW22-D operates simultaneously as an industrial Modbus TCP Server (Port 502, 32-bit Float Word-Swapped) and an MQTT Client (Broker aiplatform.vn:1883, QoS 1). Up to 1,000 wireless temperature sensors (VTI-TS-22 / VTI-TS-26) and RS485 sub-meters (PD, PT100, MFM384, MRJ4M, Noise) are mapped into standardized registers for seamless SCADA, DCS, and utility EMS integration via IEC 60870-5-104 Master/Slave.
Giao diện Live View & Sơ đồ Thu Thập Dữ liệu Cảm biến Gateway
Giao diện điều khiển giám sát tập trung thu thập dữ liệu từ cảm biến tự cấp nguồn VTI-TS-26 / VTI-TS-22 và đẩy lên SCADA / Cloud:
1. Modbus TCP Register Map (Port 502, 32-bit Float Word-Swapped)
All analog measurements are stored as IEEE 754 32-bit floating point numbers across two consecutive 16-bit registers using Word-Swapped byte ordering.
| Data Group | Register Address | Data Format | MQTT PointID | SCADA Technical Description |
|---|---|---|---|---|
| System Information | 0 / 2 / 4 / 6 |
32-bit Float (Word-Swapped) | {ID}_Stt |
Firmware version, Hardware version, Device ID, License & Heartbeat (Uptime, RAM, % thẻ nhớ SD, trạng thái mạng). |
| Liquid Level (Mức dầu MBA) | 10 |
32-bit Float (Word-Swapped) | Cổng Analog (liquidSensor = 1) |
Giám sát liên tục mức chất lỏng / mức dầu máy biến áp từ xa qua cổng Analog 4-20mA (mm hoặc %). |
| Noise Sensor (Cảm biến Tiếng ồn) | 100 + i * 2 |
32-bit Float (Word-Swapped) | {ID}_N{slave} |
Độ ồn từ trường lõi thép máy biến áp và âm thanh phóng điện (dB) thu thập qua bus RS485 (noiseID). |
| Partial Discharge - PD (Phóng điện cục bộ) | 200 + i * 168 |
84 Floats / thiết bị (Word-Swapped) | {ID}_PD{slave}_{0..83} |
84 thông số Float chuyên sâu trên mỗi bộ đo phóng điện cục bộ PD qua RS485 (pdID), biểu diễn phổ pha PRPD. |
| PT100 Arrays (Nhiệt độ PT) | 4000 + i * 250 |
32-bit Float (Word-Swapped) | {ID}_PT{slave}_{0..N-1} |
N điểm đo nhiệt độ cuộn dây/dầu qua RS485 (ptID, mặc định ptSensorNumber = 8). |
| MFM384 Multifunction Meter | 9000 + i * 60 |
30 Floats / đồng hồ (Word-Swapped) | {ID}_MFM{slave}_{0..29} |
30 thông số điện năng cơ bản trên mỗi đồng hồ đa năng Selec MFM384 qua RS485 (mfm384ID): V, A, kW, kVA, PF, Hz. |
| MRJ4M Power Quality Meter | 11000 + i * 336 |
168 Floats / đồng hồ (Word-Swapped) | {ID}_MRJ{slave}_{0..167} |
168 thông số chất lượng điện năng & sóng hài trên mỗi đồng hồ MRJ4M qua RS485 (mrj4mQuadID): THD, sóng hài bậc cao. |
| Wireless Thermal Sensors (VTI-TS) | 30000 + i * 2 |
32-bit Float (Word-Swapped) | Mã UUID trong mảng uuid |
Nhiệt độ thời gian thực (°C) từ mạng cảm biến không dây VTI-TS-22 / VTI-TS-26 (hiệu chuẩn sai số qua tempArrOfset). |
| Wireless Environment Sensors | 40000 + i * 6 |
3 Floats / cảm biến (Word-Swapped) | Mã UUID trong mảng uuidEnvi |
Bộ 3 thông số môi trường trạm: Nhiệt độ môi trường (°C), Độ ẩm không khí (%RH) và Áp suất / Điểm sương. |
2. MQTT Protocol Payload Specification (QoS 1)
High-reliability telemetry uplink pushing packets at regular intervals with circular SD card buffer backup.
- MQTT Broker mặc định:
aiplatform.vn(hoặc IP trạm nội bộ) | Port:1883(TCP) /8883(TLS) - Chất lượng Dịch vụ (QoS):
1(At least once delivery) - Chu kỳ gửi (Send Interval):
180s(3 phút, tự động kích hoạt cờResynckhi mạng phục hồi) - Cấu trúc Topic:
td.thermal/bulk/str/{Marker ID}/{Device ID}
Standard Payload String Structure
*DateTime*<YYYYMMDDHHMMSS>*DataType*0*PointID*<id1;id2;...>*Data*<v1;v2;...>#
Practical Telemetry Example
*DateTime*20261019120000*DataType*0*PointID*101;102;103;104*Data*45.2;48.6;51.0;44.8#
3. System Configuration Parameter Reference (Firmware V2.0.0)
Complete parameter registry configured via Gateway local web interface at 192.168.27.10 or pushed remotely from VTI AI Platform.
| Configuration Key | Data Type / Default | Technical Purpose & Configuration Range |
|---|---|---|
deviceType | Integer (0 hoặc 1) | Chế độ Gateway: 0 = Master (đẩy dữ liệu Cloud/SCADA), 1 = Slave (thu gom cụm chuyển tiếp về Master). |
markerID | String | Mã định danh trạm biến áp / nhà máy trên VTI AI Platform (ví dụ: TBA_22KV_AOHAI). |
deviceID | String | Mã định danh duy nhất của thiết bị Gateway trong cây phân cấp tài sản. |
mqttIP | String (aiplatform.vn) | Địa chỉ tên miền hoặc IP tĩnh máy chủ MQTT Broker tiếp nhận dữ liệu. |
mqttPort | Integer (1883) | Cổng dịch vụ MQTT (1883 cho TCP chuẩn, 8883 cho MQTT bảo mật qua TLS). |
modbusTCPPort | Integer (502) | Cổng dịch vụ Modbus TCP Server tích hợp sẵn cho SCADA / DCS trạm kết nối. |
modbusTimeout | Integer (3600) | Thời gian chờ kết nối Modbus TCP (giây), duy trì phiên kết nối an toàn với Master SCADA. |
uuid | Array of Strings | Danh sách các mã UUID (12 ký tự hex) của cảm biến nhiệt độ không dây VTI-TS-22 và VTI-TS-26 gán vào Gateway (hỗ trợ cấp phát động tới 5,000 khe). |
uuidEnvi | Array of Strings | Danh sách các mã UUID của cảm biến môi trường (nhiệt độ, độ ẩm trạm). |
tempArrOfset | Array of Floats | Mảng giá trị dịch bù hiệu chuẩn nhiệt độ (°C) cho từng cảm biến đo để triệt tiêu sai số lắp đặt thực tế. |
liquidSensor | Integer (0 hoặc 1) | Kích hoạt thu thập cảm biến mức chất lỏng / mức dầu MBA qua cổng Analog (1 = enable, 0 = disable). |
mfm384ID | Array of Integers | Mảng địa chỉ Slave ID (1..247) cho các đồng hồ đa năng Selec MFM384 qua bus RS485. |
mrj4mQuadID | Array of Integers | Mảng địa chỉ Slave ID (1..247) cho các đồng hồ phân tích chất lượng điện MRJ4M qua RS485. |
pdID | Array of Integers | Mảng địa chỉ Slave ID (1..247) cho các module đo phóng điện cục bộ cao tần PD qua RS485. |
ptID | Array of Integers | Mảng địa chỉ Slave ID (1..247) cho các module đo nhiệt độ điện trở PT100 qua RS485. |
noiseID | Array of Integers | Mảng địa chỉ Slave ID (1..247) cho các cảm biến tiếng ồn phát hiện phóng điện qua RS485. |
rtuBaudRate | Integer (9600) | Tốc độ truyền thông RS485 Modbus RTU, mặc định 9600 bps (cấu hình 8 data bits, no parity, 1 stop bit - 8N1). |
ptSensorNumber | Integer (8) | Số lượng kênh cảm biến PT100 trên mỗi module phần cứng mở rộng (mặc định 8 kênh). |
selfWifiSSID | String (VTI_GW22-XXXX) | Tên mạng WiFi Access Point phát nội bộ để kỹ sư hiện trường kết nối cấu hình cục bộ; địa chỉ IP tĩnh quản trị là 192.168.27.10. |
sensorScanTime | Float (0.76s) | Thời gian mở cửa sổ vô tuyến quét và thu thập gói tin từ cảm biến không dây VTI-TS (0.76 giây). |
sleepTime | Float (0.49s) | Thời gian nghỉ ngủ năng lượng thấp giữa các chu kỳ quét cảm biến (0.49 giây) tối ưu công suất và giảm nghẽn RF. |
mqttSendInterval | Integer (180s) | Chu kỳ đóng gói và đẩy dữ liệu lên MQTT Broker (180 giây = 3 phút). Tự động kích hoạt cờ Resync khi mạng phục hồi. |
waPhone | String | Danh sách số điện thoại nhận thông báo khẩn cấp qua ứng dụng WhatsApp. |
waApiKey | String | Khóa API Key tích hợp CallMeBot API gửi cảnh báo WhatsApp tự động (tối đa 6 cảm biến/tin nhắn, rate limit 15 phút/lần). |
4. Field Troubleshooting Procedures (Firmware V2.0.0 - Section 10)
Step-by-step resolution workflows for field deployment and maintenance engineers.
4.1. Loss of Local WiFi Access Point Configuration
Inspect the Power LED on the Gateway: solid green confirms nominal 12V–24V DC supply. If SSID VTI_GW22-XXXX is not visible, press and hold CFG button for 3 seconds to re-enable local AP. Connect and navigate to static IP http://192.168.27.10/ without proxy or VPN.
4.2. Diagnostic Heartbeat Telemetry Verification ({ID}_Stt)
Subscribe to MQTT topic {ID}_Stt to verify: Uptime (detect unexpected power resets), Free RAM (>20% required), SD_Usage (format FAT32 if >95%), and 4G LTE signal CSQ (requires 12 to 31; if CSQ < 10, mount external extension antenna outside metallic enclosure).
4.3. SCADA Modbus TCP Server Port 502 Verification
If SCADA reads corrupted NaN or abnormal exponent numbers: Gateway registers store IEEE 754 32-bit Float Word-Swapped values. Configure master poller to "Word Swap" or "Byte Swap" mode. Ensure port 502 is not blocked by station network firewall and modbusTimeout is set to >= 3600s.
4.4. RS485 Sub-Bus Verification
Verify baud rate synchronization (rtuBaudRate = 9600 bps, 8N1). Verify no duplicate Slave IDs exist on the same line. Measure differential voltage between A and B lines (2V to 6V DC nominal). Ensure 120 Ohm termination resistors are installed at both ends and surge protection grounding is bonded.
4.5. Circular MicroSD Storage & Automated Resync Verification
During extended 4G or Ethernet outages, Gateway automatically stores measurements in a circular MicroSD buffer. Once network connectivity is restored, the Resync flag activates, sequentially streaming historical telemetry to aiplatform.vn:1883 alongside real-time data until Resync_Done is achieved.