Skip to main content

Charge Time and Energy Limits

The charge_limits module allows defining energy and time limits after which a charging session is terminated. Both default limits can be set (charge_limits/default_limits), as well as overriding limits for the current or next charging session (charge_limits/override_duration and charge_limits/override_energy)

charge_limits/state

Current state of time and energy limits

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/charge_limits/state
{
"start_timestamp_ms": 786598059,
"start_energy_kwh": 886.1900024,
"target_timestamp_ms": 797398059,
"target_energy_kwh": 901.1900024
}
NameDescription
start_timestamp_ms
int (ms)

Start timestamp of the current charging session. 0 if no charging session is running.

target_timestamp_ms
int (ms)

Target timestamp of the current charging session. 0 if no charging session is running. Equal to the start timestamp if no time limit is set.

start_energy_kwh
float (kWh)

Start meter value of the current charging session. null if no charging session is running or no electricity meter is available.

target_energy_kwh
float (kWh)

Target meter value of the current charging session. null if no charging session is running or no electricity meter is available. Equal to the start meter value if no energy value is set.




charge_limits/default_limits

Configuration of time and energy limits for charging sessions.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/charge_limits/default_limits
{ "duration": 8, "energy_wh": 50000 }

Write

curl http://$HOST/charge_limits/default_limits -d '{ "duration": 8, "energy_wh": 50000 }'
NameDescription
duration
int

Time limit of a charging session. The charging session is stopped after the time limit expires.

  • 0 - Unlimited
  • 1 - 15 minutes
  • 2 - 30 minutes
  • 3 - 45 minutes
  • 4 - 1 hour
  • 5 - 2 hours
  • 6 - 3 hours
  • 7 - 4 hours
  • 8 - 6 hours
  • 9 - 8 hours
  • 10 - 12 hours
energy_wh
int (Wh)

Energy limit of a charging session. The charging session is stopped after the energy limit expires.




charge_limits/active_limits

Active time and energy limits for the current or next charging session. Can be updated via charge_limits/override_duration and charge_limits/override_energy.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/charge_limits/active_limits
{ "duration": 12, "energy_wh": 50000 }
NameDescription
duration
int

Time limit of a charging session. The charging session is stopped after the time limit expires.

  • 0 - Unlimited
  • 1 - 15 minutes
  • 2 - 30 minutes
  • 3 - 45 minutes
  • 4 - 1 hour
  • 5 - 2 hours
  • 6 - 3 hours
  • 7 - 4 hours
  • 8 - 6 hours
  • 9 - 8 hours
  • 10 - 12 hours
energy_wh
int (Wh)

Energy limit of a charging session. The charging session is stopped after the energy limit expires.




charge_limits/override_duration

Overrides the time limit for the current or next charging session.

Example
# $HOST e.g. warp-AbCd

Write

curl http://$HOST/charge_limits/override_duration -d '{ "duration": 12 }'

or abbreviated:

curl http://$HOST/charge_limits/override_duration -d '12'
NameDescription
duration
int

Time limit of a charging session. The charging session is stopped after the time limit expires.

  • 0 - Unlimited
  • 1 - 15 minutes
  • 2 - 30 minutes
  • 3 - 45 minutes
  • 4 - 1 hour
  • 5 - 2 hours
  • 6 - 3 hours
  • 7 - 4 hours
  • 8 - 6 hours
  • 9 - 8 hours
  • 10 - 12 hours



charge_limits/override_energy

Overrides the energy limit for the current or next charging session.

Example
# $HOST e.g. warp-AbCd

Write

curl http://$HOST/charge_limits/override_energy -d '{ "energy_wh": 25000 }'

or abbreviated:

curl http://$HOST/charge_limits/override_energy -d '25000'
NameDescription
energy_wh
int (Wh)

Energy limit of a charging session. The charging session is stopped after the energy limit expires.




charge_limits/restart

Resets the charge limits as if a new charging session had started, but keeps the overridden charge limits. With this API and charge_limits/override_duration and charge_limits/override_energy, a new "absolute" charge limit can be set at any time. Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}

Example
# $HOST e.g. warp-AbCd

Write

curl http://$HOST/charge_limits/restart -d 'null'