A powerful command-line interface for interacting with Audi Connect services, allowing you to monitor and control your Audi vehicle remotely.
- 🚗 Vehicle Status Monitoring - Check battery level, mileage, lock status, location, and more
- 🔐 Remote Control - Lock/unlock doors, start/stop climate control, control auxiliary heating
- 🔋 Electric Vehicle Support - Full support for e-tron models with charging control
- 🌍 Multi-Region Support - Works with Audi Connect services in DE, US, CA, and CN regions
- 🛡️ Secure Authentication - OAuth2-based authentication with automatic token refresh
- 📊 JSON Output - Machine-readable JSON output for integration with other tools
- 🔄 Throttling Protection - Built-in protection against API rate limiting
- Python 3.8 or higher
- An active Audi Connect account
- Vehicle with Audi Connect services enabled
git clone https://github.com/ashleigh-hopkins/audi-connect-dev.git
cd audi-connect-devpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtThe audi_connect_ha library is a Home Assistant custom component, not a pip package. Clone it into the project directory:
git clone https://github.com/audiconnect/audi_connect_ha.gitCreate a config.json file based on the provided example:
cp config_example.json config.jsonEdit config.json with your credentials:
{
"username": "your.email@example.com",
"password": "your_password",
"country": "DE",
"spin": "1234",
"api_level": 0,
"vehicles": [
{
"vin": "WAUZZZ...",
"name": "My Audi",
"model": "Audi e-tron",
"model_year": "2024",
"csid": "optional_csid",
"notes": "Main family vehicle"
}
]
}Configuration parameters:
username: Your Audi Connect account emailpassword: Your Audi Connect account passwordcountry: Your country code (DE, US, CA, or CN)spin: Your 4-digit S-PIN for security operationsapi_level: API level (0 for gas vehicles, 1 for e-tron/electric)vehicles: Optional array of vehicle configurations
Alternatively, you can provide credentials via command line:
python audi_cli.py -u your.email@example.com -p your_password -c DE --spin 1234python audi_cli.py list-vehiclespython audi_cli.py status YOUR_VINpython audi_cli.py lock YOUR_VIN
python audi_cli.py unlock YOUR_VIN# Start climate control with default temperature (21°C)
python audi_cli.py climate-start YOUR_VIN
# Start with specific temperature and options
python audi_cli.py climate-start YOUR_VIN --temp 22 --glass-heating
# Start with seat heating
python audi_cli.py climate-start YOUR_VIN --seat-fl --seat-fr
# Stop climate control
python audi_cli.py climate-stop YOUR_VIN# Start pre-heater for 30 minutes (default)
python audi_cli.py preheater-start YOUR_VIN
# Start pre-heater for specific duration
python audi_cli.py preheater-start YOUR_VIN --duration 45
# Stop pre-heater
python audi_cli.py preheater-stop YOUR_VINpython audi_cli.py window-heating-start YOUR_VIN
python audi_cli.py window-heating-stop YOUR_VIN# Start manual charging
python audi_cli.py charge-start YOUR_VIN
# Start timer-based charging
python audi_cli.py charge-start YOUR_VIN --timer
# Set target charge level (20-100%)
python audi_cli.py set-charge-target YOUR_VIN 80# Request fresh data from the vehicle
python audi_cli.py refresh-data YOUR_VIN# View trip statistics and consumption data
python audi_cli.py trip-data YOUR_VINpython audi_cli.py --debug status YOUR_VIN# Show raw API data alongside formatted output
python audi_cli.py status YOUR_VIN --raw# Get pure JSON output for scripts/automation
python audi_cli.py status YOUR_VIN --json
# Works with list-vehicles too
python audi_cli.py list-vehicles --json
# Example: Parse with jq
python audi_cli.py status YOUR_VIN --json | jq '.battery_level'For more examples and advanced usage, check the command-line help:
python audi_cli.py --help- Never commit credentials: Always use
config.json(which is gitignored) or environment variables - S-PIN Security: Your S-PIN is required for security-critical operations like lock/unlock
- Token Storage: Authentication tokens are stored temporarily in memory only
- Rate Limiting: The CLI includes built-in throttling protection to prevent account suspension
-
Authentication failures
- Verify your credentials are correct
- Check if your account is active on myAudi website
- Ensure you're using the correct country code
-
Missing vehicle data
- Some features may not be available for all vehicles
- Check API level (0 for gas, 1 for electric vehicles)
- Ensure vehicle has active Audi Connect subscription
-
Rate limiting errors
- Wait at least 15 minutes between requests
- Use the built-in throttling protection
- Avoid excessive API calls
-
SSL/Certificate errors
- Update your Python certificates:
pip install --upgrade certifi - Check your system time is correct
- Update your Python certificates:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is provided as-is for educational and personal use. Use at your own risk.
This is an unofficial tool and is not affiliated with, endorsed by, or connected to Audi AG or Volkswagen Group. Use of this tool is at your own risk, and you are responsible for complying with any terms of service or usage agreements with Audi Connect services.
- Based on the audi_connect_ha Home Assistant integration
- Thanks to the Audi Connect community for reverse engineering efforts