Device Provisioning
How to add devices and DERs to your site after claiming a gateway.
After claiming a gateway, you need to provision devices (physical hardware) and their DERs (logical energy resources) to a site.
Overview
Provisioning has two parts:
- Add a device to the Zap (local API) — tells the gateway how to communicate with the hardware
- Provision in Novacore (cloud API) — registers the device and its DERs in the platform
Step 1: Add Device to Zap
Use the Zap Local API to tell the gateway about a new device.
Modbus TCP (e.g., Sungrow Inverter)
curl -X POST http://<zap-ip>/api/devices \
-H "Content-Type: application/json" \
-d '{
"type": "modbus_tcp",
"ip": "192.168.1.60",
"port": 502,
"unit_id": 1,
"profile": "sungrow"
}'
P1 Smart Meter
curl -X POST http://<zap-ip>/api/devices \
-H "Content-Type: application/json" \
-d '{
"type": "p1_uart",
"baud_rate": 115200,
"data_bits": 8,
"parity": "none"
}'
MQTT Device (e.g., Ferroamp)
curl -X POST http://<zap-ip>/api/devices \
-H "Content-Type: application/json" \
-d '{
"type": "mqtt",
"profile": "ferroamp",
"broker_host": "192.168.1.70",
"broker_port": 1883,
"username": "extapi",
"password": "your_password"
}'
The Zap will immediately attempt to connect. On success, the device starts sending telemetry to Novacore via MQTT.
Step 2: Verify Device Data
Check that the device is providing data:
curl http://<zap-ip>/api/devices/{sn}/data/json
{
"pv": {
"type": "pv",
"W": -2500,
"total_generation_Wh": 22698000
},
"battery": {
"type": "battery",
"W": -500,
"SoC_nom_fract": 0.85
}
}
Step 3: Provision in Novacore
Register the device and its DERs in the cloud platform:
curl -X POST https://novacore-mainnet.sourceful.dev/devices/provision \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"gateway_serial": "zap-04772a97",
"hardware_id": "SN12345",
"device_type": "inverter",
"site_id": "sit-abc123",
"name": "Sungrow SH10RT",
"manufacturer": "Sungrow",
"model": "SH10RT",
"ders": [
{ "name": "pv-array", "type": "solar" },
{ "name": "battery_1", "type": "battery" }
]
}'
This creates:
- A Device record linked to the gateway and site
- DER records for each energy resource the device provides
- Telemetry routing from gateway MQTT topics to org-structured topics
Supported Device Profiles
The Zap firmware supports these device profiles out of the box:
| Category | Profiles |
|---|---|
| Inverters | Sungrow, Solis, Deye, SMA, Huawei, Fronius, SolarEdge |
| Meters | P1 (DSMR) smart meters |
| EV Chargers | Ambibox (V2X) |
| Battery/Storage | Ferroamp |
List supported profiles on your Zap:
curl http://<zap-ip>/api/devices/supported
Enable/Disable DER Publishing
After adding a device, you can control which DERs publish telemetry:
curl -X POST http://<zap-ip>/api/devices/{sn}/types \
-H "Content-Type: application/json" \
-d '{
"ders": [
{ "type": "pv", "enabled": true },
{ "type": "battery", "enabled": true },
{ "type": "meter", "enabled": false }
]
}'
Knowledge gap for Tobias: How does auto-discovery work? Does the Zap automatically detect device capabilities and DER types, or does the user always need to specify them manually? Is there a discovery step before provisioning?
Next Steps
- Real-time Data - Stream telemetry from your devices
- Devices & Gateways API - Full endpoint reference
- Zap Local API - All local gateway endpoints