homebridge-vw-id-connect
v1.7.0
Published
Homebridge plugin for VW WeConnect ID vehicles
Maintainers
Readme
homebridge-vw-id-connect
Homebridge plugin for controlling VW WeConnect ID vehicles through HomeKit using Smartcar API.
This plugin allows you to control your Volkswagen ID vehicle's charging, battery status, and door locks through Apple HomeKit via Smartcar's unified vehicle API.
Features
- Charging Control: Start/stop charging via HomeKit switch
- Battery Monitoring: View battery level and charging status (standalone battery accessory)
- Target SOC Setting: Set target battery charge level (50-100%)
- Climatisation Control: Start/stop and set temperature for pre-conditioning
- Door Lock/Unlock: Control vehicle door locks via HomeKit
- Charge Complete Notification: Motion sensor triggers when target charge is reached
- Real-time Updates: Automatic status updates from your vehicle
Installation
Via Homebridge UI
- Open Homebridge UI
- Go to Plugins
- Search for "homebridge-vw-id-connect"
- Click Install
Via Terminal
npm install -g homebridge-vw-id-connectSetup
1. Create Smartcar Application
- Go to Smartcar Dashboard
- Sign up or log in
- Create a new application
- Note your Client ID and Client Secret
- Set the Redirect URI:
- Same machine:
http://localhost:8000/callback - Different machine:
http://YOUR_HOMEBRIDGE_IP:8000/callback(e.g.,http://192.168.0.253:8000/callback) - This must match exactly in your Smartcar dashboard and config.json
- Same machine:
2. Configure Plugin
Add the following to your Homebridge config.json:
{
"platforms": [
{
"platform": "VWConnectID",
"name": "VWConnectID",
"clientId": "your-smartcar-client-id",
"clientSecret": "your-smartcar-client-secret",
"redirectUri": "http://localhost:8000/callback",
"logLevel": "INFO",
"updateInterval": 60
}
]
}3. Authenticate
- Restart Homebridge
- Check the Homebridge logs - you'll see an authorization URL
- Open that URL in your browser
- Authorize the application with your VW account
- You'll be redirected and the authorization code will be captured automatically
- The plugin will display your access token and refresh token in the logs
- Add these tokens to your config.json:
{ "platforms": [ { "platform": "VWConnectID", "name": "VWConnectID", "clientId": "your-smartcar-client-id", "clientSecret": "your-smartcar-client-secret", "redirectUri": "http://localhost:8000/callback", "accessToken": "your-access-token-from-logs", "refreshToken": "your-refresh-token-from-logs", "logLevel": "INFO", "updateInterval": 60 } ] } - Restart Homebridge again
Configuration Options
platform(required): Must be "VWConnectID"name(required): Platform nameclientId(required): Your Smartcar Client ID from dashboardclientSecret(required): Your Smartcar Client Secret from dashboardredirectUri(required): OAuth redirect URI. Usehttp://YOUR_HOMEBRIDGE_IP:8000/callback(replace with your Homebridge server IP, e.g.,http://192.168.0.253:8000/callback)accessToken(optional): Access token (obtained during OAuth flow)refreshToken(optional): Refresh token (obtained during OAuth flow)vehicleId(optional): Smartcar Vehicle ID. If not provided, the first vehicle will be usedlogLevel(optional): Logging level - "ERROR", "WARN", "INFO", or "DEBUG" (default: "INFO")updateInterval(optional): Update interval in seconds (default: 60)
HomeKit Accessories
The plugin creates the following accessories:
Charging Accessory
- Switch: Control charging start/stop
- Battery Service: Shows current battery level and charging status
- Lightbulb:
- Brightness = Target SOC (50-100%)
- On/Off = Charging status
- Adjust brightness to set target charge level
Battery Accessory (Standalone)
- Battery Service: Dedicated battery accessory for easy monitoring
- Shows current battery level (0-100%)
- Displays charging status
- Low battery warning when below 20%
Door Lock Accessory
- Lock Mechanism: Control vehicle door locks
- Lock/Unlock doors via HomeKit
- Shows current lock status
Climatisation Accessory
- Switch: Control climatisation on/off
- Thermostat: Set and monitor target temperature
Charge Complete Sensor
- Motion Sensor: Triggers when target charge level is reached
Usage
Setting Target Charge Level
- Open Home app
- Find the "Battery Level" lightbulb accessory
- Adjust brightness to set target SOC (50-100%)
- The vehicle will charge to this level
Starting/Stopping Charge
Use the "Charging" switch to start or stop charging.
Climatisation
- Use the "Climatisation" switch to turn on/off
- Use the "Temperature" thermostat to set desired temperature
Door Lock/Unlock
Use the "Door Lock" accessory to lock or unlock your vehicle doors. The lock status is automatically updated in real-time.
Battery Level
The battery level is displayed in two places:
- Charging Accessory: Battery service within the charging accessory
- Battery Accessory: Standalone battery accessory for easy monitoring in HomeKit
Troubleshooting
Plugin Not Working
- Check your email and password are correct
- Verify your VIN is correct (if specified)
- Check Homebridge logs for errors
- Ensure your vehicle is connected to VW WeConnect services
Authentication Issues
If you encounter authentication errors:
- VW may require re-authentication periodically
- Try restarting Homebridge
- Check if VW has updated their authentication system
No Accessories Appearing
- Check Homebridge logs for initialization errors
- Verify your credentials are correct
- Ensure at least one vehicle is registered in your VW account
- Wait a few minutes for initial data fetch
Development
To build from source:
npm install
npm run buildTo link for development:
npm linkPublishing Updates
For detailed instructions on building and publishing updates to npm, see PUBLISH.md.
Quick reference:
npm version minor # Bump version
npm run build # Build TypeScript
npm publish # Publish to npmLicense
MIT
Credits
- Based on npm-vwconnectidapi
- Inspired by homebridge-vwconnectid
