๐บ๐ธ English | ๐จ๐ณ ็ฎไฝไธญๆ
A lightweight, standardized edge computing gateway solution โ Focused on device data acquisition and governance, minimizing hardware resource requirements.
Traditional edge gateways often integrate full-stack functionality including device access, scene linkage, rule engines, and user interfaces. This "all-in-one" design leads to:
- High resource consumption, requiring powerful hardware
- Frequent OTA updates, where any feature iteration may affect core stability
- High hardware barriers, difficult to deploy on low-end devices
Verge adopts an "Application-Edge Separation" architecture: Complex business logic (scene linkage, rule engines, user interfaces) is placed in the application layer, while the edge gateway only handles core device access and data acquisition. The application layer can be deployed on cloud servers or run as a local desktop application.
| Dimension | Traditional Gateway | Verge Gateway |
|---|---|---|
| Resource Usage | High | Ultra-Low |
| OTA Frequency | High | Near Zero |
| Hardware Requirements | Mid-High | Any Hardware |
| Stability | Affected by App Iteration | Long-term Stable |
Verge is built on the driver-box framework, leveraging its mature device access capabilities.
- SSE (Server-Sent Events) - Maintains long-polling connection with cloud for real-time command reception
- JSON-RPC 2.0 - Standardized remote procedure call protocol
โโโโโโโโโโโ โโโโโโโโโโโ
โ Verge โ โ Cloud โ
โโโโโโฌโโโโโ โโโโโโฌโโโโโ
โ โ
โ 1. Login (Authenticate with Serial Number) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ โ
โ โ
โ 2. Return Token โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ 3. Establish SSE Connection โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ โ
โ โ
โ 4. Periodically Report Device Shadow & Metadata โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ โ
โ โ
โ 5. Send Control Commands (JSON-RPC) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ 6. Execute Device Operations, Return Results โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบ โ
โ โ
| Method | Description |
|---|---|
device.control |
Device control (read/write device points) |
devices.add |
Add devices |
devices.delete |
Delete devices |
devices.report |
Device data reporting |
products.report |
Product information reporting |
product.import |
Import product model |
node.configChanged |
Configuration change notification |
node.networkStatus |
Network status query |
node.command |
Execute custom command |
- Go 1.23+ (for source compilation)
- Docker & Docker Compose (for containerized deployment)
Suitable for home labs and development/testing environments:
# Clone the repository
git clone https://github.com/smartboot/verge.git
cd verge
# Start services
docker-compose up -d
# View logs
docker-compose logs -f vergeManagement UI: http://localhost:18080
Why binary deployment?
- Once stable, the gateway rarely needs updates โ deploy once, run indefinitely
- Direct execution without container overhead
- Better suited for industrial environments
Download from Releases:
# Extract
tar -xzf verge-linux-arm64-*.tar.gz
cd verge
# Configure cloud endpoint
export ENV_VERGE_BASE_URL=http://your-server:8080
# Start
./start.shgit clone https://github.com/smartboot/verge.git
cd verge
export ENV_VERGE_BASE_URL=http://your-server:8080
go mod tidy
go run cmd/main.go| Variable | Description | Required |
|---|---|---|
ENV_VERGE_BASE_URL |
Cloud management service URL | Yes |
verge/
โโโ cmd/main.go # Application entry
โโโ pkg/
โ โโโ sse/ # SSE connection management
โ โโโ rpc/ # JSON-RPC handlers
โ โโโ reporter/ # Data reporting module
โโโ res/
โ โโโ driver/ # Driver configs (device models, connections)
โ โโโ library/
โ โโโ driver/ # Lua driver scripts
โ โโโ model/ # Product model definitions
โ โโโ protocol/ # Protocol parsing scripts
โโโ platform/ # Platform-specific startup scripts
โโโ Dockerfile
โโโ docker-compose.yml
Register in pkg/rpc/handlers.go:
var Handlers = map[string]func(Context, interface{}) error{
"your.method": HandleYourMethod,
}Add Lua scripts in res/library/driver/. Refer to driver-box documentation.