A Python connector for Audi vehicles that integrates with the CarConnectivity framework by Till Steinbach, allowing you to interact with your Audi vehicle's data and controls through a standardized API.
This connector is built for the CarConnectivity framework, which provides a unified interface for connecting to various car manufacturers' APIs. CarConnectivity is developed and maintained by Till Steinbach.
- π Vehicle Status: Access battery/fuel levels, range, odometer readings
- π Remote Control: Lock/unlock doors, start/stop charging and climatization
- π Location Services: Get vehicle position and parking information
- π§ Maintenance: Check inspection and service due dates
- π‘οΈ Climate Control: Remote climate control and window heating
- π‘ Vehicle Lights: Monitor and control vehicle lighting
- β‘ Charging: Monitor and control electric vehicle charging
Install the connector using pip:
pip install carconnectivity-connector-audiYou'll also need the CarConnectivity CLI:
pip install carconnectivity-cliFor more information about the CarConnectivity framework, visit:
- Main Repository: CarConnectivity
- CLI Repository: CarConnectivity-CLI
- Documentation: See the CarConnectivity Wiki
-
Copy the provided template and customize it with your credentials:
cp audi_config_template.json audi_config.json # Edit audi_config.json with your actual Audi credentials -
Or create a configuration file manually (e.g.,
audi_config.json) with your Audi credentials:
{
"carConnectivity": {
"connectors": [
{
"type": "audi",
"config": {
"username": "your.email@example.com",
"password": "your_password"
}
}
]
}
}carconnectivity-cli audi_config.json listcarconnectivity-cli audi_config.json get /garage/YOUR_VIN/statecarconnectivity-cli audi_config.json get /garage/YOUR_VIN/drives/primary/levelcarconnectivity-cli audi_config.json get /garage/YOUR_VIN/position/latitude
carconnectivity-cli audi_config.json get /garage/YOUR_VIN/position/longitudecarconnectivity-cli audi_config.json set /garage/YOUR_VIN/charging/commands/start-stop startcarconnectivity-cli audi_config.json set /garage/YOUR_VIN/climatization/commands/start-stop startcarconnectivity-cli audi_config.json set /garage/YOUR_VIN/doors/commands/lock-unlock lockYou can run the Audi connector using Docker with the CarConnectivity-MQTT image made by Till. This allows you to publish vehicle data to an MQTT broker for integration with home automation systems.
Create a docker-compose.yml file:
services:
carconnectivity-mqtt:
image: "tillsteinbach/carconnectivity-mqtt:latest"
environment:
- ADDITIONAL_INSTALLS=carconnectivity-connector-audi
- TZ=Europe/Berlin # Set your timezone
volumes:
- ./carconnectivity.json:/carconnectivity.json
restart: unless-stoppedCreate a carconnectivity.json configuration file:
{
"carConnectivity": {
"log_level": "info",
"connectors": [
{
"type": "audi",
"config": {
"interval": 600,
"username": "your.email@example.com",
"password": "your_password"
}
}
],
"plugins": [
{
"type": "mqtt",
"config": {
"broker": "192.168.1.100",
"port": 1883,
"username": "mqtt_user",
"password": "mqtt_password"
}
}
]
}
}docker-compose up -dFor detailed Docker configuration options, refer to the CarConnectivity-MQTT Docker documentation.
- Clone the repository:
git clone https://github.com/acfischer42/CarConnectivity-connector-audi.git
cd CarConnectivity-connector-audi- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install build- Build the package:
python -m build- Install locally:
pip install dist/carconnectivity_connector_audi-*.whl- Python 3.9 or higher
- CarConnectivity framework >= 0.8
- Valid myAudi account with connected vehicle
This connector is part of the CarConnectivity ecosystem:
- CarConnectivity - The main framework by Till Steinbach
- CarConnectivity-CLI - Command-line interface
- WeConnect-python - Volkswagen connector
- VWConnect - Alternative VW solution
This connector works with Audi vehicles that support myAudi connected services, including:
- Electric vehicles (e-tron models)
- Hybrid vehicles
- Modern ICE vehicles with connectivity features
- Credentials are securely handled through OAuth2 authentication
- Tokens are cached locally and refreshed automatically
- No credentials are stored in plain text after initial setup
Contributions are welcome! Please feel free to submit a Pull Request.
- Till Steinbach for creating the CarConnectivity framework
- Based on authentication patterns from the broader CarConnectivity ecosystem
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial connector not affiliated with Audi AG or Till Steinbach's original CarConnectivity project. Use at your own risk and ensure you comply with your vehicle's terms of service.