Skip to main content

CarConnectivity connector for Audi services - integrates with Till Steinbach's CarConnectivity framework

Project description

CarConnectivity Connector for Audi

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.

About CarConnectivity

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.

Features

  • 🚗 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

Installation

Install the connector using pip:

pip install carconnectivity-connector-audi

You'll also need the CarConnectivity CLI:

pip install carconnectivity-cli

For more information about the CarConnectivity framework, visit:

Configuration

Quick Start with Template

  1. 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
    
  2. 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"
                }
            }
        ]
    }
}

Usage

List all available resources

carconnectivity-cli audi_config.json list

Get vehicle state

carconnectivity-cli audi_config.json get /garage/YOUR_VIN/state

Get battery/fuel level

carconnectivity-cli audi_config.json get /garage/YOUR_VIN/drives/primary/level

Get vehicle position

carconnectivity-cli audi_config.json get /garage/YOUR_VIN/position/latitude
carconnectivity-cli audi_config.json get /garage/YOUR_VIN/position/longitude

Control charging (for electric vehicles)

carconnectivity-cli audi_config.json set /garage/YOUR_VIN/charging/commands/start-stop start

Control climatization

carconnectivity-cli audi_config.json set /garage/YOUR_VIN/climatization/commands/start-stop start

Lock/unlock doors

carconnectivity-cli audi_config.json set /garage/YOUR_VIN/doors/commands/lock-unlock lock

Running with Docker

You 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.

Docker Compose Setup

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-stopped

Configuration for Docker

Create 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"
                }
            }
        ]
    }
}

Running the Container

docker-compose up -d

For detailed Docker configuration options, refer to the CarConnectivity-MQTT Docker documentation.

Development

Building from source

  1. Clone the repository:
git clone https://github.com/acfischer42/CarConnectivity-connector-audi.git
cd CarConnectivity-connector-audi
  1. Create a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install build
  1. Build the package:
python -m build
  1. Install locally:
pip install dist/carconnectivity_connector_audi-*.whl

Requirements

Related Projects

This connector is part of the CarConnectivity ecosystem:

Supported Vehicles

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

Security

  • Credentials are securely handled through OAuth2 authentication
  • Tokens are cached locally and refreshed automatically
  • No credentials are stored in plain text after initial setup

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

  • Till Steinbach for creating the CarConnectivity framework
  • Based on authentication patterns from the broader CarConnectivity ecosystem

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

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.

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_connector_audi-0.2.3.tar.gz (80.6 kB view details)

Uploaded Source

Built Distribution

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

carconnectivity_connector_audi-0.2.3-py3-none-any.whl (63.2 kB view details)

Uploaded Python 3

File details

Details for the file carconnectivity_connector_audi-0.2.3.tar.gz.

File metadata

File hashes

Hashes for carconnectivity_connector_audi-0.2.3.tar.gz
Algorithm Hash digest
SHA256 375cfb257024b3560ee6d24441815b71a00051f1874ecaea6f2c22df14011367
MD5 165bbacde36dddd3c461d10ea6d653ff
BLAKE2b-256 0e1f4c6bb568704627487f2bfa6319ff94debbb98ae0d715f5511fff34abe665

See more details on using hashes here.

Provenance

The following attestation bundles were made for carconnectivity_connector_audi-0.2.3.tar.gz:

Publisher: publish.yml on acfischer42/CarConnectivity-connector-audi

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_connector_audi-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for carconnectivity_connector_audi-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a79be2869bd29dce0c379b9a19a827671d486823dba19612f4ab03c2be13f85b
MD5 9e827517e57c21b1843d7ad1d2309def
BLAKE2b-256 4cd33675c2202d544263276417917fb84fa898cd79500a843232a130bdfb9283

See more details on using hashes here.

Provenance

The following attestation bundles were made for carconnectivity_connector_audi-0.2.3-py3-none-any.whl:

Publisher: publish.yml on acfischer42/CarConnectivity-connector-audi

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