Actions vs settings
If it makes sense with a time window, it’s an action. “Charge from 6pm to 10pm” is an action. “Never discharge below 20%” is a setting.
Settings are available on batteries and EV chargers. The EV charger routes are
POST /ev-charger/{deviceId} and POST /ev-charger/{deviceId}/settings.
Read settings
Settings come back on the device read, with the current value and the bounds this device accepts.value is null if the device hasn’t reported it yet. A value the device reports in an unusable form, or outside its declared range, is left out. In live, settings appears on readings taken from the device; see Freshness.
Change settings
Send only the settings you want to change. Numeric settings are{ value, unit }; on/off settings are { value }.
Battery settings
EV charger settings
max_charge_rate and max_charge_current set one ceiling in two units. A charger that holds a single rate refuses both in one request with UNSUPPORTED_SETTING_COMBINATION. Send one.
The battery and EV charger max_charge_rate use different units: current in amps for batteries, power in kW for chargers. Always send the unit the read declares.
Bounds
Percent settings allow 0 to 100 and rate settings start at 0, but each device can declare a narrower range. A battery might acceptdischarge_floor only from 10. Read min and max from the device before writing.
Errors
Manufacturer errors can also come back directly, for example
SCHEDULER_ACTIVE (409) on a battery or VEHICLE_NOT_CONNECTED (409) on a charger. See Error codes.
Next steps
Capabilities
How devices declare what they accept.
Push
Send commands to a device.
Error codes
Every code, its status, and what triggers it.