SubNode
Overview
SubNode is an open-source edge SDK that lets you connect custom sensors and sub-systems to WEDA without writing cloud-side integration code. A SubNode application runs on the edge gateway as a container managed by WEDA Node, and all its sensor data automatically flows into the WEDA Data Engine.
SubNode handles the physical protocol, applies transforms and DSP filters if configured, then publishes telemetry to the local WEDA Node. WEDA Node forwards it to WEDA Core over the same secure channel used by all managed devices — no direct internet connection from the SubNode is required.
Supported Protocols
| Protocol | Typical Use |
|---|---|
| Modbus TCP / RTU | PLCs, drives, industrial meters |
| MQTT | Smart sensors, third-party IoT gateways |
| HTTP / REST | Cameras, environmental monitors, lab equipment |
| SNMP | Network infrastructure (switches, UPS) |
Each physical sensor is declared as a sensor entry in the SubNode configuration. The SDK auto-generates DTDL telemetry definitions from the sensor list.
How SubNode Data Appears in WEDA Cloud
A SubNode application registers itself as a device in WEDA. Each configured sensor becomes a Data Source under that device. Data then flows through the standard Data Engine pipeline:
SubNode sensors are indistinguishable from native WEDA Node sensors once the data reaches WEDA Core. Alert rules and Reports all reference the SubNode device's Data Objects.
Data Processing Pipeline
Before telemetry is published, the SubNode SDK can apply two optional processing stages:
| Stage | What It Does |
|---|---|
| Transform | Numerical transformations on raw values: linear calibration, unit conversion, large-data chunking |
| DSP Filter | Stateful signal processing: moving average, ReLU, dead-band filter |
Both stages are configured per-sensor in devicecfg.json and are fully optional.
v1.1: Image and Binary Data Support
SubNode v1.1 adds first-class support for MIME-type binary data — camera snapshots, binary blobs, and any payload up to 10 MB:
- Large payloads are automatically chunked at 750 KB for transport
- Before publication, every event is durably written to local recording storage on the gateway
- If chunks are lost in transit, the SubNode retransmits only the missing chunks — no re-capture from the sensor is needed
This guarantees zero data loss during WAN outages: recorded events survive any transport-level failure within the configured retention window.
Open Source SDK
The SubNode SDK is open source and actively maintained:
https://github.com/Advantech-WEDA/WEDA-Sub-Node
The repository includes:
- Full C# source code (.NET 10.0)
- Two project templates:
wedabuilder(Web API, multi-device production) andsubnode(Console, single-device development) - Architecture documentation and Getting Started guide
- Example projects covering Modbus, MQTT, and camera integrations
Deployment
A SubNode application is packaged as a Docker container and deployed through the WEDA Container Stack. The container connects to the gateway's WEDA Node via a local messaging channel using a credential file provided by the WEDA Device Activator.
See Container Management — Container Stack for stack deployment steps.
Constraints
- SubNode requires a running WEDA Node on the same gateway; standalone cloud connection is not supported
- Each SubNode application registers as one device; multiple physical sensors appear as Data Sources on that device
- Maximum binary payload: 10 MB per event; payloads over 10 MB are rejected before chunking
- MIME blob support and local recording storage are v1.1 features — v1.0 does not support binary retransmission
Related
- How sensor data becomes queryable: Data Engine — Data Objects
- Set up container deployment: Container Stack
- Full SDK documentation and examples: WEDA SubNode on GitHub