The REST API can be accessed through any http tool, here as an example CURL will be used.
Testing: REST API input validation is covered by 37 native test cases in
test_http_api.c. These verify parameter bounds, error responses, and edge cases for all settings endpoints. See the test specification for the full scenario list under the "HTTP API" features.
curl -X GET http://ipaddress/settings
will give output like:
{"version":"21:02:46 @Jan 3 2024","mode":"OFF","mode_id":0,"car_connected":false,"wifi":{"status":"WL_CONNECTED","ssid":"wifi_nomap_EXT","rssi":-82,"bssid":"28:87:BA:D6:B9:DE"},"evse":{"temp":16,"temp_max":60,"connected":false,"access":false,"mode":1,"loadbl":0,"pwm":1024,"solar_stop_timer":0,"state":"Ready to Charge","state_id":0,"error":"None","error_id":0,"rfid":"Not Installed"},"settings":{"charge_current":0,"override_current":0,"current_min":6,"current_max":16,"current_main":25,"current_max_circuit":16,"current_max_sum_mains":600,"solar_max_import":9,"solar_start_current":29,"solar_stop_time":10,"enable_C2":"Always On","modem":"Not present","mains_meter":"InvEastrn","starttime":0,"stoptime":0,"repeat":0},"mqtt":{"host":"10.0.0.28","port":1883,"topic_prefix":"SmartEVSE-51446","username":"homeassistant","password_set":true,"status":"Connected"},"home_battery":{"current":0,"last_update":0},"ev_meter":{"description":"Eastron3P","address":11,"import_active_power":0,"total_kwh":5670.1,"charged_kwh":0,"currents":{"TOTAL":1,"L1":0,"L2":0,"L3":1},"import_active_energy":5670.1,"export_active_energy":0},"mains_meter":{"import_active_energy":8614.8,"export_active_energy":5289.3},"phase_currents":{"TOTAL":75,"L1":57,"L2":6,"L3":12,"last_data_update":1704535684,"charging_L1":false,"charging_L2":false,"charging_L3":false,"original_data":{"TOTAL":75,"L1":57,"L2":6,"L3":12}},"backlight":{"timer":0,"status":"OFF"}}
This output is often used to add to your bug report, so the developers can see your configuration.
NOTE: In the http world, GET parameters are passed like this: curl -X GET http://ipaddress/endpoint?param1=value1¶m2=value2 and POST parameters are passed like this: curl -X POST http://ipaddress/endpoint -d 'param1=value1' -d 'param2=value2' -d ''
Now in the ESP world, we all have picked up the habit of using the GET way of passing parameters also for POST commands. SmartEVSE development not excluded.... From version v3.6.0 on, instead of using the Arduino Core webserver libraries, we are now using the Mongoose webserver, which is broadly used. This webserver however sticks to the "normal" http standards.
This means that if you POST a request to SmartEVSE > 3.6.0, the webserver will be waiting for the -d data until it times out (or you ctrl-C your curl command). -d '' You can prevent this by adding ''' -d '' '''
to your curl POST command. -d ''
- backlight
Turns backlight on (1) or off (0) for the duration of the backlighttimer.
curl -X POST http://ipaddress/settings?backlight=1 -d ''
- mode
Only following values are permitted:
0: OFF
1: NORMAL
2: SOLAR
3: SMART
4: PAUSE
- stop_timer
Set the stop timer to be used when there isn't sufficient solar power. Value must be >=0 and <= 60.
Using 0 will disable the stop timer.
- disable_override_current
If this parameter is passed the override current will be reset (value doesn't matter)
- override_current
Works only when using NORMAL or SMART mode
Desired current multiplied by 10
If set to 0, override_current is disabled
Examples:
If the desired current is 8.3A the value to be sent is 83
curl -X POST http://ipaddress/settings?override_current=83 -d ''
- enable_C2
Enables switching between 1 phase mode and 3 phase mode by controlling a 2nd contactor (C2 port)
Note 1: The 2nd contactor will only be turned ON when state changes to C (Charging)
Note 2: This is just changing the config setting, the contactor will not be controlled immediately but only when there is a
state change.
If car is charging and you want to change from 1P to 3P or vice versa:
- Change mode to OFF
- Enable or disable C2 contactor
- Change to desired value: 0 "Not present", 1 "Always Off", 2 "Solar Off", 3 "Always On", 4 "Auto"
- Examples:
- If the desired C2 mode is "Solar Off", the string to be sent is 2
- phases
Request a phase switch between 1-phase and 3-phase charging.
Only values 1 and 3 are accepted.
Requirements:
- C2 contactor must be present (enable_C2 != 0 "Not present")
- Only works on Master or standalone (PWR SHARE = Disabled or Master)
The state machine handles the safe disconnect-switch-reconnect sequence automatically.
If the requested phase count matches the current phase count, no switching occurs.
Response includes switching status:
{"phases": 1, "switching": true, "previous_phases": 3}
Examples:
curl -X POST 'http://ipaddress/settings?phases=1' -d ''
curl -X POST 'http://ipaddress/settings?phases=3' -d ''
- starttime
Enables delayed charging; always has to be combined with sending the mode in which you want to start charging.
Note 1: The time string has to be in the format "2023-04-14T23:31".
Note 2: The time must be in the future, in local time.
Note 3: Only valid when combined with Normal or Smart mode. Solar mode will itself decide when to start...
Examples:
If you want the car to start charging at 23:31 on April 14th 2023, in Smart mode, the strings to be sent are:
curl -X POST 'http://ipaddress/settings?starttime="2023-04-14T23:31"&mode=3' -d ''
- solar_start_current
The Start Current at which the car starts charging when in Solar Mode.
Examples:
If you want the car to start charging when the sum of all 3 phases of the MainsMeter is exporting 6A or more to the grid,
the value to be sent is 6
- current_min
The Minimum Charging Current in Ampères, per phase.
Usually you should leave this setting at its default value (6A) since this is standarized.
Note: This setting is useful for EV's that don't obey standards, like the Renault Zoe, whose MinCurrents not only differ
from the standard, but also change when charging at 1 phase and charging at 2 phases.
The values even differ per build year.
Examples:
If you want the car to start charging at minimally 6A, the value to be sent is 6
- solar_max_import
The maximum current (sum of all phases) of the MainsMeter that can be imported before the solar timer is fired off,
after expiration the car will stop charging.
Examples:
If you want the car to stop charging when the sum of all 3 phases of the MainsMeter is importing 0A or more to the grid,
the value to be sent is 0
- current_max_sum_mains
The Maximum allowed Mains Current summed over all phases: 10-600A
This is used for the EU Capacity rate limiting.
Usually you should leave this setting at its default value (600A)
since your electricity provider probably does not supports this.
- prio_strategy
Set the priority strategy for load sharing. Only works when PWR SHARE = Disabled or Master.
See Priority-Based Power Scheduling for details.
0: Modbus Address
1: First Connected
2: Last Connected
curl -X POST 'http://ipaddress/settings?prio_strategy=1' -d ''
- rotation_interval
Set the rotation interval in minutes. Only works when PWR SHARE = Disabled or Master.
Value must be 0 (disabled) or 30-1440.
curl -X POST 'http://ipaddress/settings?rotation_interval=60' -d ''
- idle_timeout
Set the idle timeout in seconds. Only works when PWR SHARE = Disabled or Master.
Value must be 30-300.
curl -X POST 'http://ipaddress/settings?idle_timeout=60' -d ''
- cablelock
Enhanced cable locking option. This setting makes sure the charging cable stays locked in the charging station, even if no EV is connected anymore.
Important:
This feature only works if a locking device (e.g. Solenoid or Motor) is configured in the LCD menu of the EVSE.
Why is this useful?
Semi-permanently fixed charging cable: you can attach a charging cable to the charging station, and it will stay locked.
Preventing stealing of the cable: some EV's automatically unlock the charging cable when they are finished charging, even if the EV is locked. With this setting, the cable will stay locked on the EVSE side. However, in most EV's, you can set whether the cable should remain locked in the EV itself. But some EV's don't have this option.
To activate the enhanced cable lock, set the value to 1. To disable it, set it to 0.
Examples:
If you want the enhanced cable lock activated, the string to be sent is:
curl -X POST 'http://ipaddress/settings?cablelock=1 -d ''
- R, G, B
Sets the color of the connected switch while the EVSE is in Off mode (and overrides the default setting (0, 0, 0).
R, G and B must be send all together otherwise the data won't be registered.
curl -X POST 'http://ipaddress/color_off?R=0&G=0&B=255' -d ''
- R, G, B
Sets the color of the connected switch while the EVSE is in Normal mode (and overrides the default green setting (0, 255, 0).
R, G and B must be send all together otherwise the data won't be registered.
curl -X POST 'http://ipaddress/color_normal?R=0&G=0&B=255' -d ''
- R, G, B
Sets the color of the connected switch while the EVSE is in Smart mode (and overrides the default green setting (0, 255, 0).
R, G and B must be send all together otherwise the data won't be registered.
curl -X POST 'http://ipaddress/color_smart?R=0&G=0&B=255' -d ''
- R, G, B
Sets the color of the connected switch while the EVSE is in Solar mode (and overrides the default yellow setting (255, 170, 0).
R, G and B must be send all together otherwise the data won't be registered.
curl -X POST 'http://ipaddress/color_solar?R=0&G=0&B=255' -d ''
- battery_current
Actual home battery current multiplied by 10
A positive number means the home battery is charging
A negative number means the home battery is discharging
curl -X POST "http://ipaddress/currents?battery_current=300" -d ''
...means your battery is charging at 10A per phase (3 * 10A = 30A = 300dA).
NOTE: The battery current is ONLY taken into account in SOLAR mode !!!
NOTE: By default the current fed here is divided by three and corrected on every phase. If C2 is set to "Always Off", you are signalling a single phase system; in that case the correction is put fully on the L1 phase.
- L1, L2, L3
Note: Only works when MainsMeter == API
L1, L2 and L3 must be send all together otherwise the data won't be registered.
Ampere must be multiplied by 10
curl -X POST "http://ipaddress/currents?L1=100&L2=50&L3=30" -d ''
P.S.: If you want to send your currents through HomeAsistant, look at the scripts in the (integration)[integration] directory.
- pwm
The duty cycle (PWM) multiplied by 10
Examples:
If the desired dutycycle is 5% the value to be sent is 50
Note: EXPERIMENTAL FEATURE ONLY FOR EXPERTS
DO NOT USE THIS IF YOU ARE NOT AN EVSE EXPERT. DANGEROUS!
- L1, L2, L3
Note: Only works when EVMeter == API
L1, L2 and L3 must be send all together otherwise the data won't be registered.
Ampere must be multiplied by 10
curl -X POST "http://ipaddress/ev_meter?L1=100&L2=50&L3=30" -d ''
- import_active_energy, export_active_energy and import_active_power
Note: Only works when EvMeter == API
import_active_energy, export_active_energy and import_active_power must be send all together otherwise
the data won't be registered.
Data should be in Wh (kWh * 1000), for import_active_power data should be in w(att)
- rfid
Simulate an RFID card swipe to start or stop a charging session
The RFID parameter must be a hex string representing the card UID
- 12 hex characters for 6 byte UIDs (older RFID readers)
- 14 hex characters for 7 byte UIDs (newer RFID readers)
The RFID will be processed using all existing checks:
- RFID reader must be enabled in settings
- Whitelist verification (if using local whitelist)
- OCPP authorization (if OCPP mode is enabled)
- RFID reader mode logic (EnableAll, EnableOne, Learn, Delete)
Returns JSON with status and rfid_status fields
Examples:
# 6 byte UID (12 hex characters)
curl -X POST "http://ipaddress/rfid?rfid=112233445566" -d ''
# 7 byte UID (14 hex characters)
curl -X POST "http://ipaddress/rfid?rfid=11223344556677" -d ''
Response examples:
# Success
{"rfid":"112233445566","rfid_status":"Present"}
# Error - RFID reader not enabled
{"rfid_status":"RFID reader not enabled"}
# Error - Invalid format
{"rfid_status":"Invalid RFID hex string"}
Note: no parameters, reboots your device.
curl -X GET http://ipaddress/session/last
Returns the last completed charge session. Useful for verifying ERE (Emissie Reductie Eenheden) session data and debugging.
Responses:
200 OK— last session available, returns JSON204 No Content— no session has completed since last reboot
Example response:
{
"session_id": 1,
"start": "2026-03-19T14:30:00Z",
"end": "2026-03-19T18:45:00Z",
"kwh": 12.345,
"start_energy_wh": 142300,
"end_energy_wh": 154645,
"max_current_a": 16.0,
"phases": 3,
"mode": "solar",
"ocpp_tx_id": null
}| Field | Type | Description |
|---|---|---|
| session_id | integer | Auto-incrementing counter (resets on reboot) |
| start | string | Session start time (ISO 8601 UTC) |
| end | string | Session end time (ISO 8601 UTC) |
| kwh | number | Energy charged in kWh |
| start_energy_wh | integer | EV meter reading at session start (Wh) |
| end_energy_wh | integer | EV meter reading at session end (Wh) |
| max_current_a | number | Peak charge current (amps) |
| phases | integer | Number of phases at session end |
| mode | string | Charging mode: "normal", "smart", or "solar" |
| ocpp_tx_id | integer/null | OCPP transaction ID when OCPP active, null otherwise |
See ERE Session Logging for details on session tracking and Home Assistant integration.