update doc

This commit is contained in:
Florian Bezannier
2021-06-16 17:59:16 +02:00
parent 2a3afef135
commit a36a8fe900
3 changed files with 5 additions and 47 deletions
+1
View File
@@ -30,6 +30,7 @@ For information on configuring the psa_car_controller Docker container [see this
## I. Installation
- [Installation on Linux or Windows](docs/Install.md)
- [Instalation as Home Assistant addon](https://github.com/flobz/psacc-ha/blob/main/psacc-ha/README.md)
- [Installation in Docker](docs/Docker.md)
## II. Use the app
+1 -28
View File
@@ -6,11 +6,6 @@ A containerised version of the psa_car_controller Python scripts by Flobz.
### Overview
Once the container is running, the configuration of the psa_car_controller app is near-identical to setup instructions detailed in the app's readme.
You'll still need to make sure you have an apk for the appropriate Android app that it's attempting to use. The examples in this readme use the MyVauxhall app v1.27.1 from APKPure:
https://m.apkpure.com/myvauxhall-the-official-app-for-vauxhall-drivers/com.psa.mym.myvauxhall/download/2107-APK?from=versions%2Fversion
On your Docker host, create a config folder which will be mapped to the container and used to store all persistent data. Copy your APK into this folder.
### Installation
Create the container, detached, exposing port 5000, and mapping the a new config folder on your host to /config inside the container:
@@ -22,26 +17,4 @@ docker run -d -ti --name psa_car_controller1 \
psa_car_controller
```
Connect to the bash shell of the newly created container:
```
docker exec -it psa_car_controller1 /bin/bash
```
Inside the container, run the app_decoder.py script. You'll be prompted for the credentials you use to log into the app on your mobile device usually, plus your country code. If the script gives you a Success! message then move on:
```
python3 /psa_car_controller/app_decoder.py /config/com.psa.mym.myvauxhall_1.27.1.apk
```
Start server.py for a first run:
```
python3 /psa_car_controller/server.py -f /config/test.json -c /config/charge_config1.json -p 5000 -l 0.0.0.0 -r -b /config
```
You will be prompted to enter a code, sent you you by SMS to your registered mobile number, and the PIN for your account. Sometimes it asks twice (???), but once accepted the service should run. Allow it to run for about a minute before pressing ctrl+c to quit. You should end up back at the bash prompt within the container.
The final task is to update the container's configuration file to tell it to run the service automatically on next boot. This is done by editing /config/dockerconfig.conf and changing the SHELL_ONLY parameter to FALSE. Alternatively, paste the below command into your shell one by one. These will update the dockerconfig.conf file, exit the container's bash shell, stop the container, then restart the container.
```
echo "export SHELL_ONLY=\"FALSE\"" > /config/dockerconfig.conf
exit
docker stop psa_car_controller1
docker start psa_car_controller1
```
Go to http://127.0.0.1:5000 and follow instruction
+3 -19
View File
@@ -18,31 +18,15 @@ We will retrieve this information:
- For everyone :
```pip3 install -r requirements.txt```
1.3 run the decoder script : ```python3 app_decoder.py <path to my apk file>```
mypeugeot email: <write your mypeugeot email>
mypeugeot password: <write your mypeugeot password>
What is the car api realm : clientsB2CPeugeot, clientsB2CDS, clientsB2COpel, clientsB2CVauxhall
clientsB2CPeugeot
What is your country code ? (ex: FR, GB, DE, ES...)
FR
save config change
Your vehicles: {'VINNUBMER': {'id': 'vehicule id'}}
1.4 If it works you will have VIN of your vehicles and there ids in the last line.
The script generates a test.json file with all credentials needed.
1.5 start the app:
1.3 start the app:
Start the app with charge control enabled :
``python3 server.py -f test.json -c charge_config1.json``
``python3 server.py -f test.json -c charge_config1.json --web-conf``
At the first launch you will receive an SMS, and you will be asked to give it and also give your pin code (the four-digit code that your use on the android app).
At the first launch you will be asked to connect and give a code that you will receive by SMS and also give your pin code (the four-digit code that your use on the android app).
If it failed you can remove the file otp.bin and retry.
You can see all options available with :