Skip to main content

Charge Controller (EVSE)

The evse module manages the state and configuration of the charge controller.

evse/state

The state of the charge controller.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/state
{
"iec61851_state": 2,
"charger_state": 3,
"contactor_state": 3,
"contactor_error": 0,
"allowed_charging_current": 32000,
"error_state": 0,
"lock_state": 0
}
NameDescription
iec61851_state
int

The current state according to IEC 61851

  • 0 - A: Not connected
  • 1 - B: Connected
  • 2 - C: Charging
  • 3 - D: Charging with ventilation (not supported)
  • 4 - E/F: Error
charger_state
int

The current state, processed by the charge controller

  • 0 - Not connected
  • 1 - Waiting for charge release
  • 2 - Ready to charge
  • 3 - Charging
  • 4 - Error
contactor_state
int

State of the contactor monitoring.

  • 0 - Not live before and after contactor
  • 1 - Live before, but not live after contactor
  • 2 - Not live before, but live after contactor
  • 3 - Live before and after contactor
contactor_error
int

Error code of the contactor monitoring. A value other than 0 indicates an error.

  • 0 - No error
  • 1 - Contactor should be closed.
    No current before contactor, no current after contactor.
    Check power supply.
  • 2 - Contactor should be closed.
    Current before contactor, no current after contactor.
    Contactor defective?
  • 3 - Contactor should be closed.
    No current before contactor, current after contactor.
    Check wiring.
  • 4 - Contactor should not be closed.
    No current before contactor, no current after contactor.
    Check power supply.
  • 5 - Contactor should not be closed.
    No current before contactor, current after contactor.
    Check wiring.
  • 6 - Contactor should not be closed.
    Current before contactor, current after contactor.
    Contactor defective?
allowed_charging_current
int (mA)

Maximum allowed charging current provided to the vehicle. This current is the minimum of the current limits of all charge slots.

error_state
int

The current error state. See manual for details

  • 0 - OK
  • 2 - Switch error
  • 3 - DC residual current monitoring error
  • 4 - Contactor error
  • 5 - Communication error
lock_state
int

State of the cable lock (only relevant for chargers with Type 2 socket; as of now, no WARP Charger with Type 2 socket has been manufactured)

  • 0 - Initialization
  • 1 - Open
  • 2 - Closing
  • 3 - Closed
  • 4 - Opening
  • 5 - Error



evse/hardware_configuration

The hardware configuration of the charge controller.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/hardware_configuration
{ "jumper_configuration": 6, "has_lock_switch": false, "evse_version": 14 }
NameDescription
jumper_configuration
int

The maximum current of the incoming cable. This current is configured on the charge controller via jumpers or a circuit board with switches.

  • 0 - 6 amperes
  • 1 - 10 amperes
  • 2 - 13 amperes
  • 3 - 16 amperes
  • 4 - 20 amperes
  • 5 - 25 amperes
  • 6 - 32 amperes
  • 7 - Controlled by software
  • 8 - Not configured
has_lock_switch
bool

Indicates whether the charger has a cable lock.

  • false - Charger has permanently attached Type 2 charging cable
  • true - Charger has a Type 2 socket with cable lock
evse_version
int

Hardware version of the charge controller

  • 14 - EVSE 1.4
  • 15 - EVSE 1.5



evse/slots

The state of the charging current limits. The allowed charging current allowed_charging_current from evse/state is the minimum of all charge slots that are active. See TODO LINK for details.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/slots
[
// Slot is active, but allows charging without limit (= 32 A).
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
// Slot is not active, but would still allow charging.
{ "max_current": 32000, "active": false, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
// Slot limits charging to 19 A.
{ "max_current": 19000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": false, "clear_on_disconnect": true },
// Slot is not active, would otherwise block charging.
{ "max_current": 0, "active": false, "clear_on_disconnect": true },
{ "max_current": 32000, "active": false, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": false, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": true, "clear_on_disconnect": false },
{ "max_current": 32000, "active": false, "clear_on_disconnect": false }
]
IndexDescription
[0..14]
object

A charge slot

NameDescription
max_current
int (mA)

Maximum allowed charging current. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.

active
bool

Indicates whether this slot is active.

  • true - Slot is active
  • false - Slot is not active
clear_on_disconnect
bool

Indicates whether the charging current of this slot is set to 0 (=charging blocked) when a vehicle is disconnected.

  • true - Slot will block on disconnect
  • false - Slot will keep set charging current on disconnect



evse/button_state

The state of the button in the front panel.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/button_state
{
"button_press_time": 278667837,
"button_release_time": 278667971,
"button_pressed": false
}
NameDescription
button_press_time
int (ms)

Time at which the button was last pressed. 0 if the button has not been pressed since the charge controller started.

Warning: This time is measured directly via the processor clock. The accuracy is therefore only sufficient for time measurements in the range of minutes to a few hours. The time measurement overflows after approximately 50 days and starts again at 0.

button_release_time
int (ms)

Time at which the button was last released. 0 if the button has not been pressed since the charge controller started.

Warning: This time is measured directly via the processor clock. The accuracy is therefore only sufficient for time measurements in the range of minutes to a few hours. The time measurement overflows after approximately 50 days and starts again at 0.

button_pressed
bool

true if the button is currently pressed, otherwise false




evse/indicator_led

The state of the LED in the button. Can be written if LED control via API (see evse/led_configuration) has been enabled. The LED color can only be controlled on WARP3.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/indicator_led
{ "indication": -1, "duration": 0, "color_h": 0, "color_s": 0, "color_v": 0 }

Write

curl http://$HOST/evse/indicator_led -d '{ "indication": -1, "duration": 0, "color_h": 0, "color_s": 0, "color_v": 0 }'
NameDescription
indication
int

Currently set state.

  • -1 - EVSE controls LED
  • 0 - Off
  • 1..254 - PWM dimmed light
  • 255 - On
  • 1001 - Confirming blink (e.g.: NFC tag recognized)
  • 1002 - Rejecting blink (e.g.: NFC tag unknown)
  • 1003 - Prompting blink (e.g.: NFC tag required for charging)
  • 2001..2010 - Error blink 1 to 10.
duration
int (ms)

Duration for which the set state is maintained.

color_h
int (°)

Hue value of the LED in HSV color space. Allowed values are from 0 to 359

color_s
int

Saturation of the LED in HSV color space. Allowed values are from 0 to 255

color_v
int

Brightness of the LED in HSV color space. A brightness of 0 uses the default color of the indication or blue for WARP1 or WARP2. Allowed values are from 0 to 255




evse/low_level_state

The low-level state of the charge controller.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/low_level_state
{
"led_state": 4,
"cp_pwm_duty_cycle": 533,
"adc_values": [16356, 7198],
"voltages": [-2646, 899, 5915],
"resistances": [850, 219],
"gpio": [false, false, true, true, true],
"charging_time": 9341087,
"time_since_state_change": 9341087,
"uptime": 876032107
}
NameDescription
led_state
int

The state of the LED connected to the charge controller

  • 0 - Off
  • 1 - On
  • 2 - Blinking
  • 3 - Flickering
  • 4 - Breathing
  • 5 - API, see evse/indicator_led
cp_pwm_duty_cycle
int (%/10)

Duty cycle of the pulse width modulation on the CP signal.

adc_values
int[2]

16-bit ADC raw values of the voltage measurements

  • [0] - CP/PE
  • [1] - PP/PE
voltages
int[3] (mV)

Voltages calculated from ADC values

  • [0] - CP/PE
  • [1] - PP/PE
  • [2] - Maximum voltage CP/PE
resistances
int[2] (Ω)

Resistances calculated from voltages

  • [0] - CP/PE
  • [1] - PP/PE
gpio
bool[5]

Signals on the GPIOs

  • [0] - Input
  • [1] - Output
  • [2] - Motor input switch
  • [3] - Relay
  • [4] - Motor error
charging_time
int (ms)

Approximate duration of the charging process. Only to be used for load management purposes!

time_since_state_change
int (ms)

Time since the last IEC 61851 state change. If the state is 2 (= B: Charging), this value corresponds to the charging time.

Warning: This time is measured directly via the processor clock. The accuracy is therefore only sufficient for time measurements in the range of minutes to a few hours. The time measurement overflows after approximately 50 days and starts again at 0.

uptime
int (ms)

Time since the charge controller started.

Warning: This time is measured directly via the processor clock. The accuracy is therefore only sufficient for time measurements in the range of minutes to a few hours. The time measurement overflows after approximately 50 days and starts again at 0.




evse/external_current

The charging current specified by the external control.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/external_current
{ "current": 16000 }

Write

curl http://$HOST/evse/external_current -d '{ "current": 16000 }'

or abbreviated:

curl http://$HOST/evse/external_current -d '16000'
NameDescription
current
int (mA)

The charging current specified by the external control. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.




evse/external_clear_on_disconnect

Indicates whether the charging current specified by the external charging control should be automatically set to 0 when a vehicle is disconnected.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/external_clear_on_disconnect
{ "clear_on_disconnect": true }

Write

curl http://$HOST/evse/external_clear_on_disconnect -d '{ "clear_on_disconnect": true }'

or abbreviated:

curl http://$HOST/evse/external_clear_on_disconnect -d 'true'
NameDescription
clear_on_disconnect
bool

Indicates whether the charging current of this slot is set to 0 when a vehicle is disconnected.

  • true - Slot will block on disconnect
  • false - Slot will keep set charging current on disconnect



evse/management_current

The charging current specified by load management.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/management_current
{ "current": 14000 }
NameDescription
current
int (mA)

6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot should be blocked.




evse/auto_start_charging

Configures whether a connected vehicle is charged automatically.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/auto_start_charging
{ "auto_start_charging": true }

Write

curl http://$HOST/evse/auto_start_charging -d '{ "auto_start_charging": true }'

or abbreviated:

curl http://$HOST/evse/auto_start_charging -d 'true'
NameDescription
auto_start_charging
bool

Configures whether a connected vehicle is charged automatically. If enabled, charging starts immediately when the vehicle is connected. If disabled, charging can be started with evse/start_charging. This setting sets clear_on_disconnect of charge current limit 4 (Manual charge release)




evse/global_current

The charging current specified via the web interface. Warning: This current is stored persistently on the charge controller. For frequent changes, evse/external_current should be used instead to preserve the charge controller's flash memory!

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/global_current
{ "current": 16000 }

Write

curl http://$HOST/evse/global_current -d '{ "current": 16000 }'

or abbreviated:

curl http://$HOST/evse/global_current -d '16000'
NameDescription
current
int (mA)

The charging current specified via the web interface. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.




evse/management_enabled

Indicates whether the load management charge slot is active.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/management_enabled
{ "enabled": true }

Write

curl http://$HOST/evse/management_enabled -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/management_enabled -d 'true'
NameDescription
enabled
bool

true if load management is enabled, otherwise false




evse/user_current

The charging current allowed by user authorization.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/user_current
{ "current": 15000 }
NameDescription
current
int (mA)

The charging current allowed by user authorization. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.




evse/user_enabled

Indicates whether the user authorization charge slot is active.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/user_enabled
{ "enabled": true }

Write

curl http://$HOST/evse/user_enabled -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/user_enabled -d 'true'
NameDescription
enabled
bool

true if user authorization is enabled, otherwise false




evse/external_enabled

Indicates whether the external control charge slot is active.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/external_enabled
{ "enabled": true }

Write

curl http://$HOST/evse/external_enabled -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/external_enabled -d 'true'
NameDescription
enabled
bool

true if external control is enabled, otherwise false




evse/external_defaults

The settings of the external control charge slot adopted after a restart of the charge controller.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/external_defaults
{ "current": 32000, "clear_on_disconnect": false }

Write

curl http://$HOST/evse/external_defaults -d '{ "current": 32000, "clear_on_disconnect": false }'
NameDescription
current
int (mA)

The maximum current in the external control charge slot adopted after a restart. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.

clear_on_disconnect
bool

Indicates whether the charging current of this slot is set to 0 when a vehicle is disconnected.

  • true - Slot will block on disconnect
  • false - Slot will keep set charging current on disconnect



evse/modbus_tcp_enabled

Indicates whether the charge slots for Modbus TCP are active (and thus whether Modbus TCP write access has been granted).

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/modbus_tcp_enabled
{ "enabled": true }

Write

curl http://$HOST/evse/modbus_tcp_enabled -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/modbus_tcp_enabled -d 'true'
NameDescription
enabled
bool

true if the charge slots for Modbus TCP are enabled, otherwise false




evse/ocpp_enabled

Indicates whether the charge slot for OCPP is active.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/ocpp_enabled
{ "enabled": true }

Write

curl http://$HOST/evse/ocpp_enabled -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/ocpp_enabled -d 'true'
NameDescription
enabled
bool

true if OCPP is enabled, otherwise false




evse/automation_current

The charging current allowed by automation.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/automation_current
{ "current": 14000 }

Write

curl http://$HOST/evse/automation_current -d '{ "current": 14000 }'

or abbreviated:

curl http://$HOST/evse/automation_current -d '14000'
NameDescription
current
int (mA)

The charging current allowed by automation. 6000 (=6 amperes) to 32000 (=32 amperes) or 0 if the slot is blocked.




evse/led_configuration

The configuration of the LED in the front panel button.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/led_configuration
{ "enable_api": false }

Write

curl http://$HOST/evse/led_configuration -d '{ "enable_api": false }'

or abbreviated:

curl http://$HOST/evse/led_configuration -d 'false'
NameDescription
enable_api
bool

Determines whether the LED may be controlled via the evse/indicator_led API or via Modbus TCP.

  • false - LED may not be controlled. Calls to evse/indicator_led are ignored
  • true - LED may be controlled. Calls to evse/indicator_led are only ignored when the EVSE wants to display an error state.



evse/user_calibration

Allows reading and overwriting the factory calibration of the EVSE. To reset the calibration to factory state, a payload with user_calibration_active set to false can be sent. The other values are then ignored.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/user_calibration
{
"user_calibration_active": false,
"voltage_diff": -95,
"voltage_mul": 12205,
"voltage_div": 12157,
"resistance_2700": 312,
"resistance_880": [
1517, 984, 870, 795,
803, 769, 671, 748,
691, 588, 598, 549,
537, 606
]
}

Write

curl http://$HOST/evse/user_calibration -d '{
"user_calibration_active": false,
"voltage_diff": -95,
"voltage_mul": 12205,
"voltage_div": 12157,
"resistance_2700": 312,
"resistance_880": [
1517, 984, 870, 795,
803, 769, 671, 748,
691, 588, 598, 549,
537, 606
]
}'
NameDescription
user_calibration_active
bool

Indicates whether the factory calibration has been overwritten.

voltage_diff
int

One of the calibration parameters.

voltage_mul
int

One of the calibration parameters.

voltage_div
int

One of the calibration parameters.

resistance_2700
int

One of the calibration parameters.

resistance_880
int[..]

One of the calibration parameters.




evse/boost_mode

Indicates whether the EVSE specifies a slightly higher charging current (+ 0.24 A) to the vehicle's charging electronics to compensate for measurement errors in the charging electronics. Only use if a vehicle charges with a lower than the allowed charging current!

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/boost_mode
{ "enabled": true }

Write

curl http://$HOST/evse/boost_mode -d '{ "enabled": true }'

or abbreviated:

curl http://$HOST/evse/boost_mode -d 'true'
NameDescription
enabled
bool

true if boost mode is enabled, otherwise false




evse/stop_charging

Stops the current charging process. Calling this function is equivalent to stopping via the button on the charger: TODO LINK Slot 4 is blocked. Charging can be restarted with evse/start_charging. Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}

Example
# $HOST e.g. warp-AbCd

Write

curl http://$HOST/evse/stop_charging -d 'null'



evse/start_charging

Starts a charging process. Calling this function is equivalent to starting via the button on the charger: TODO LINK Slot 4 is released. Charging can be stopped again with evse/stop_charging. Empty payload. One of the following values must be passed: null, "", false, 0, [] or {}

Example
# $HOST e.g. warp-AbCd

Write

curl http://$HOST/evse/start_charging -d 'null'



evse/meter_config

Indicates which energy meter should be considered as the energy meter installed in the WARP Charger, e.g. for charge tracker, charge limits, etc. This allows, for example, an external meter to be used for recording charging processes.

tip

For PV excess charging, a different meter must be used that measures the values at the grid connection point. The ID of this meter is not set here, but with meter_slot_grid_power in power_manager/config

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/evse/meter_config
{ "slot": 0 }

Write

curl http://$HOST/evse/meter_config -d '{ "slot": 0 }'

or abbreviated:

curl http://$HOST/evse/meter_config -d '0'
NameDescription
slot
int

Energy meter slot to be used