Protocol definition for EVSEsd over ubus¶
Object “evse.control”¶
Port states definition
| State | Description |
|---|---|
| idle | … |
| waiting | … |
| charging | … |
Command “reload”¶
Description:
Forces a reading of the current state for each charging port.
Request parameters:
None
Response:
None
Command “read_temperatures”¶
Description:
Forces a reading of the all the temperatures sensors for the charging station.
Request parameters:
None
Response:
None
Command “set_port_info”¶
Description:
Sets permanent port configuration parameters.
!!DANGER!! This command sets critical port parameters and must be used only by authorized installers.
Request parameters:
portinteger Port number starting from 1current_max_limitfloat Maximum configurable current in Aopt_autostartbool Whether the port automatically starts charging when connectedopt_singlephasebool Whether the port only supports single phase charging mode
Response:
None
Sample request:
{
"port": 1,
"current_max_limit": 15.90000,
"opt_autostart": true,
"opt_singlephase": false
}
Command “get_status”¶
Description:
Requests the global state of the charging station.
Request parameters:
None
Response:
firmwarestring Main firmware versionstm-firmwarestring Internal STM32 firmware versionstm-cpuidstring Internal STM32 CPU idportsarray List of ports with their current state (see below)temperaturesarray List of temperatures reading for various internal sensorserrorinteger Global error state code for the charging station
Single port record definition:
portinteger Port number starting from 1statusstring Port statecurrent_limitfloat Maximum configurable current in Acurrent_maxfloat Maximum charging current in Acurrent_nowfloat Actual current in Avoltage_nowfloat Actual voltage in Vpower_nowinteger Actual power in Wenergy_sessioninteger Total energy charged in this session in Whenergy_totalinteger Total energy charged lifetime in Whsession_timeinteger Elapsed time for the current charging session in secondsconnectedbool Indicates if a vehicle is connected to the portthreephasebool Indicates if the port is currently using threephaseerrorbool Indicates if the port is in error
Sample response:
{
"status": "success",
"result": {
"firmware": "Prism 1.0 build 492",
"stm-firmware": "0.1",
"stm-cpuid": "12FF4E123E1D001234567890",
"ports": [
{
"port": 1,
"status": "charging",
"current_limit": 32.000000,
"current_max": 6.000000,
"current_now": 4.800000,
"voltage_now": 232.500000,
"power_now": 10.000000,
"energy_session": 840.000000,
"energy_total": 92400.000000,
"session_time": 928,
"connected": true,
"threephase": false,
"error": 0
}
],
"temperatures": [
45,
null,
null,
null
],
"error": 0
}
}
Command “set_current”¶
Description:
Sets the maximum current that can be charged on a specific port.
Request parameters:
portinteger Port number starting from 1current_maxfloat Maximum charging current in A
Response:
None
Sample request:
{
"port": 2,
"current_max": 22.500000
}
Event “port_current_max_changed”¶
Description:
Notifies that the maximum charging current for a port has changed.
Event parameters:
portinteger Port number starting from 1current_maxfloat Maximum charging current in A
Sample event:
{
"port": 1,
"current_max": 8.000000
}
Event “port_connected_change”¶
Description:
Notifies that a vehicle has been connected or disconnected from a charging port.
Event parameters:
portinteger Port number starting from 1connectedbool Indicates if a vehicle is connected to the port
Sample event:
{
"port": 1,
"connected": true
}
Event “error_change”¶
Description:
Notifies that an error situation has appeared or disappeared.
*Event parameters:**
portinteger Optional port number starting from 1 (zero means a global error)errorinteger Error code
Sample event:
{
"port": 0,
"error": 80
}