Appearance
Lektri.co 1P7K Public RPC list
1. Commands format.
All commands follow the Request/Response JSON-RPC 2.0 format specification: https://www.jsonrpc.org/specification.
2. Revisions.
| Version | Date | Comments |
|---|---|---|
| 2.0 | 25.02.2025 | Initial release. |
3. Error codes.
| Error code | Error description |
|---|---|
0 | No error. Everything was successful. |
-1 | General fail. No details. |
-2 | JSON request format error. Usually means that a not all keys were found. |
-3 | Key value length error. Applicable to keys of string type which should be of a fixed length. |
-4 | Key value range error. The key value is out of range. Applicable to keys of integer type. |
-5 | Error key format. Example: setting integer value to a boolean key. |
-6 | Unknown key error. |
-7 | Prohibited action error. |
4. Application configuration keys.
| Key name | Key type | Default value | Accepted values | Description |
|---|---|---|---|---|
headless | boolean | true | true/false | Defines if the charger is headless (no OCPP control, just plug in the connector and it will charge) or not. |
install_current | integer | 6 | 6-32 | Current value [A] to be limited by software. |
led_max_brightness | integer | 10 | 10-100 | LED maximum brightness in %. |
led_dimming_delay | integer | 0 | 0 - INT_MAX | LED delay value in seconds before applying maximum brightness value. 0 means LEDs are always at maximum brightness. |
charger_locked | boolean | false | true/false | Specify if the charger is locked or not. If key is true, no charging session will be started. |
auto_update | boolean | true | true/false | Specify if the charger should check periodically the OTA server for a new firmware. |
led_template_enabled | boolean | false | true/false | Specify if the custom LED template feature is enabled or not. |
led_template | string | NULL | According to description | Custom LED template Segments as seen from the front. Format: *"red1,green1,blue1,red2, green2,blue2,red3,green3,blue3,red4,green4,blue4"_ red1 – Top segment Red color. Values: 0..255 green1 – Top segment Red color. Values: 0..255 blue1 – Top segment Red color. Values: 0..255 red2 – Right segment Red color. Values: 0..255 green2 – Right segment Red color. Values: 0..255 blue2 – Right segment Red color. Values: 0..255 red3 – Bottom segment Red color. Values: 0..255 green3 – Bottom segment Red color. Values: 0..255 blue3 – Bottom segment Red color. Values: 0..255 red4 – Left segment Red color. Values: 0..255 green4 – Left segment Red color. Values: 0..255 blue4 – Left segment Red color. Values: 0..255 |
charger_alias | string | NULL | Any string | Charger alias. Will be used by the app. |
latitude | double | 0.0 | Double value | Charger latitude coordinate. |
longitude | double | 0.0 | Double value | Charger longitude coordinate. |
ocpp_server_link | string | NULL | valid URL | OCPP server link. |
connected_phase | integer | 0 | 1 - 3 | Charger connected phase. |
owner_id | string | NULL | Any string | Owner ID. |
user_current | integer | 32 | 6 - 32 | User current. |
gmt_offset | integer | 0 | -12 - +12 | GMT offset. Used for charging schedule time calculations. |
precise_pwm_mode | boolean | false | true/false | Enable/disable precise PWM mode. If enabled, the PWM is more stable, but the LEDs in state C are in a fixed state. |
energy_management_enabled | boolean | false | true/false | Energy management control enabled flag. App should set/reset this flag when load balancing is enabled/disabled. |
charging_schedule_enabled | boolean | false | true/false | Charging schedule enabled flag. If disabled, the charger will ignore the charging schedule. |
em_id | string | NULL | Any string | Current energy management device ID. |
timezone | string | NULL | Any string | Timezone name. |
user_power | integer | 7360 | 1380 - 7360 | User power. |
5. Charger configuration keys.
| Key name | Key type | Default value | Accepted values | Description |
|---|---|---|---|---|
overtemp_threshold | integer | 70 | 55 - INT_MAX | Overtemperature threshold. |
critical_temp_threshold | integer | 80 | 65 - INT_MAX | Critical temperature threshold. |
voltage_gain | double | 1.0 | 0.8 - 1.2 | Meter voltage gain. |
current_gain | double | 1.0 | 0.8 - 1.2 | Meter current gain. |
calibration_temperature | double | 25.0 | 10.0 - 40.0 | Calibration temperature. |
rcd_enabled | boolean | true | true/false | Specify if the RCD is enabled. |
serial_number | integer | 0 | 0 - 999999 | Charger serial number. |
board_revision | string | E | A-Z | Charger board revision. |
temp_offset | double | 0.0 | Floating point value | Energy meter temperature offset. |
6. Commands
6.1 Remote charging start.
| Method | Description |
|---|---|
Charge.Start | Remote charging start. |
Request params format
json
{
"tag": "string"
}tag – Tag name. Optional parameter.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.2 Remote charging stop.
| Method | Description |
|---|---|
Charge.Stop | Remote charging stop. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.3 Get application configurations.
| Method | Description |
|---|---|
App_config.Get | Get application configurations. |
Request params format
No parameters.
Response params format
json
{
"key1_name": "key1_type",
"key2_name": "key2_type",
// …
"keyn_name": "keyn_type"
}key1_name, key2_name … keyN_name - See Application configuration keys chapter for description.
6.4 Set application configurations.
| Method | Description |
|---|---|
App_config.Set | Set application configuration OCPP style. |
Request params format
json
{
"config_key": "string",
"config_value": "string"
}config_key - Config key name. See Application configuration keys chapter for description.
config_value - Config key value.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.5 Get charger information
| Method | Description |
|---|---|
Charger_info.Get | Get charger information. |
Request params format
No parameters.
Response params format
json
{
"charger_state": "string",
"session_energy": "double",
"charging_time": "integer",
"session_id": "integer",
"instant_power": "double",
"current": "double",
"currents": ["double", "double", "double"],
"current_limit_reason": "integer",
"voltage": "double",
"voltages": ["double", "double", "double"],
"temperature": "double",
"energy_index": "double",
"total_charged_energy": "integer",
"headless": "bool",
"led_max_brightness": "integer",
"install_current": "integer",
"dynamic_current": "integer",
"em_current": "integer",
"fw_version": "string",
"extended_charger_state": "string",
"has_active_errors": "bool",
"charger_is_paused": "bool",
"heap_free": "integer",
"pwm_current": "integer"
}charger_state - A string containing one letter (A, B, C, D, E, F) which conforms with IEC 61851 standard.
session_energy - Current session charged energy in Wh.
charging_time - Current session charging time in s.
session_id - Current session ID.
instant_power - Current instant power in W.
current - Current value.
currents - Array with current values. Order is L1, L2, L3.
current_limit_reason - Current limit reason. Values:
0- Current limited by HW capabilities.1- Current limited by install current.2- Current limited by user current.3- Current limited by dynamic current.4- Current limited by schedule.5- Current limited because Energy Management device is offline.6- Current limited by Energy Management device.7- Current limited by OCPP current.8- Current limited by temperature control system.
voltage - Current voltage value.
voltages - Array with voltage values. Order is L1, L2, L3.
temperature - Board temperature.
energy_index - Current energy index value.
headless – Headless flag value.
total_charged_energy – Total charged energy.
led_max_brightness – LED brightness value.
install_current – Installation current value.
dynamic_current – Dynamic current value.
em_current – EM current value.
fw_version – Firmware version.
extended_charger_state – Charger state with additional internal states:
A: Car disconnected.B: Car connected.B_AUTH: Car connected. Waiting for authentication.C: Charging.D: Charging. Ventilation needed.E: Error state.OTA: OTA state.LOCKED: Charger is locked. Charging is impossible.B_PAUSE: Charging is paused.B_SCHEDULER: Charging is paused because of the scheduler.
has_active_errors – Flag to specify if the charger has active errors.
charger_is_paused – Flag stating if the charger is paused.
heap_free - Heap free space.
pwm_current - Current value at which the PWM was calculated.
6.6 Get software version.
| Method | Description |
|---|---|
Sw_version.Get | Get software version. |
Request params format
No parameters.
Response params format
json
{
"fw_version": "string",
"fw_id": "string"
}fw_version - Firmware version number.
fw_id - Firmware id.
6.7 Reset device.
| Method | Description |
|---|---|
Device.Reset | Reset device. If a charging session is active, the device will wait for its end first. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.8 Get board revision.
| Method | Description |
|---|---|
Board_revision.Get | Get board revision. |
Request params format
No parameters.
Response params format
json
{
"board_revision": "string"
}board_revision - A string containing board revision (A to Z).
6.9 Get logged errors.
| Method | Description |
|---|---|
Logged_errors.Get | Get error flags. |
Request params format
No parameters.
Response params format
json
{
"state_e_activated": "bool",
"overtemp": "bool",
"critical_temp": "bool",
"overcurrent": "bool",
"meter_fault": "bool",
"voltage_error": "bool",
"rcd_error": "bool",
"rcd_test_error": "bool",
"rcd_err_pin_error": "bool",
"rcd_err6_pin_error": "bool",
"rcd_init_start_error": "bool",
"rcd_init_end_error": "bool",
"state_f_activated": "bool",
"contactor_failure": "bool",
"cp_diode_failure": "bool",
"undervoltage_error": "bool",
"overvoltage_error": "bool",
"state_machine_na_error": "bool"
}state_e_activated – State machine E activated flag. If true, flag is set.
overtemp – Overtemperature flag. If true, flag is set.
critical_temp – Critical temperature flag. If true, flag is set.
overcurrent – Overcurrent flag. If true, flag is set.
meter_fault – Meter fault flag. If true, flag is set.
voltage_error – Voltage error flag. If true, flag is set.
rcd_error – RCD error flag. If true, flag is set.
rcd_test_error – RCD test error flag. If true, flag is set.
rcd_err_pin_error – RCD err pin error flag. If true, flag is set.
rcd_err6_pin_error – RCD 6mA pin error flag. If true, flag is set.
rcd_init_start_error – RCD init start error flag. If true, flag is set.
rcd_init_end_error – RCD init end error flag. If true, flag is set.
state_f_activated – State machine F activated error flag. If true, flag is set.
contactor_failure – Contactor failure error flag. If true, flag is set.
cp_diode_failure – CP diode failure error flag. If true, flag is set.
undervoltage_error – Undervoltage error flag. If true, flag is set.
overvoltage_error – Overvoltage error flag. If true, flag is set.
state_machine_na_error – State machine in unknown state error flag. If true, flag is set.
6.10 Reset logged errors.
| Method | Description |
|---|---|
Logged_errors.Reset | Reset logged errors. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.11 Get serial number. (deprecated)
| Method | Description |
|---|---|
Serial_number.Get | Get serial number. |
Request params format
No parameters.
Response params format
json
{
"serial_number": "string"
}serial_number - Board serial number. Format: "xxxxxx", where x=0..9.
6.12 12.Get PWM value.
| Method | Description |
|---|---|
Pwm_value.Get | Get current PWM value. |
Request params format
No parameters.
Response params format
json
{
"pwm_value": "double"
}pwm_value - Current PWM value. Range: 0.0-1.0.
6.13 Get ADC state.
| Method | Description |
|---|---|
Adc_state.Get | Get current ADC state name. |
Request params format
No parameters.
Response params format
json
{
"adc_state": "string",
"adc_raw": "integer"
}adc_state - Current ADC state. A string containing one letter (A, B, C, D, E, F) which conforms with IEC 61851 standard.
adc_raw – Raw ADC value.
6.14 Get device ID.
| Method | Description |
|---|---|
Device_id.Get | Get device ID. |
Request params format
No parameters.
Response params format
json
{
"device_id": "string"
}device_id - Device ID string.
6.15 Set installation current value.
| Method | Description |
|---|---|
Install_current.Set | Set software current value. |
Request params format
json
{
"install_current": "integer"
}install_current - Installation current value. Range: 6-32.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.16 Get active errors.
| Method | Description |
|---|---|
Active_errors.Get | Get active errors. |
Request params format
No parameters.
Response params format
json
{
"state_e_activated": "bool",
"overtemp": "bool",
"critical_temp": "bool",
"overcurrent": "bool",
"meter_fault": "bool",
"voltage_error": "bool",
"rcd_error": "bool",
"rcd_test_error": "bool",
"rcd_err_pin_error": "bool",
"rcd_err6_pin_error": "bool",
"rcd_init_start_error": "bool",
"rcd_init_end_error": "bool",
"state_f_activated": "bool",
"contactor_failure": "bool",
"cp_diode_failure": "bool",
"undervoltage_error": "bool",
"overvoltage_error": "bool",
"state_machine_na_error": "bool"
}state_e_activated – State machine E activated flag. If true, flag is set.
overtemp – Overtemperature flag. If true, flag is set.
critical_temp – Critical temperature flag. If true, flag is set.
overcurrent – Overcurrent flag. If true, flag is set.
meter_fault – Meter fault flag. If true, flag is set.
voltage_error – Voltage error flag. If true, flag is set.
rcd_error – RCD error flag. If true, flag is set.
rcd_test_error – RCD test error flag. If true, flag is set.
rcd_err_pin_error – RCD err pin error flag. If true, flag is set.
rcd_err6_pin_error – RCD 6mA pin error flag. If true, flag is set.
rcd_init_start_error – RCD init start error flag. If true, flag is set.
rcd_init_end_error – RCD init end error flag. If true, flag is set.
state_f_activated – State machine F activated error flag. If true, flag is set.
contactor_failure – Contactor failure error flag. If true, flag is set.
cp_diode_failure – CP diode failure error flag. If true, flag is set.
undervoltage_error – Undervoltage error flag. If true, flag is set.
overvoltage_error – Overvoltage error flag. If true, flag is set.
state_machine_na_error – State machine in unknown state error flag. If true, flag is set.
6.17 Get wifi status.
| Method | Description |
|---|---|
Wifi_status.Get | Get wifi status. |
Request params format
No parameters.
Response params format
json
{
"connected": "bool",
"sta_ip": "string",
"sta_name": "string",
"rssi": "integer",
"bssid": "string"
}connected – Wifi status. True if connected.
sta_ip – Station IP.
sta_name – Station name.
rssi – RSSI level.
bssid – BSSID, if known.
6.18 Set dynamic current.
| Method | Description |
|---|---|
Dynamic_current.Set | Set dynamic current. |
Request params format
json
{
"dynamic_current": "integer"
}dynamic_current – Dynamic current value. Range: 0-32.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.19 Get dynamic current.
| Method | Description |
|---|---|
Dynamic_current.Get | Get dynamic current. |
Request params format
No parameters.
Response params format
json
{
"dynamic_current ": "integer"
}dynamic_current – Dynamic current value.
6.20 Get system currents.
| Method | Description |
|---|---|
System_currents.Get | Get system currents. |
Request params format
No parameters.
Response params format
json
{
"cable_current": "integer",
"install_current": "integer",
"dynamic_current": "integer",
"user_current": "integer",
"charging_current": "integer",
"system_max_current": "integer",
"schedule_current": "integer",
"ocpp_current": "integer",
"em_current": "integer",
"temperature_current": "integer",
"user_power_current": "integer"
}cable_current – Cable current value.
install_current – Install current value.
dynamic_current – Dynamic current value.
user_current – User current value.
charging_current – Charging current value.
system_max_current – System max current value.
schedule_current – Schedule current value.
ocpp_current – System max current value.
em_current – Energy management max current value.
temperature_current – Temperature controlled current value.
user_power_current – User power max current value.
6.21 Get charger configurations.
| Method | Description |
|---|---|
Charger_config.Get | Get charger configurations. |
Request params format
No parameters.
Response params format
json
{
"key1_name": "key1_type",
"key2_name": "key2_type",
// …
"keyn_name": "keyn_type"
}key1_name, key2_name … keyN_name - See Charger configuration keys chapter for description.
6.22 Get counters configurations.
| Method | Description |
|---|---|
Counters_config.Get | Get counters configurations. |
Request params format
No parameters.
Response params format
json
{
"total_charged_time": "integer",
"total_charged_sessions": "integer",
"total_charged_energy": "double",
"last_session_energy": "integer"
}total_charged_time - Total charged time in minutes.
total_charged_sessions - Total charged sessions.
total_charged_energy - Total charged energy in kWh.
last_session_energy - Last session energy in Wh.
6.23 Ota verification.
| Method | Description |
|---|---|
Ota.Verify | Trigger an OTA verification sequence. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.24 Reset session energy.
| Method | Description |
|---|---|
Session_energy.Reset | Reset session energy value. Accessible only in states A,B,E,F. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.25 Factory Reset.
| Method | Description |
|---|---|
Factory.Reset | Reset to factory settings. |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.26 Set AP password.
| Method | Description |
|---|---|
Ap_password.Set | Set access point password. |
Request params format
json
{
"password": "string"
}password – AP password. 8 to 63 characters. If length is 0, password access is removed.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.27 Pause charge.
| Method | Description |
|---|---|
Charge.Pause | Pause the charging process |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.28 Resume charge.
| Method | Description |
|---|---|
Charge.Resume | Reset session energy value. Accessible only in states A,B,E,F |
Request params format
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.29 Get device info.
| Method | Description |
|---|---|
Device_info.Get | Get serial number. |
Request params format
No parameters.
Response params format
json
{
"device_id": "string",
"connected_phase": "integer",
"fw_version": "string",
"charger_alias": "string"
}device_id – Device ID.
connected_phase – Connected phase.
fw_version – Firmware version.
charger_alias – Charger alias.
6.30 Heartbeat trigger.
| Method | Description |
|---|---|
Heartbeat.Trigger | Trigger Heartbeat notification. |
Request params format:
No parameters.
Response params format
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.31 Set charging schedule.
| Method | Description |
|---|---|
Charging_schedule.Set | Set charging schedule. |
Request params format:
json
{
"charging_schedule": [
{
"start_d": "integer",
"start_h": "integer",
"start_m": "integer",
"end_d": "integer",
"end_h": "integer",
"end_m": "integer",
"current": "integer",
"lb_mode": "integer"
},
{
//...
}
]
}start_d – Day of the week at which the interval is activated. Range: 1-7. First day of the week is Monday.
start_h – Hour at which the interval is activated. Range: 0-23.
start_m – Minute at which the interval is activated. Range: 0-59.
end_d – Day of the week at which the interval is deactivated. Range: 1-7. First day of the week is Monday.
end_h – Hour at which the interval is activated. Range: 0-23.
end_m – Minute at which the interval is activated. Range: 0-59.
current – Current value for the time interval. A 0 value means charging is paused, otherwise the 6-32 range is applied.
lb_mode – Load balancing mode for EM device. Values: 1, 2, 3.
Response params format:
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.32 Get charging schedule.
| Method | Description |
|---|---|
Charging_schedule.Get | Get charging schedule. |
Request params format:
No parameters.
Response params format:
json
{
"charging_schedule": [
{
"start_d": "integer",
"start_h": "integer",
"start_m": "integer",
"end_d": "integer",
"end_h": "integer",
"end_m": "integer",
"current": "integer",
"lb_mode": "integer"
},
{
//...
}
]
}start_d – Day of the week at which the interval is activated. Range: 1-7. First day of the week is Monday.
start_h – Hour at which the interval is activated. Range: 0-23.
start_m – Minute at which the interval is activated. Range: 0-59.
end_d – Day of the week at which the interval is deactivated. Range: 1-7. First day of the week is Monday.
end_h – Hour at which the interval is activated. Range: 0-23.
end_m – Minute at which the interval is activated. Range: 0-59.
current – Current value for the time interval. A 0 value means charging is paused, otherwise the 6-32 range is applied.
lb_mode – Load balancing mode for EM device. Values: 1, 2, 3.
6.33 Override charging schedule.
| Method | Description |
|---|---|
Charging_schedule.Override | Ignore charging schedule for the current charging session. Charging schedule is reactivated when the car is disconnected. |
Request params format:
No parameters
Response params format:
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.34 Set PIN.
| Method | Description |
|---|---|
Pin.Set | Set access PIN value |
Request params format:
json
{
"pin": "string"
}pin – 4 digit PIN value.
Response params format:
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.
6.35 Check PIN.
| Method | Description |
|---|---|
Pin.Check | Check PIN value |
Request params format:
json
{
"pin": "string"
}pin – 4 digit PIN value.
Response params format:
On success:
trueOn error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.