Skip to content

Commit 088ffbd

Browse files
committed
fix: update endpoint documentation for accuracy and consistency
1 parent 2d46bbc commit 088ffbd

1 file changed

Lines changed: 43 additions & 7 deletions

File tree

docs/developer/zap-local-api.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ slug: /developer/zap-local-api
66

77
# Zap Local API
88

9-
Complete endpoint documentation for the Zap firmware.
9+
Complete endpoint documentation for the controller firmware.
1010

1111
## Table of Contents
1212

@@ -23,7 +23,7 @@ Complete endpoint documentation for the Zap firmware.
2323
- [Connection Types](#get-apidevicestypes)
2424
- [List Devices](#get-apidevices)
2525
- [Add Device](#post-apidevices)
26-
- [Remove Device](#delete-apidevicessen)
26+
- [Remove Device](#delete-apidevicessn)
2727
- [Device Data](#get-apidevicessndatajson)
2828
- [Update DER Types](#post-apidevicessentypes)
2929
- [Get DER Metadata](#get-apidevicessnders)
@@ -528,12 +528,48 @@ Latest device data snapshot in JSON format.
528528
"battery": {
529529
"type": "battery",
530530
"timestamp": 1761832393075,
531-
"make": "ambibox",
532-
"sessionState": "CHARGE_LOOP",
531+
"read_time_ms": 156,
532+
"make": "sungrow",
533533
"W": -500,
534-
"SoC_nom_fract": 85
534+
"V": 48.2,
535+
"A": -10.4,
536+
"SoC_nom_fract": 0.85
535537
},
536538
"meter": { /* ... if present ... */ },
539+
"v2x_charger": {
540+
"type": "v2x_charger",
541+
"timestamp": 1761832393075,
542+
"read_time_ms": 0,
543+
"make": "ambibox",
544+
"status": "charging",
545+
"W": 7400,
546+
"A": 32.0,
547+
"V": 230.0,
548+
"Hz": 50.0,
549+
"L1_V": 230.0,
550+
"L1_A": 10.7,
551+
"L1_W": 2461.0,
552+
"L2_V": 229.5,
553+
"L2_A": 10.6,
554+
"L2_W": 2432.7,
555+
"L3_V": 230.2,
556+
"L3_A": 10.8,
557+
"L3_W": 2486.2,
558+
"dc_W": -7200,
559+
"dc_V": 400.0,
560+
"dc_A": -18.0,
561+
"vehicle_soc_fract": 0.45,
562+
"ev_min_energy_req_Wh": 5000,
563+
"ev_max_energy_req_Wh": 40000,
564+
"session_charge_Wh": 12500,
565+
"session_discharge_Wh": 0,
566+
"total_charge_Wh": 125000,
567+
"total_discharge_Wh": 45000,
568+
"lower_limit_W": [-11000, 0, 1400],
569+
"upper_limit_W": [-1400, 0, 11000],
570+
"capacity_Wh": 77000,
571+
"rated_power_W": 11000
572+
},
537573
"version": "v0",
538574
"format": "sungrow"
539575
}
@@ -543,7 +579,7 @@ Latest device data snapshot in JSON format.
543579
- 204 - No harvest data yet
544580
- 404 - Device not found
545581

546-
### POST `/api/devices/{sn}/types`
582+
### POST /api/devices/{sn}/types
547583

548584
Enable/disable publishing for detected DERs on a device. Only included DERs in the request are modified. Omitted entries remain unchanged.
549585

@@ -1060,7 +1096,7 @@ curl -X DELETE http://192.168.1.100/api/devices
10601096

10611097
### Notes
10621098

1063-
- Device configs persist in `/spiffs/devices/\{sn\}.json`
1099+
- Device configs persist in `/spiffs/devices/{sn}.json`
10641100
- Auto-reconnect every 10s for disconnected devices
10651101
- Modbus timeout: 1000ms per request
10661102
- UART pins fixed by firmware (RTU only configures baud/unit_id)

0 commit comments

Comments
 (0)