Device Gateway in AirNgin
Device Gateway is for products that manage one or more Child Devices on a local network or bus while only the Physical Gateway connects to the AirNgin cloud.
Recommended reading order
- Architecture and identity
- Provisioning and cloud connection
- Complete Gateway MQTT topic reference
- Security and AES
- Child onboarding
- Drivers, protocols, and compatibility
- Discovery
- Commands and execution ACK
- Shadow, telemetry, and events
- Hybrid Sync API
- HTML Live MQTT
- Gateway Analyzer
- Offline-first runtime
- Backend association
- Implementation checklist
- Troubleshooting
Three distinct roles
Direct Device
A device that connects to AirNgin itself and uses the Direct Device contract.
Physical Gateway
A normal AirNgin Device with its own DeviceSerial. It is the only permanent MQTT/AES principal for Gateway-mediated traffic.
Child Device
A Child remains an independent AirNgin Device identity with its own DeviceSerial, but it does not receive a separate Gateway MQTT credential. Its cloud traffic is mediated by its active Physical Gateway.
Architecture at a glance
AirNgin Cloud
│
│ Gateway MQTT + HTTPS
▼
Physical Gateway
│
├── Gateway Driver ── Native Protocol ── Child A
├── Gateway Driver ── Native Protocol ── Child B
└── Gateway Driver ── Native Protocol ── Child C
AirNgin does not impose one universal Gateway-to-Child protocol. A Driver may manage Modbus, BLE, CAN, LAN, or a manufacturer-specific protocol.
Core v1 rules
- Gateway and Child both use the standard AirNgin DeviceSerial contract.
DeviceSerialis notClientId,slaveId, MAC, IP, or a native address.- A Child has at most one active Gateway at a time.
- Direct Device topics are never used for Gateway-mediated Children.
- Active Gateway-cloud topics are AES protected.
- HTML Live topics are the deliberate exception: WSS/TLS + temporary credentials, no
/AES. - Analyzer is uplink-only; downlink translation belongs to the Driver.
- MQTT
PUBACKis not Child execution success. - Cloud outages must not unnecessarily stop the already-synchronized local runtime.
Implementation status
These pages describe the canonical Gateway v1 contract. Some APIs/topics may not exist in production until Backend/Firmware implementation is completed. In that case, this documentation is the implementation contract, not a claim that the runtime is already deployed.