VW Kommi is a simple tool to read out commission numbers of VW ID vehicles.
The following requirements are needed to run VW Kommi:
- Python 3.8 (or newer)
- pip
- virtualenv (optional)
The following steps are based on Ubuntu 18.04. Other distributions may work in a similar way.
First install the needed packages.
sudo apt install python3.8 python3.8-venv
Then install virtualenv.
python3.8 -m pip install virtualenv
The command will install the virtualenv binary to ~/.local/bin. So add your local bin directories to your PATH system environment variable. Therefore open ~/.bashrc and add the following line to the end if it is not already there:
PATH=$PATH:~/.local/bin:~/.local/sbin
Download Python 3 from the Python Download Website. Following the setup you should bbe able to also install pip. Be sure to add the Python-Path and Scripts to your Path to make the commands available.
After installing Python install virtualenv.
pip install virtualenv
Using virtualenv is not needed but keeps the system installation of Python clean. So I recommend using it!
Create a virtual environment and cd to it.
python -m venv vwkommi
cd vwkommi
Attention: Depending on the system python3.8 needs to be used as command.
Activate the virtual environment.
. bin/activate
Attention Windows users: The above command is different using windows:
Scripts\activate
If the above command worked you can see that the environment is active by (vwkommi) in front of the command line.
Clone the project. If you are using virtualenv change to its directory and activate it first (see section Create virtual environment)!
git clone https://github.com/SushiTee/vwkommi.git
The last thing to do is installing the package. Therefor go into the checked out project directory and install the package using pip.
cd vwkommi
pip install -e .
The parameter -e stands for editable. This means all local changes to the project or updates will be applied without needing to reinstall the package.
In the subdirectory vwkommi a settings_local.py.example can be found. It is to set local settings for your installation. copy the file like so:
cp settings_local.py.example settings_local.py
All settings made there override the default settings set in settings_default.py.
Make sure you enter your user data within the settings_local.py.
The range of the commission numbers to be requested can be set as well.
As VW Kommi is a python module it is run using the -m parameter of the python command:
python -m vwkommi <subcommand>
The following subcommands are available:
- request - Requests data from VW and stores them into the raw_data directory
Within the settings_local.py you can set the range commission numbers to be requested.
request sub command
The request sub command supports two additional options:
- -f, --find-prefix - Find the prefix and year of a commission number
python -m vwkommi request -f AL1234
- -a, --add-to-profile - Tries to add a car with a given commission to your profile
python -m vwkommi request -a AL1234
Additionally the settings set via settings_default.py or settings_local.py can be overwritten by the command line:
- -b, --base-dir - The directory where the downloaded data is stored. An additional directory called raw_data will be created in the selected directory.
python -m vwkommi request -b /home/user/vwdata
- -w, --worker-count - The number of workers to be used to make requests (default: 30)
python -m vwkommi request -w 20
- -u, --username - The username of your account on the VW website
python -m vwkommi request -u example
- -p, --password - The password of you account on the VW website
python -m vwkommi request -p example
- -P, --prefix-list - The prefixes for commission numbers which are tried (default [185,900,877,902]).
The default value is for ID.3, ID.4 and ID.5 vehicles.
python -m vwkommi request -P [123,444]
- -s, --skip-fin-details - Set to True to request additional VIN details. It may be very slow (default: True).
python -m vwkommi request -s True
- -c, --commission-number-range - Sets the ranges to be requested. The value is a list containing lists with four elements. The inner lists elements consist of the character part of the commission number. The next two elements are the actual range. The last element contains the number of characters of the number part.
python -m vwkommi request -c '[[\"AF\",0,5000,4],[\"AH\",123,123,4]]'
Instead of installing local environment you can build a docker image and run vwkommi with docker. To build the docker image execute:
docker build -t vwkommi .
To run the image create a settings_local.py (here under /srv/vwkommi/settings_local.py) and execute the following command:
docker run --rm -v /srv/vwkommi/raw_data/:/work/vwkommi/raw_data -v /srv/vwkommi/settings_local.py:/work/vwkommi/settings_local.py vwkommi:latest request
You will find then the .json files in the directory /srv/vwkommi/raw_data/.