mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 01:16:14 +00:00
fix charge_control arg
This commit is contained in:
@@ -144,6 +144,7 @@ class MyPSACC:
|
||||
"id"] + "/status?client_id=" + self.client_id, headers=MyPSACC.headers, data=body)
|
||||
data = res.json()
|
||||
return data
|
||||
|
||||
def get_vehicles(self):
|
||||
|
||||
res =self.api().get_vehicles_by_device()
|
||||
|
||||
@@ -46,10 +46,12 @@ With this app you will be able to :
|
||||
3. If it works you will have VIN of your vehicles and there ids in the last line. The script generate a test.json file with all credentials needed.
|
||||
|
||||
## II. Use the app
|
||||
1. start the app:
|
||||
``python3 server.py -f test.json``
|
||||
1. Install requirements
|
||||
```pip3 install -r requirements.txt```
|
||||
2. start the app:
|
||||
``python3 server.py -f test.json -c charge_control1.json``
|
||||
|
||||
2. Test it
|
||||
3. Test it
|
||||
|
||||
2.1 Get the car state :
|
||||
http://localhost:5000/get_vehiculeinfo/YOURVIN
|
||||
|
||||
@@ -63,7 +63,7 @@ def charge_control():
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-f","--config", help="config file",type = argparse.FileType('r'))
|
||||
parser.add_argument("-c","--charge-control", help="enable charge control",action="store_true")
|
||||
parser.add_argument("-c","--charge-control", help="enable charge control",const="charge_control.json", nargs='?')
|
||||
parser.parse_args()
|
||||
return parser
|
||||
|
||||
|
||||
Reference in New Issue
Block a user