Overview
To sell stored energy during peak-rate hours, or shave household load during a demand event, push a windoweddischarge. The body mirrors a windowed charge: command: "discharge", start, end, and a target that names the lower SoC at which discharging stops.
Confirm the device supports windowed discharge before pushing. Look for windowed in commands.discharge.execution.
Step 1: Check capability before pushing
Every response is wrapped in{ success, data, meta }; the device sits under data.
target is the lower bound: discharging stops at this level. reserve is a second floor that protects against full depletion if the window overruns.
Step 2: Push the windowed discharge
Discharge from late afternoon into the early evening, stopping at 30%.- curl
- Node
- Python
data.
Step 3: Confirm the window opened
Afterstart, read the action to confirm dispatch. acknowledgedAt is the moment the OEM accepted the write.
GET /battery/device_abc123 confirms live state. While the window is active, data.state.status reports discharging and data.state.chargeRate is negative.
end, the action transitions to completed and the battery reverts to idle, holding the level the window left behind. The window closes, the device stops moving energy. To resume self-management, push auto.balanced (or any other standing mode) next.
What next
Schedule a charge for later
The mirrored recipe for cheap-rate charging.
Subscribe to webhooks
Get push.completed events when the window closes.
Handle conflicts
What to do when a colliding action is in flight.
Canonical actions
The semantic model behind charge, discharge, and auto.