Skip to main content

Library for retrieving information from car connectivity services

Project description

CarConnectivity Command Line Interface

GitHub sourcecode GitHub release (latest by date) GitHub GitHub issues PyPI - Downloads PyPI - Python Version Donate at PayPal Sponsor at Github

CarConnectivity will become the successor of WeConnect-python in 2025 with similar functionality but support for other brands beyond Volkswagen!

Supported Car Brands

CarConenctivity uses a plugin architecture to enable access to the services of various brands. Currently known plugins are:

Brand Connector
Skoda CarConnectivity-connector-skoda
Volkswagen CarConnectivity-connector-volkswagen
Tronity CarConnectivity-connector-tronity

If you know of a connector not listed here let me know and I will add it to the list. If you are a python developer and willing to implement a connector for a brand not listed here, let me know and I try to support you as good as possible

How to install

You first need a running Python installation. Afterwards you can install CarConnectivity-cli with:

pip install carconnectivity-cli

You also need the right connector for your vehicle, e.g.

pip install carconnectivity-connector-skoda

or you installed CarConnectivity-cli with all known connectors and plugins:

pip3 install 'carconnectivity-cli[connectors,plugins]'

The plugins will then become active when you add them to your configuration.

How to use

Start by creating a carconnectivity.json configuration file

Configuration

In your carconnectivity.json configuration add a section for the connectors you like to use like this:

{
    "carConnectivity": {
        "connectors": [
            {
                "type": "volkswagen",
                "config": {
                    "username": "test@test.de",
                    "password": "testpassword123"
                }
            },
            {
                "type": "skoda",
                "config": {
                    "username": "test@test.de",
                    "password": "testpassword123"
                }
            }
        ]
    }
}

The detailed configuration options of the connectors can be found in their README files.

How to use the commandline interface

Start carconnectivity-cli from the commandline, by default you will enter the interactive shell:

carconnectivity-cli mycarconnectivity_config.json

You get all the usage information by using the --help command

carconnectivity-cli mycarconnectivity_config.json --help

With the "list" command you can get a list of all available information you can query (use "list -s" if you want to see which attributes can be changed)

carconnectivity-cli mycarconnectivity_config.json list
/garage/WVWABCE1ZSD057394
/garage/WVWABCE1ZSD057394/vin
/garage/WVWABCE1ZSD057394/type
/garage/WVWABCE1ZSD057394/odometer
/garage/WVWABCE1ZSD057394/model
/garage/WVWABCE1ZSD057394/name
...

You can then pass the addresses to the "get" command:

carconnectivity-cli mycarconnectivity_config.json get /garage/WVWABCE1ZSD057394/model
ID.3

or the "set" command:

carconnectivity-cli mycarconnectivity_config.json /garage/WVWABCE1ZSD057394/climatisation/command stop

The "events" command allows you to monitor what is happening on the WeConnect Interface:

carconnectivity-cli mycarconnectivity_config.json events
2021-05-26 16:49:58.698570: /garage/WVWABCE1ZSD057394/doors/lock_state: new value: unlocked
2021-05-26 16:49:58.698751: /garage/WVWABCE1ZSD057394/doors/bonnet/lock_state: new value: unknown lock state
2021-05-26 16:49:58.698800: /garage/WVWABCE1ZSD057394/doors/bonnet/open_state: new value: closed
2021-05-26 16:49:58.698980: /garage/WVWABCE1ZSD057394/doors/frontLeft/lock_state: new value: unlocked
2021-05-26 16:49:58.699056: /garage/WVWABCE1ZSD057394/doors/frontLeft/open_state: new value: closed

S-PIN

For some commands (e.g. locking/unlocking supported on some cars) you need in addition to your login the so called S-PIN, you can provide it with the spin config option:

Interactive Shell

You can also use an interactive shell:

carconnectivity-cli --username user@mail.de --password test123 shell
Welcome! Type ? to list commands
user@mail.de@weconnect-sh:/$update
update done
user@mail.de@weconnect-sh:/$cd garage
user@mail.de@weconnect-sh:/garage$ ls
..
WVWABCE1ZSD057394
WVWABCE13SD057505
user@mail.de@weconnect-sh:/garage$ cd /garage/WVWABCE13SD057505/status/parkingPosition
user@mail.de@weconnect-sh:/garage/WVWABCE13SD057505/status/parkingPosition$ cat
[parkingPosition] (last captured 2021-06-01T19:05:04+00:00)
	Latitude: 51.674535
	Longitude: 16.154376
user@mail.de@weconnect-sh:/garage/WVWABCE13SD057505/parking/parkingPosition$ exit
Bye

Caching

By default carconnectivity-cli will cache (store) the data for 300 seconds before retrieving new data from the servers. This makes carconnectivity-cli more responsive and at the same time does not cause unneccessary requests to the vw servers. If you want to increase the cache duration use max_age config option. If you do not want to cache use no_cache option. Please use the no_cache option with care. You are generating traffic with subsequent requests. If you request too often you might be blocked for some time until you can generate requests again.

Credentials

If you do not want to provide your username or password all the time you have to create a ".netrc" file at the appropriate location (usually this is your home folder):

machine volkswagen.de
login test@test.de
password testpassword123

You can also provide the location of the netrc file in the configuration.

The optional S-PIN needed for some commands can be provided in the account section:

# For WeConnect
machine volkswagen.de
login test@test.de
password testpassword123
account 1234

Tested with

  • Volkswagen ID.3 Modelyear 2021
  • Volkswagen Passat GTE Modelyear 2021
  • Skoda Enyaq RS Modelyear 2025

Reporting Issues

Please feel free to open an issue at GitHub Issue page to report problems you found.

Known Issues

  • The Tool is in alpha state and may change unexpectedly at any time!

Related Projects:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carconnectivity_cli-0.8.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carconnectivity_cli-0.8-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file carconnectivity_cli-0.8.tar.gz.

File metadata

  • Download URL: carconnectivity_cli-0.8.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for carconnectivity_cli-0.8.tar.gz
Algorithm Hash digest
SHA256 4d48e31fc40c902e179abbd8c7b87a4daa4de1cc889738a482acd3eb055d1775
MD5 860efbc025f5768833856993ce9769c3
BLAKE2b-256 13c78e724770196cc158f99d8ba9cc2bb96ce5b4ac4fb339b5339a7bc587ad21

See more details on using hashes here.

Provenance

The following attestation bundles were made for carconnectivity_cli-0.8.tar.gz:

Publisher: build_and_publish.yml on tillsteinbach/CarConnectivity-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carconnectivity_cli-0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for carconnectivity_cli-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7c71ca426a48f7d97a9e86fda942e4616cf9272682a20dca06cbc126910394
MD5 ad4587a65d656d8e9a1cecaab4a59b85
BLAKE2b-256 d8c4acf98abde931abdbc78f08659f65efc23485ad5959331815e6e1b2fd074a

See more details on using hashes here.

Provenance

The following attestation bundles were made for carconnectivity_cli-0.8-py3-none-any.whl:

Publisher: build_and_publish.yml on tillsteinbach/CarConnectivity-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page