Skip to content

REST: Add reset- and batterymode-endpoints #750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"format": "prettier --write . && node src/sortOpenAPI.js",
"format": "prettier --write . && npm run sort",
"sort": "node src/sortOpenAPI.js",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
Expand Down
65 changes: 65 additions & 0 deletions static/rest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,26 @@ paths:
responses:
"200":
$ref: "#/components/responses/NumberResult"
/batterymode:
delete:
summary: TODO
description: TODO
tags:
- Home Battery
responses:
"200":
$ref: "#/components/responses/BatteryModeResult"
/batterymode/{batteryMode}:
post:
summary: TODO
description: TODO
tags:
- Home Battery
parameters:
- $ref: "#/components/parameters/batteryMode"
responses:
"200":
$ref: "#/components/responses/BatteryModeResult"
/buffersoc/{soc}:
post:
summary: Set battery buffer SoC
Expand Down Expand Up @@ -825,6 +845,22 @@ paths:
$ref: "#/components/schemas/LogAreas"
"401":
$ref: "#/components/responses/Unauthorized"
/system/reset:
post:
summary: TODO
description: TODO
security:
- cookieAuth: []
tags:
- System
responses:
"200":
description: Success
content:
text/plain:
schema:
type: string
example: OK
/system/shutdown:
post:
summary: Shutdown evcc
Expand Down Expand Up @@ -966,6 +1002,15 @@ paths:
$ref: "#/components/schemas/StaticSocPlan"
components:
schemas:
BatteryMode:
description: TODO
type: string
example: normal
enum:
- unknown
- normal
- hold
- charge
ChangePassword:
type: object
properties:
Expand Down Expand Up @@ -1335,6 +1380,13 @@ components:
required: true
schema:
$ref: "#/components/schemas/Power"
batteryMode:
name: batteryMode
description: TODO
in: path
required: true
schema:
$ref: "#/components/schemas/BatteryMode"
costLimit:
name: cost
description: Cost limit in configured currency (default EUR) or CO2 limit in g/kWh
Expand Down Expand Up @@ -1445,6 +1497,19 @@ components:
type: string
enum:
- Unauthorized
BatteryModeResult:
description: TODO
content:
application/json:
schema:
type: object
properties:
result:
type: integer
description: |
Battery mode. 0: unknown, 1: normal, 2: hold, 3: charge
minimum: 0
maximum: 3
securitySchemes:
cookieAuth:
type: apiKey
Expand Down