docs: move api to new file

This commit is contained in:
Florian Bezannier
2024-01-08 08:57:16 +01:00
committed by Florian BEZANNIER
parent 4fa4d553f7
commit 5a2f09e2d6
2 changed files with 50 additions and 37 deletions
+2 -37
View File
@@ -31,44 +31,9 @@ The official API is documented [here](https://developer.groupe-psa.io/webapi/b2c
- [Installation as Home Assistant addon](https://github.com/flobz/psacc-ha/blob/main/psacc-ha/README.md)
- [Installation in Docker](docs/Docker.md)
- [Installation on Raspberry Pi with docker-compose (external Tutorial)](https://return2.net/opel-peugeot-electric-vehicle-set-charging-threshold-limit/)
## II. Use the app
2.1 Get the car state
http://localhost:5000/get_vehicleinfo/YOURVIN
2.2 Get the car state from cache to avoid to use PSA API too much
http://localhost:5000/get_vehicleinfo/YOURVIN?from_cache=1
2.2 Stop charge
http://localhost:5000/charge_now/YOURVIN/0
2.3 Set hour to stop the charge to 6 am
http://localhost:5000/charge_control?vin=YOURVIN&hour=6&minute=0
2.4 Change car charge threshold to 80%
http://localhost:5000/charge_control?vin=YOURVIN&percentage=80
2.5 See the dashboard (only if record is enabled)
http://localhost:5000
2.6 Refresh car state (ask car to send its state):
http://localhost:5000/wakeup/YOURVIN
2.7 Start (1)/Stop (0) preconditioning
http://localhost:5000/preconditioning/YOURVIN/1 or 0
2.8 Change charge hour (for example: set it to 22h30)
http://localhost:5000/charge_hour?vin=YOURVIN&hour=22&minute=30
2.9 Honk the horn
http://localhost:5000/horn/YOURVIN/count
2.10 Flash the lights (Duration is always roughly 10 seconds, regardless of set duration)
http://localhost:5000/lights/YOURVIN/duration
2.11 Lock (1)/Unlock (0) the doors
http://localhost:5000/lock_door/YOURVIN/1 or 0
## II. Use the API
Look at [API documentation](./docs/psa_api.md)
## III. Use the dashboard
+48
View File
@@ -0,0 +1,48 @@
# PSACC API
1. Get the car state
http://localhost:5000/get_vehicleinfo/YOURVIN
2. Get the car state from cache to avoid to use PSA API too much
http://localhost:5000/get_vehicleinfo/YOURVIN?from_cache=1
3. Stop charge
http://localhost:5000/charge_now/YOURVIN/0
4. Set hour to stop the charge to 6 am
http://localhost:5000/charge_control?vin=YOURVIN&hour=6&minute=0
5. Change car charge threshold to 80%
http://localhost:5000/charge_control?vin=YOURVIN&percentage=80
6. See the dashboard (only if record is enabled)
http://localhost:5000
7. Refresh car state (ask car to send its state):
http://localhost:5000/wakeup/YOURVIN
8. Start (1)/Stop (0) preconditioning
http://localhost:5000/preconditioning/YOURVIN/1 or 0
9. Change charge hour (for example: set it to 22h30)
http://localhost:5000/charge_hour?vin=YOURVIN&hour=22&minute=30
10. Honk the horn
http://localhost:5000/horn/YOURVIN/count
11. Flash the lights (Duration is always roughly 10 seconds, regardless of set duration)
http://localhost:5000/lights/YOURVIN/duration
12. Lock (1)/Unlock (0) the doors
http://localhost:5000/lock_door/YOURVIN/1 or 0