Getting Started¶
This guide will walk you through setting up the AutoPi Home Assistant integration from start to finish.
Prerequisites¶
Before you begin, ensure you have:
AutoPi Requirements¶
- AutoPi Account: Active account at app.autopi.io
- AutoPi Device: At least one AutoPi device installed in your vehicle
- API Token: AutoPi API token with vehicle access permissions
Home Assistant Requirements¶
- Home Assistant: Version 2023.1.0 or later
- Administrator Access: Ability to install custom integrations
- Internet Connection: For communication with AutoPi cloud services
Step 1: Obtain AutoPi API Token¶
Method 1: AutoPi Dashboard (Recommended)¶
- Log in to app.autopi.io
- Navigate to Account Settings → API Tokens
- Click Generate New Token
- Give your token a descriptive name (e.g., "Home Assistant")
- Select appropriate permissions (minimum: vehicle read access)
- Copy and save the token securely
Method 2: API Documentation¶
- Visit the AutoPi API documentation
- Follow the authentication guide
- Generate a token programmatically if needed
Token Security
Your API token provides access to your vehicle data. Store it securely and never share it publicly.
Step 2: Install the Integration¶
Choose your preferred installation method:
Option A: HACS Installation (Recommended)¶
- Install HACS (if not already installed):
- Visit HACS installation guide
-
Follow the installation instructions
-
Add Custom Repository:
-
Install Integration:
- Search for "AutoPi" in HACS
- Click Install
- Restart Home Assistant
Option B: Manual Installation¶
- Download Latest Release:
- Go to GitHub Releases
-
Download
autopi.zip
from the latest release -
Extract Files:
-
Restart Home Assistant:
- Restart your Home Assistant instance
- The integration will be available after restart
Step 3: Add Integration¶
- Navigate to Integrations:
- Go to Settings → Devices & Services
-
Click + Add Integration
-
Search for AutoPi:
- Type "AutoPi" in the search box
-
Select AutoPi from the results
-
Configure Connection:
- API Token: Enter your AutoPi API token
- Base URL (optional): Use default unless you have a custom endpoint
-
Click Submit
-
Select Vehicles:
- The integration will discover your vehicles
- Select which vehicles you want to monitor
- Click Submit
Step 4: Configure Options (Optional)¶
After adding the integration, you can configure update intervals:
- Access Integration Options:
- Go to Settings → Devices & Services
- Find AutoPi integration
-
Click Configure
-
Set Update Interval:
-
Update Interval (1-10 min): All vehicle data including position, status, and metrics, default 1 minute
-
Save Configuration:
- Click Submit
- Integration will reload with new settings
Step 5: Verify Installation¶
After setup, you should see:
New Devices¶
- One device per monitored vehicle
- Named with vehicle's call name or license plate
- Located under Settings → Devices & Services → AutoPi
New Entities¶
For each vehicle: - Device Tracker: device_tracker.{vehicle_name}
- Status Sensor: sensor.{vehicle_name}_status
- Position Sensors: Speed, altitude, course, GPS satellites - Diagnostic Sensors: Latitude, longitude
Integration-wide: - Vehicle Count: sensor.autopi_vehicle_count
- API Statistics: API calls, failures, success rate - Performance: Update duration
Dashboard Cards¶
The entities will automatically appear in: - Map card: Vehicle locations - Entity cards: Vehicle status and metrics - History graphs: Sensor data over time
Troubleshooting¶
Common Issues¶
"Invalid API Token"¶
- Verify your token is correct and hasn't expired
- Check token permissions include vehicle access
- Regenerate token if necessary
"No Vehicles Found"¶
- Ensure your AutoPi devices are online
- Check vehicle registration in AutoPi dashboard
- Verify API token has access to vehicles
"Connection Failed"¶
- Check internet connectivity
- Verify AutoPi service status
- Try again after a few minutes
"Integration Won't Load"¶
- Restart Home Assistant completely
- Check logs for detailed error messages
- Verify installation files are correct
Getting Help¶
If you encounter issues:
-
Check Logs:
-
Search Issues: Check GitHub Issues
-
Report Bugs: Create a new issue with:
- Home Assistant version
- Integration version
- Relevant log entries
- Steps to reproduce
Next Steps¶
Once installation is complete:
- Configuration Guide: Detailed configuration options
- Entity Reference: Complete list of available entities
- API Optimization: Optimize API usage and performance
- Vehicle Data: Understanding vehicle data and attributes
Security Best Practices¶
API Token Management¶
- Store tokens securely
- Rotate tokens periodically
- Use minimal required permissions
- Monitor token usage in AutoPi dashboard
Network Security¶
- Use HTTPS for Home Assistant (recommended)
- Consider VPN for remote access
- Monitor integration logs for unusual activity
Data Privacy¶
- Vehicle location data is sensitive
- Review Home Assistant data retention policies
- Consider excluding location entities from recorder if desired