mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 17:36:15 +00:00
feat: get battery SOH from API
This commit is contained in:
committed by
Florian BEZANNIER
parent
c56aad4204
commit
08f03e3a53
@@ -33,7 +33,7 @@ The official API is documented [here](https://developer.groupe-psa.io/webapi/b2c
|
||||
- [Installation on Raspberry Pi with docker-compose (external Tutorial)](https://return2.net/opel-peugeot-electric-vehicle-set-charging-threshold-limit/)
|
||||
## II. Use the API
|
||||
|
||||
Look at [API documentation](./docs/psa_api.md)
|
||||
Look at [API documentation](./docs/psacc_api)
|
||||
|
||||
## III. Use the dashboard
|
||||
|
||||
|
||||
@@ -55,4 +55,8 @@
|
||||
|
||||
http://localhost:5000/settings/electricity_config?night_price=0.2
|
||||
|
||||
http://127.0.0.1:5000/settings/general?currency=%C2%A3
|
||||
http://localhost:5000/settings/general?currency=%C2%A3
|
||||
|
||||
15. Get battery SOH
|
||||
|
||||
http://localhost:5000/battery/soh/<vin>
|
||||
@@ -182,3 +182,8 @@ def settings_section(section: str):
|
||||
def settings():
|
||||
return json_response(APP.config.json())
|
||||
|
||||
|
||||
@app.route('/battery/soh/<string:vin>')
|
||||
def db(vin: str):
|
||||
soh = Database.get_last_soh_by_vin(vin)
|
||||
return jsonify({"soh": soh})
|
||||
|
||||
Reference in New Issue
Block a user