diff --git a/MyPSACC.py b/MyPSACC.py index 54a6e9f..76643bc 100644 --- a/MyPSACC.py +++ b/MyPSACC.py @@ -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() diff --git a/README.md b/README.md index 71d65ba..fb50307 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/server.py b/server.py index 035f601..e423564 100644 --- a/server.py +++ b/server.py @@ -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