Skip to main content

Overview

To sell stored energy during peak-rate hours, or shave household load during a demand event, push a windowed discharge. 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.
For a discharge, 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%.
You get back the scheduled action under data.

Step 3: Confirm the window opened

After start, read the action to confirm dispatch. acknowledgedAt is the moment the OEM accepted the write.
A second GET /battery/device_abc123 confirms live state. While the window is active, data.state.status reports discharging and data.state.chargeRate is negative.
At 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.balance (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.