-
-
Notifications
You must be signed in to change notification settings - Fork 32
Rest
Version 1.0
REST API are listening on port 80. Default not require authentication. For reset authentication credentials, hold WiFi button for 10 seconds. (Note: everything configuration in NVS will be erased!)
Method | Path | Description |
---|---|---|
GET | /boardConfig | Get board config |
GET | /config | Get full config |
GET | /config/evse | Get EVSE config |
POST | /config/evse | Set EVSE config |
GET | /config/modbus | Get modbus config |
POST | /config/modbus | Set modbus config |
GET | /config/mqtt | Get MQTT config |
POST | /config/mqtt | Set MQTT config |
GET | /config/serial | Get serial config |
POST | /config/serial | Set serial config |
GET | /config/tcpLogger | Get TCP logger config |
POST | /config/tcpLogger | Set TCP logger config |
GET | /config/wifi | Get WiFi config |
POST | /config/wifi | Set WiFi config |
POST | /credentials | Set authorization credentials |
POST | /firmware/checkUpdate | Check for new firmware version on OTA server |
POST | /firmware/update | Update firmware from OTA server |
POST | /firmware/upload | Upload firmware |
GET | /info | Get info |
POST | /restart | Restart device |
GET | /state | Get state |
Name | Path | Description |
---|---|---|
BoardConfig | #/components/schemas/BoardConfig | |
Credentials | #/components/schemas/Credentials | |
EvseConfig | #/components/schemas/EvseConfig | |
FirmwareCheck | #/components/schemas/FirmwareCheck | |
FullConfig | #/components/schemas/FullConfig | |
Info | #/components/schemas/Info | |
ModbusConfig | #/components/schemas/ModbusConfig | |
MqttConfig | #/components/schemas/MqttConfig | |
SerialConfig | #/components/schemas/SerialConfig | |
SerialDataBits | #/components/schemas/SerialDataBits | Data bits |
SerialMode | #/components/schemas/SerialMode | Serial operating mode |
SerialParity | #/components/schemas/SerialParity | Parity |
SerialStopBits | #/components/schemas/SerialStopBits | Stop bits |
SerialType | #/components/schemas/SerialType | Serial type |
State | #/components/schemas/State | |
TcpLoggerConfig | #/components/schemas/TcpLoggerConfig | |
WifiConfig | #/components/schemas/WifiConfig | |
basicAuth | #/components/securitySchemes/basicAuth |
- Summary
Get board config
- 200 Successful operation
application/json
{
aux1: boolean
aux2: boolean
aux3: boolean
deviceName: string
energyMeter: string
energyMeterThreePhases: boolean
maxChargingCurrent: integer
proximity: boolean
rcm: boolean
// Serial type
serial1: string
serial1Name: string
serial2:#/components/schemas/SerialType
serial2Name: string
serial3:#/components/schemas/SerialType
serial3Name: string
socketLock: boolean
socketLockMinBreakTime: integer
}
- 401 Not authenticated
- Summary
Get full config
- 200 Successful operation
application/json
{
evse: {
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
modbus: {
// Enable Modbus TCP/IP slave on port 502
tcpEnabled: boolean
// Modbus Unit ID
unitId: integer
}
mqtt: {
// Enable MQTT
enabled: boolean
// Server url
server: string
// Base topic
baseTopic: string
// User, empty string if not required
user: string
// Passport, empty string if not required
password: string
// Periodicity publishing state topic in s
periodicity: integer
}
serial: {
// Serial operating mode
serial1Mode: string
// Baud rate
serial1BaudRate: integer
// Data bits
serial1DataBits: string
// Stop bits
serial1StopBits: string
// Parity
serial1Parity: string
serial2Mode:#/components/schemas/SerialMode
// Baud rate
serial2BaudRate: integer
serial2DataBits:#/components/schemas/SerialDataBits
serial2StopBits:#/components/schemas/SerialStopBits
serial2Parity:#/components/schemas/SerialParity
serial3Mode:#/components/schemas/SerialMode
// Baud rate
serial3BaudRate: integer
serial3DataBits:#/components/schemas/SerialDataBits
serial3StopBits:#/components/schemas/SerialStopBits
serial3Parity:#/components/schemas/SerialParity
}
tcpLogger: {
// Enable TCP logger on port 3000
enabled: boolean
}
wifi: {
// Enable WiFi STA connection
enabled: boolean
// WiFi SSID
ssid: string
// Passport, empty string if not required
password?: string
}
}
- 401 Not authenticated
- Summary
Get EVSE config
- 200 Successful operation
application/json
{
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
- 401 Not authenticated
- Summary
Set EVSE config
- application/json
{
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Get modbus config
- 200 Successful operation
application/json
{
// Enable Modbus TCP/IP slave on port 502
tcpEnabled: boolean
// Modbus Unit ID
unitId: integer
}
- 401 Not authenticated
- Summary
Set modbus config
- application/json
{
// Enable Modbus TCP/IP slave on port 502
tcpEnabled: boolean
// Modbus Unit ID
unitId: integer
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Get MQTT config
- 200 Successful operation
application/json
{
// Enable MQTT
enabled: boolean
// Server url
server: string
// Base topic
baseTopic: string
// User, empty string if not required
user: string
// Passport, empty string if not required
password: string
// Periodicity publishing state topic in s
periodicity: integer
}
- 401 Not authenticated
- Summary
Set MQTT config
- application/json
{
// Enable MQTT
enabled: boolean
// Server url
server: string
// Base topic
baseTopic: string
// User, empty string if not required
user: string
// Passport, empty string if not required
password: string
// Periodicity publishing state topic in s
periodicity: integer
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Get serial config
- 200 Successful operation
application/json
{
// Serial operating mode
serial1Mode: string
// Baud rate
serial1BaudRate: integer
// Data bits
serial1DataBits: string
// Stop bits
serial1StopBits: string
// Parity
serial1Parity: string
serial2Mode:#/components/schemas/SerialMode
// Baud rate
serial2BaudRate: integer
serial2DataBits:#/components/schemas/SerialDataBits
serial2StopBits:#/components/schemas/SerialStopBits
serial2Parity:#/components/schemas/SerialParity
serial3Mode:#/components/schemas/SerialMode
// Baud rate
serial3BaudRate: integer
serial3DataBits:#/components/schemas/SerialDataBits
serial3StopBits:#/components/schemas/SerialStopBits
serial3Parity:#/components/schemas/SerialParity
}
- 401 Not authenticated
- Summary
Set serial config
- application/json
{
// Serial operating mode
serial1Mode: string
// Baud rate
serial1BaudRate: integer
// Data bits
serial1DataBits: string
// Stop bits
serial1StopBits: string
// Parity
serial1Parity: string
serial2Mode:#/components/schemas/SerialMode
// Baud rate
serial2BaudRate: integer
serial2DataBits:#/components/schemas/SerialDataBits
serial2StopBits:#/components/schemas/SerialStopBits
serial2Parity:#/components/schemas/SerialParity
serial3Mode:#/components/schemas/SerialMode
// Baud rate
serial3BaudRate: integer
serial3DataBits:#/components/schemas/SerialDataBits
serial3StopBits:#/components/schemas/SerialStopBits
serial3Parity:#/components/schemas/SerialParity
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Get TCP logger config
- 200 Successful operation
application/json
{
// Enable TCP logger on port 3000
enabled: boolean
}
- 401 Not authenticated
- Summary
Set TCP logger config
- application/json
{
// Enable TCP logger on port 3000
enabled: boolean
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Get WiFi config
- 200 Successful operation
application/json
{
// Enable WiFi STA connection
enabled: boolean
// WiFi SSID
ssid: string
// Passport, empty string if not required
password?: string
}
- 401 Not authenticated
- Summary
Set WiFi config
- application/json
{
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Config updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Set authorization credentials
- application/json
{
// Username, empty string if not required
user?: string
// Password, empty string if not required
password?: string
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Credentials updated"
}
-
400 Bad request
-
401 Not authenticated
- Summary
Check for new firmware version on OTA server
- 200 Successful operation
application/json
{
// Available firmware version
available: string
// Current firmware version
current: string
// Is avaialble newer version than current
newer: boolean
}
-
400 Bad request
-
401 Not authenticated
-
500 Internal server error
- Summary
Update firmware from OTA server
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Firmware upgraded successfully"
}
-
401 Not authenticated
-
500 Firmware upgrade failed
- Summary
Upload firmware
- application/octet-stream
{
"type": "string",
"format": "binary"
}
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Firmware uploaded successfully"
}
-
401 Not authenticated
-
500 Firmware upload failed
- Summary
Get info
- 200 Successful operation
application/json
{
appDate: string
appTime: string
appVersion: string
chip: string
chipCores: integer
chipRevision: number
idfVersion: string
ip: string
ipAp: string
mac: string
macAp: string
maxHeapSize: integer
temperatureHigh: number
temperatureLow: number
temperatureSensorCount: integer
// Uptime in s
uptime: integer
}
- 401 Not authenticated
- Summary
Restart device
- 200 Successful operation
text/plain
{
"type": "string",
"example": "Restart in one second"
}
- 401 Not authenticated
- Summary
Get state
- 200 Successful operation
application/json
{
// Power in W
actualPower: integer
// Session consumption in Ws
consumption: integer
current?: number[]
voltage?: number[]
// Session elapsed time in s
elapsed: integer
// Charging enabled
enabled: boolean
// Non zero value if error occured
error: integer
// Session charging limit reached
limitReached: boolean
// Pending auhorization before start charging, when authorization is required
pendingAuth: boolean
// EVSE state
state: string
}
- 401 Not authenticated
{
aux1: boolean
aux2: boolean
aux3: boolean
deviceName: string
energyMeter: string
energyMeterThreePhases: boolean
maxChargingCurrent: integer
proximity: boolean
rcm: boolean
// Serial type
serial1: string
serial1Name: string
serial2:#/components/schemas/SerialType
serial2Name: string
serial3:#/components/schemas/SerialType
serial3Name: string
socketLock: boolean
socketLockMinBreakTime: integer
}
{
// Username, empty string if not required
user?: string
// Password, empty string if not required
password?: string
}
{
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
{
// Available firmware version
available: string
// Current firmware version
current: string
// Is avaialble newer version than current
newer: boolean
}
{
evse: {
// Charging current in A
chargingCurrent?: number
// Default charging current in A, stored in NVS
defaultChargingCurrent?: number
// Require authorization to start charging
requireAuth?: boolean
// Socket outlet functionality (proximity pilot sensing and socket lock if available)
socketOutlet?: boolean
// Residual current monitor
rcm?: boolean
// Session consumption limit in Ws
consumptionLimit?: integer
// Default session consumption limit in Ws, stored in NVS
defaultConsumptionLimit?: integer
// Session elapsed time limit in s
elapsedLimit?: integer
// Default session elapsed time limit in s, stored in NVS
defaultElapsedLimit?: integer
// Session underpower limit in W
underPowerLimit?: integer
// Default session underpower limit in W, stored in NVS
defaultUnderPowerLimit?: integer
// Socket lock operating time in ms
socketLockOperatingTime?: integer
// Socket lock break time in ms
socketLockBreakTime?: integer
// Socket lock detection (unlock_high=false, locked_high=true)
socketLockDetectionHigh?: boolean
// Socket lock retry count
socketLockRetryCount?: integer
// Energy meter mode
energyMeter?: string
// Energy meter voltage in V, when is not measured
acVoltage?: integer
// Energy meter pulse amount in Wh
pulseAmount?: integer
aux1?: string
aux2?: string
aux3?: string
}
modbus: {
// Enable Modbus TCP/IP slave on port 502
tcpEnabled: boolean
// Modbus Unit ID
unitId: integer
}
mqtt: {
// Enable MQTT
enabled: boolean
// Server url
server: string
// Base topic
baseTopic: string
// User, empty string if not required
user: string
// Passport, empty string if not required
password: string
// Periodicity publishing state topic in s
periodicity: integer
}
serial: {
// Serial operating mode
serial1Mode: string
// Baud rate
serial1BaudRate: integer
// Data bits
serial1DataBits: string
// Stop bits
serial1StopBits: string
// Parity
serial1Parity: string
serial2Mode:#/components/schemas/SerialMode
// Baud rate
serial2BaudRate: integer
serial2DataBits:#/components/schemas/SerialDataBits
serial2StopBits:#/components/schemas/SerialStopBits
serial2Parity:#/components/schemas/SerialParity
serial3Mode:#/components/schemas/SerialMode
// Baud rate
serial3BaudRate: integer
serial3DataBits:#/components/schemas/SerialDataBits
serial3StopBits:#/components/schemas/SerialStopBits
serial3Parity:#/components/schemas/SerialParity
}
tcpLogger: {
// Enable TCP logger on port 3000
enabled: boolean
}
wifi: {
// Enable WiFi STA connection
enabled: boolean
// WiFi SSID
ssid: string
// Passport, empty string if not required
password?: string
}
}
{
appDate: string
appTime: string
appVersion: string
chip: string
chipCores: integer
chipRevision: number
idfVersion: string
ip: string
ipAp: string
mac: string
macAp: string
maxHeapSize: integer
temperatureHigh: number
temperatureLow: number
temperatureSensorCount: integer
// Uptime in s
uptime: integer
}
{
// Enable Modbus TCP/IP slave on port 502
tcpEnabled: boolean
// Modbus Unit ID
unitId: integer
}
{
// Enable MQTT
enabled: boolean
// Server url
server: string
// Base topic
baseTopic: string
// User, empty string if not required
user: string
// Passport, empty string if not required
password: string
// Periodicity publishing state topic in s
periodicity: integer
}
{
// Serial operating mode
serial1Mode: string
// Baud rate
serial1BaudRate: integer
// Data bits
serial1DataBits: string
// Stop bits
serial1StopBits: string
// Parity
serial1Parity: string
serial2Mode:#/components/schemas/SerialMode
// Baud rate
serial2BaudRate: integer
serial2DataBits:#/components/schemas/SerialDataBits
serial2StopBits:#/components/schemas/SerialStopBits
serial2Parity:#/components/schemas/SerialParity
serial3Mode:#/components/schemas/SerialMode
// Baud rate
serial3BaudRate: integer
serial3DataBits:#/components/schemas/SerialDataBits
serial3StopBits:#/components/schemas/SerialStopBits
serial3Parity:#/components/schemas/SerialParity
}
{
"type": "string",
"description": "Data bits",
"enum": [
"5",
"6",
"7",
"8"
]
}
{
"type": "string",
"description": "Serial operating mode",
"enum": [
"none",
"at",
"log",
"modbus"
]
}
{
"type": "string",
"description": "Parity",
"enum": [
"disable",
"even",
"odd"
]
}
{
"type": "string",
"description": "Stop bits",
"enum": [
"1",
"1.5",
"2"
]
}
{
"type": "string",
"description": "Serial type",
"enum": [
"none",
"uart",
"rs485"
]
}
{
// Power in W
actualPower: integer
// Session consumption in Ws
consumption: integer
current?: number[]
voltage?: number[]
// Session elapsed time in s
elapsed: integer
// Charging enabled
enabled: boolean
// Non zero value if error occured
error: integer
// Session charging limit reached
limitReached: boolean
// Pending auhorization before start charging, when authorization is required
pendingAuth: boolean
// EVSE state
state: string
}
{
// Enable TCP logger on port 3000
enabled: boolean
}
{
// Enable WiFi STA connection
enabled: boolean
// WiFi SSID
ssid: string
// Passport, empty string if not required
password?: string
}
{
"type": "http",
"scheme": "basic"
}