Skip to content

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. ​

VersionDateComments
2.025.02.2025Initial release.

3. Error codes. ​

Error codeError description
0No error. Everything was successful.
-1General fail. No details.
-2JSON request format error. Usually means that a not all keys were found.
-3Key value length error. Applicable to keys of string type which should be of a fixed length.
-4Key value range error. The key value is out of range. Applicable to keys of integer type.
-5Error key format. Example: setting integer value to a boolean key.
-6Unknown key error.
-7Prohibited action error.

4. Application configuration keys. ​

Key nameKey typeDefault valueAccepted valuesDescription
headlessbooleantruetrue/falseDefines if the charger is headless (no OCPP control, just plug in the connector and it will charge) or not.
install_currentinteger66-32Current value [A] to be limited by software.
led_max_brightnessinteger1010-100LED maximum brightness in %.
led_dimming_delayinteger00 - INT_MAXLED delay value in seconds before applying maximum brightness value. 0 means LEDs are always at maximum brightness.
charger_lockedbooleanfalsetrue/falseSpecify if the charger is locked or not. If key is true, no charging session will be started.
auto_updatebooleantruetrue/falseSpecify if the charger should check periodically the OTA server for a new firmware.
led_template_enabledbooleanfalsetrue/falseSpecify if the custom LED template feature is enabled or not.
led_templatestringNULLAccording to descriptionCustom 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_aliasstringNULLAny stringCharger alias. Will be used by the app.
latitudedouble0.0Double valueCharger latitude coordinate.
longitudedouble0.0Double valueCharger longitude coordinate.
ocpp_server_linkstringNULLvalid URLOCPP server link.
connected_phaseinteger01 - 3Charger connected phase.
owner_idstringNULLAny stringOwner ID.
user_currentinteger326 - 32User current.
gmt_offsetinteger0-12 - +12GMT offset. Used for charging schedule time calculations.
precise_pwm_modebooleanfalsetrue/falseEnable/disable precise PWM mode. If enabled, the PWM is more stable, but the LEDs in state C are in a fixed state.
energy_management_enabledbooleanfalsetrue/falseEnergy management control enabled flag. App should set/reset this flag when load balancing is enabled/disabled.
charging_schedule_enabledbooleanfalsetrue/falseCharging schedule enabled flag. If disabled, the charger will ignore the charging schedule.
em_idstringNULLAny stringCurrent energy management device ID.
timezonestringNULLAny stringTimezone name.
user_powerinteger73601380 - 7360User power.

5. Charger configuration keys. ​

Key nameKey typeDefault valueAccepted valuesDescription
overtemp_thresholdinteger7055 - INT_MAXOvertemperature threshold.
critical_temp_thresholdinteger8065 - INT_MAXCritical temperature threshold.
voltage_gaindouble1.00.8 - 1.2Meter voltage gain.
current_gaindouble1.00.8 - 1.2Meter current gain.
calibration_temperaturedouble25.010.0 - 40.0Calibration temperature.
rcd_enabledbooleantruetrue/falseSpecify if the RCD is enabled.
serial_numberinteger00 - 999999Charger serial number.
board_revisionstringEA-ZCharger board revision.
temp_offsetdouble0.0Floating point valueEnergy meter temperature offset.

6. Commands ​

6.1 Remote charging start. ​

MethodDescription
Charge.StartRemote charging start.

Request params format ​

json
{
  "tag": "string"
}

tag – Tag name. Optional parameter.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.2 Remote charging stop. ​

MethodDescription
Charge.StopRemote charging stop.

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.3 Get application configurations. ​

MethodDescription
App_config.GetGet 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. ​

MethodDescription
App_config.SetSet 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:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.5 Get charger information ​

MethodDescription
Charger_info.GetGet 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. ​

MethodDescription
Sw_version.GetGet 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. ​

MethodDescription
Device.ResetReset 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:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.8 Get board revision. ​

MethodDescription
Board_revision.GetGet 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. ​

MethodDescription
Logged_errors.GetGet 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. ​

MethodDescription
Logged_errors.ResetReset logged errors.

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.11 Get serial number. (deprecated) ​

MethodDescription
Serial_number.GetGet 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. ​

MethodDescription
Pwm_value.GetGet 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. ​

MethodDescription
Adc_state.GetGet 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. ​

MethodDescription
Device_id.GetGet 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. ​

MethodDescription
Install_current.SetSet software current value.

Request params format ​

json
{
  "install_current": "integer"
}

install_current - Installation current value. Range: 6-32.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.16 Get active errors. ​

MethodDescription
Active_errors.GetGet 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. ​

MethodDescription
Wifi_status.GetGet 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. ​

MethodDescription
Dynamic_current.SetSet dynamic current.

Request params format ​

json
{
  "dynamic_current": "integer"
}

dynamic_current – Dynamic current value. Range: 0-32.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.19 Get dynamic current. ​

MethodDescription
Dynamic_current.GetGet dynamic current.

Request params format ​

No parameters.

Response params format ​

json
{
  "dynamic_current ": "integer"
}

dynamic_current – Dynamic current value.

6.20 Get system currents. ​

MethodDescription
System_currents.GetGet 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. ​

MethodDescription
Charger_config.GetGet 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. ​

MethodDescription
Counters_config.GetGet 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. ​

MethodDescription
Ota.VerifyTrigger an OTA verification sequence.

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.24 Reset session energy. ​

MethodDescription
Session_energy.ResetReset session energy value. Accessible only in states A,B,E,F.

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.25 Factory Reset. ​

MethodDescription
Factory.ResetReset to factory settings.

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.26 Set AP password. ​

MethodDescription
Ap_password.SetSet 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:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.27 Pause charge. ​

MethodDescription
Charge.PausePause the charging process

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.28 Resume charge. ​

MethodDescription
Charge.ResumeReset session energy value. Accessible only in states A,B,E,F

Request params format ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.29 Get device info. ​

MethodDescription
Device_info.GetGet 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. ​

MethodDescription
Heartbeat.TriggerTrigger Heartbeat notification.

Request params format: ​

No parameters.

Response params format ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.31 Set charging schedule. ​

MethodDescription
Charging_schedule.SetSet 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:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.32 Get charging schedule. ​

MethodDescription
Charging_schedule.GetGet 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. ​

MethodDescription
Charging_schedule.OverrideIgnore 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:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.34 Set PIN. ​

MethodDescription
Pin.SetSet access PIN value

Request params format: ​

json
{
  "pin": "string"
}

pin – 4 digit PIN value.

Response params format: ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.

6.35 Check PIN. ​

MethodDescription
Pin.CheckCheck PIN value

Request params format: ​

json
{
  "pin": "string"
}

pin – 4 digit PIN value.

Response params format: ​

On success:

true

On error: Error message according to RPC-JSON specification and error code number described in Error codes chapter.