CarConnectivity plugin for publishing data to MQTT
Project description
CarConnectivity Plugin for MQTT
CarConnectivity will become the successor of WeConnect-python in 2025 with similar functionality but support for other brands beyond Volkswagen!
CarConnectivity is a python API to connect to various car services. If you want to publish the data collected from your vehicle in a standard protocol such as MQTT this plugin will help you. This Client enables you to integrate with the MQTT Broker of your choice (e.g. your home automation solution such as ioBroker, FHEM or Home Assistant)
How to install
Install using PIP
If you want to use CarConnectivity-mqtt, the easiest way is to obtain it from PyPI. Just install instead using:
pip3 install carconnectivity-plugin-mqtt
Connectors & Plugins
In order to connect vehciles from various brands, you need to install connector, e.g. with:
pip3 install carconnectivity-connector-volkswagen
pip3 install carconnectivity-connector-skoda
pip3 install carconnectivity-connector-seatcupra
Install using pipx (alternative)
pipx is a tool to help you install and run end-user applications written in Python. pipx creates an isolated environment for each application and its associated packages.
pipx install carconnectivity-plugin-mqtt
Important
When using pipx, connectors and plugins need to be explicitly installed in the carconnectivity-mqtt environment. Otherwise the connectors or plugins will not be found due to the isolation. You can do that with e.g.:
pipx inject carconnectivity-plugin-mqtt carconnectivity-connector-volkswagen
Create config file
Create a carconnectivity.json config file like this (Example if you have a Volkswagen and a MySkoda account). A documentation of all possible config options can be found here.
{
"carConnectivity": {
"log_level": "error", // set the global log level, you can set individual log levels in the connectors and plugins
"connectors": [
{
"type": "skoda", // Definition for a MySkoda account
"config": {
"interval": 600, // Interval in which the server is checked in seconds
"username": "test@test.de", // Username of your MySkoda Account
"password": "testpassword123" // Password of your MySkoda Account
}
},
{
"type": "volkswagen", // Definition for a Volkswagen account
"config": {
"interval": 300, // Interval in which the server is checked in seconds
"username": "test@test.de", // Username of your Volkswagen Account
"password": "testpassword123" // Username of your Volkswagen Account
}
}
],
"plugins": [
{
"type": "mqtt", // Definition for the MQTT Connection
"config": {
"broker": "192.168.0.123", // Broker hostname or IP address
"username": "testuser", // Broker username to login
"password": "testuser" // Broker password to login
}
}
]
}
}
Startup
When using docker-compose configure CarConnectivity-MQTT like that:
carconnectivity-mqtt carconnectivity.json
If you face challenges the WebUI can help you find the problems: CarConnectivity-plugin-webui. Install it with:
pip3 install carconnectivity-plugin-webui
and add a plugin of "type": "webui" to your configuration.
Updates
If you want to update, the easiest way is:
pip3 install carconnectivity-plugin-mqtt --upgrade
pip3 install carconnectivity-connector-volkswagen --upgrade
pip3 install carconnectivity-connector-skoda --upgrade
pip3 install carconnectivity-connector-seatcupra --upgrade
If you want to try pre-releases (e.g. alpha releases) you can do so by
pip3 install --pre carconnectivity-connector-volkswagen
or with an exact version like
pip3 install carconnectivity-connector-volkswagen==0.9.2a1
With Docker
There is also a Docker image to easily host CarConnectivity-MQTT: See on Dockerhub
Other
Home Assistant
The easiest way to work with home assistant is to use the prepackaged carconnectivity-addon.
Manual install with Home Assistant
To make Auto Discovery and further features available in Home Assistant also install CarConnectivity-plugin-mqtt_homeassistant
pip3 install carconnectivity-plugin-mqtt_homeassistant
and add it to your config:
{
"type": "mqtt", // Definition for the MQTT Connection
"config": {
"broker": "192.168.0.123", // Broker hostname or IP address
"username": "testuser", // Broker username to login
"password": "testuser" // Broker password to login
}
},
{
"type": "mqtt_homeassistant", // Definition for the MQTT Home Assistant Compatibility
"config": {}
}
Times
By default the times coming from the car are UTC isoformat. You can convert times to your local timezone by adding convert-times to your config. Convert times will use the timezone specified in TZ variable.
You can format times in your local format by adding timeformat to your config. This will use the default Date/Time format of your locale setting (LC_ALL variable). If you want to set a specific format add e.g. timeformat '%a %d %b %Y %T' to your config.
...
carconnectivity-mqtt:
image: "tillsteinbach/carconnectivity-mqtt:edge"
environment:
- TZ=Europe/Berlin
- LANG=de_DE
- LC_ALL=de_DE
...
Using Miles or Farenheit
CarConnectivity will guess your desired temperature or range/speed unit based on the systems locale. If it does not match what you want, you can set a different locale in your carconnectivity.json json config.
Credentials
If you do not want to provide your username or password inside the configuration you have to create a ".netrc" file at the appropriate location (usually this is your home folder):
# For MQTT broker
machine mymqttbroker
login test@test.de
password testpassword123
In this case the configuration needs to look like this:
{
"carConnectivity": {
"connectors": [
...
]
"plugins": [
{
"type": "mqtt",
"config": {
"broker": "mymqttbroker"
}
}
]
}
}
You can also provide the location of the netrc file in the configuration.
{
"carConnectivity": {
"connectors": [
...
]
"plugins": [
{
"type": "mqtt",
"config": {
"broker": "mymqttbroker"
"netrc": "/some/path/on/your/filesystem"
}
}
]
}
}
Known Issues
Some MQTT Brokers cannot deal with large messages or have a standard limit configured that is too small to receive very large messages such as vehicle images. There are some solutions to this problem:
- Configure a larger maximum message size in the broker to fix the main problem
- If not possible to increase message size, check whether you can switch to MQTT v5. In this protocol version the broker can signal its maximum message size to the client
- If this is not possible you can also run CarConnectivity without support for images.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carconnectivity_plugin_mqtt-0.10.4.tar.gz.
File metadata
- Download URL: carconnectivity_plugin_mqtt-0.10.4.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97ceab16b108c6d669d2efae84ba3ad29db8c84c22535946ea9489e0ca2dcc2e
|
|
| MD5 |
80249d21cf494d5b53e58bbe71885527
|
|
| BLAKE2b-256 |
d272158c76d2afdd8bf172e6a10338214390a345b32d333d49277b2aa8b51b1a
|
Provenance
The following attestation bundles were made for carconnectivity_plugin_mqtt-0.10.4.tar.gz:
Publisher:
build_and_publish.yml on tillsteinbach/CarConnectivity-plugin-mqtt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carconnectivity_plugin_mqtt-0.10.4.tar.gz -
Subject digest:
97ceab16b108c6d669d2efae84ba3ad29db8c84c22535946ea9489e0ca2dcc2e - Sigstore transparency entry: 1628812421
- Sigstore integration time:
-
Permalink:
tillsteinbach/CarConnectivity-plugin-mqtt@a52eae86ed49da3265e961155e231ceb7d987b43 -
Branch / Tag:
refs/tags/v0.10.4 - Owner: https://github.com/tillsteinbach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@a52eae86ed49da3265e961155e231ceb7d987b43 -
Trigger Event:
push
-
Statement type:
File details
Details for the file carconnectivity_plugin_mqtt-0.10.4-py3-none-any.whl.
File metadata
- Download URL: carconnectivity_plugin_mqtt-0.10.4-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d59f8e49a39394d520026d17bfe3cf1b51315bc4c5d64aa89b673038d1718919
|
|
| MD5 |
2477aa340a311026bdc0857986ef07dd
|
|
| BLAKE2b-256 |
874fab93bb23fc95dace820b3bb2a8c494127bc387aa85051129360a63928199
|
Provenance
The following attestation bundles were made for carconnectivity_plugin_mqtt-0.10.4-py3-none-any.whl:
Publisher:
build_and_publish.yml on tillsteinbach/CarConnectivity-plugin-mqtt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carconnectivity_plugin_mqtt-0.10.4-py3-none-any.whl -
Subject digest:
d59f8e49a39394d520026d17bfe3cf1b51315bc4c5d64aa89b673038d1718919 - Sigstore transparency entry: 1628812433
- Sigstore integration time:
-
Permalink:
tillsteinbach/CarConnectivity-plugin-mqtt@a52eae86ed49da3265e961155e231ceb7d987b43 -
Branch / Tag:
refs/tags/v0.10.4 - Owner: https://github.com/tillsteinbach
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yml@a52eae86ed49da3265e961155e231ceb7d987b43 -
Trigger Event:
push
-
Statement type: