Building Verge: An AI‑Assisted Edge Gateway That Delivers Plug‑and‑Play IoT Management
The article details how Verge, an AI‑assisted edge gateway built on the open‑source driver‑box framework, transforms a pure engine into a full‑featured, lightweight IoT platform by decoupling cloud and edge, offering rapid device integration, visual model editing, Lua scripting, and flexible deployment for smart building, industrial automation, and hobbyist labs.
Background and Motivation
During the recent Spring Festival, the author used VibeCoding to develop Verge, a new product built on the open‑source edge gateway project driver‑box , which previously earned the Gitee Most Valuable Open‑Source Project award. driver‑box provides powerful device‑access capabilities but is essentially a "pure engine" that requires developers to build a complete system from scratch, similar to Spring in the Java ecosystem.
Motivated by recent work changes and the desire to address recurring IoT challenges, the author set out to create Verge with three goals:
Turn driver‑box into a complete product.
Eliminate the need for developers to start from zero.
Provide out‑of‑the‑box device management, data collection, and rule‑engine features.
Key Challenges in Traditional IoT Projects
Device integration complexity : Requires large amounts of custom code.
Low management efficiency : Multiple systems create data silos.
High expansion cost : Feature customization leads to long development cycles.
Verge addresses these issues with protocol templates plus Lua scripts that enable device onboarding in five minutes, a unified platform that integrates devices, data, and applications, and a flexible extension mechanism that quickly responds to business needs.
Architectural Innovation: Cloud‑Edge Decoupling
Traditional edge solutions are monolithic—like a car where the engine, air‑conditioning, and navigation are all coupled, making any change a major overhaul. Verge’s logic is to "decouple":
Edge side : Handles only stable, reliable device access; runs on as little as 128 MB of memory.
Application side : Hosts business logic in the cloud or locally, supports hot updates and rapid iteration, and does not affect edge stability.
This design means the edge gateway can remain unchanged for years while business functionality can be updated weekly.
Open‑Source Foundations and Productized Features
Verge inherits driver‑box’s proven device‑access capabilities (Gitee GVP certified) and adds product‑level features:
Ready‑to‑use management UI.
Visual device‑model designer.
Distributed multi‑node management.
Enterprise‑grade permission, licensing, and security.
Design Details: Cloud‑Edge Communication
Communication between the cloud and edge gateway relies on two technologies:
SSE (Server‑Sent Events) : Establishes a long‑lived connection so the cloud can push messages at any time.
JSON‑RPC 2.0 : Standard remote‑call protocol, described as the "Mandarin" of APIs.
Typical communication flow:
1️⃣ Login (serial‑number authentication) → Cloud returns token
2️⃣ Establish SSE long connection
3️⃣ Periodically report device shadow & node metadata
4️⃣ Cloud issues control command via JSON‑RPC
5️⃣ Edge executes operation and returns resultSupported JSON‑RPC methods include device.control, devices.add, devices.delete, devices.report, products.report, product.import, node.configChanged, and node.networkStatus.
Product Overview
Verge offers a complete IoT device lifecycle management suite:
Product Management : Device‑model definition, Lua driver development, protocol configuration.
Node Management : Distributed node deployment, runtime monitoring, device management.
Space Layout : Drag‑and‑drop visual design.
Scene Linkage : Visual orchestration, conditional triggers, automated execution.
User Center : Permission management, license control, security audit.
Core Capabilities
1. Multi‑Protocol Device Access
Supports mainstream industrial IoT protocols, allowing easy integration of various devices. Existing driver‑box protocol plugins (MQTT, Modbus, BACnet, DLT645) are directly reusable in Verge.
2. Visual Device‑Model Editor
The editor mimics Excel’s interaction model for defining device capabilities, adding data‑validation features to ensure model compliance.
Future plans include AI assistance to fully eliminate spreadsheet‑based modeling.
3. Lua Script Editor
Each product or device model can attach an independent Lua driver script for custom logic. Lua is chosen for its small footprint (hundreds of KB), near‑native performance after JIT compilation, and simple syntax that non‑engineers can learn quickly.
Data parsing – interpret raw device data.
Protocol adaptation – handle non‑standard protocols.
Business logic – implement complex control flows.
Third‑party integration – interact with external systems.
4. Distributed Node Management
Node‑based architecture enables distributed device management with features such as one‑click node creation, real‑time CPU/memory/connection monitoring, batch device import/export, and a flexible product library.
Deployment Options
Docker Compose – suitable for home labs or development testing.
Binary – preferred for production when container overhead is undesirable.
Source run – for contributors or deep customization.
Applicable Scenarios
Smart Buildings : Building equipment monitoring, energy management, HVAC control (customers: property companies, building‑automation integrators).
Industrial Automation : Production line monitoring, data collection, quality control (customers: manufacturers, equipment suppliers).
Smart Energy : Meter monitoring, energy‑consumption analysis, load forecasting (customers: power utilities, energy service providers).
IoT Campus : Campus device management, security surveillance, environmental monitoring (customers: campus management committees, property service firms).
Technology Stack
Edge Gateway
Go 1.23+
driver‑box framework
Management Platform
Java 8
Feat
H2/MySQL
shadcn/ui
Conclusion
The team hopes to make IoT management enjoyable and bring industrial‑grade IoT capabilities to a wide range of scenarios—from smart buildings and factories to the geek’s home laboratory.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Three Knives
Every line of code you contribute to open source could help make the future better.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
