Skip to content

Vehicle Data

This guide explains the vehicle data provided by the AutoPi integration and how to interpret sensor readings.

Vehicle Information

Each monitored vehicle provides comprehensive information stored as device and entity attributes.

Basic Vehicle Attributes

AttributeDescriptionExampleNotes
vehicle_idUnique AutoPi vehicle identifierabc123Internal ID, not user-friendly
nameVehicle display nameMy TeslaUser-defined in AutoPi dashboard
license_plateVehicle registration numberABC-123May be empty if not configured
vinVehicle Identification Number1HGBH41...17-character VIN
yearManufacturing year2022Integer value
typeVehicle type classificationICE, EV, HYBRIDAutoPi classification
make_idManufacturer identifierteslaAutoPi internal make ID
model_idModel identifiermodel_3AutoPi internal model ID
battery_voltageNominal battery voltage12Vehicle electrical system voltage

Extended Attributes

Additional attributes may be available depending on your vehicle and AutoPi device configuration:

AttributeDescriptionAvailability
makeManufacturer nameCommon
modelVehicle model nameCommon
trimSpecific trim/versionLimited
engine_sizeEngine displacementICE vehicles
fuel_typePrimary fuel typeMost vehicles
transmissionTransmission typeLimited

Position Data

Real-time position and movement data from GPS and vehicle sensors.

GPS Location

FieldDescriptionUnitAccuracy
latitudeGPS latitude coordinateDecimal degrees±3-5 meters
longitudeGPS longitude coordinateDecimal degrees±3-5 meters
altitudeHeight above sea levelMeters±10-20 meters
location_accuracyGPS accuracy estimateMetersVariable

Movement Data

FieldDescriptionUnitNotes
speedCurrent vehicle speedm/sConverted by HA to preferred unit
courseDirection of travelDegrees (0-360)0° = North, 90° = East
num_satellitesGPS satellites in viewCountMore = better accuracy

Position Timestamps

All position data includes timestamp information: - UTC Time: All timestamps in UTC - Precision: Usually sub-second accuracy - Age: How old the position data is

Data Interpretation

Understanding GPS Accuracy

GPS accuracy depends on several factors:

Excellent Accuracy (1-3 meters)

  • Clear sky view
  • 8+ satellites
  • No interference
  • Stationary or slow-moving

Good Accuracy (3-10 meters)

  • Partial sky view
  • 5-7 satellites
  • Light interference
  • Normal driving conditions

Poor Accuracy (10+ meters)

  • Obstructed view (tunnels, parking garages)
  • Few satellites (<5)
  • Heavy interference
  • Urban canyon effects

Speed Interpretation

Speed data comes from GPS calculations:

  • At Rest: Speed may show small values (0.1-0.5 m/s) due to GPS noise
  • Low Speed: More accurate for speeds >5 km/h
  • High Speed: Generally very accurate for highway speeds
  • Unit Conversion: Home Assistant converts to your preferred units

Course/Direction

Direction interpretation: - : True North - 90°: East - 180°: South - 270°: West - Accuracy: Most accurate when moving >10 km/h

Data Availability

When Data is Available

Position data is available when: - Vehicle is powered on (ignition or auxiliary power) - AutoPi device has cellular connectivity - GPS has sufficient satellite lock - API endpoints are accessible

Data Gaps

Common reasons for missing data: - Vehicle Off: Engine off and no auxiliary power - No Connectivity: Cellular signal issues - GPS Blocked: Underground parking, dense urban areas - Device Issues: AutoPi device malfunction - API Issues: Temporary service problems

Historical Data

The integration provides real-time data. For historical analysis: - Use Home Assistant's built-in recorder - Configure appropriate retention periods - Consider database size for high-frequency updates

Sensor State Classes

Understanding Home Assistant sensor classifications:

Measurement Sensors

  • Current Values: Speed, altitude, course
  • Updates: Real-time measurements
  • History: Shows trends over time
  • Statistics: Supports min/max/average

Total Increasing Counters

  • API Calls: Cumulative count of API requests
  • Persistence: Survives restarts
  • Reset: Only reset on integration reload

Diagnostic Entities

  • Purpose: Technical monitoring
  • Visibility: Hidden by default in some views
  • Importance: Critical for troubleshooting

Entity Availability

Entities become unavailable when:

Connection Issues

  • No internet connectivity
  • AutoPi API unavailable
  • Authentication failures

Data Issues

  • Vehicle hasn't reported recent data
  • GPS lock lost for extended period
  • Device connectivity problems

Integration Issues

  • Configuration errors
  • Coordinator update failures
  • Rate limit exceeded

Troubleshooting Data Issues

Missing Position Data

  1. Check Vehicle Status:
  2. Is the vehicle powered on?
  3. Is the AutoPi device LED showing connectivity?

  4. Verify GPS:

  5. Move vehicle to open area
  6. Wait for GPS lock (can take 2-5 minutes)

  7. Check AutoPi Dashboard:

  8. Log in to app.autopi.io
  9. Verify device is online
  10. Check recent positions

Inaccurate Data

  1. GPS Accuracy:
  2. Check num_satellites sensor
  3. Verify location_accuracy attribute
  4. Consider environmental factors

  5. Timing Issues:

  6. Check timestamp of last update
  7. Verify integration update intervals
  8. Look for pattern in data gaps

Entity Unavailable

  1. Integration Health:
  2. Check API success rate sensor
  3. Review failed API calls count
  4. Monitor update duration

  5. Configuration:

  6. Verify API token is valid
  7. Check vehicle is still selected
  8. Confirm network connectivity

Data Usage and Privacy

API Usage

Monitor your API usage: - Use diagnostic sensors to track calls - Optimize update intervals for your needs - Consider AutoPi plan limitations

Privacy Considerations

Vehicle location data is sensitive: - Encryption: Data encrypted in Home Assistant - Access Control: Limit who can view vehicle entities - Retention: Configure recorder settings appropriately - External Access: Secure remote access to Home Assistant

Data Retention

Configure Home Assistant recorder:

# configuration.yaml
recorder:
  purge_keep_days: 30  # Adjust as needed
  exclude:
    entities:
      # Optionally exclude high-frequency sensors
      - sensor.my_car_latitude
      - sensor.my_car_longitude

Advanced Data Usage

Automations

Use vehicle data in automations:

Arrival Detection

trigger:
  - platform: zone
    entity_id: device_tracker.my_car
    zone: zone.home
    event: enter

Speed Monitoring

trigger:
  - platform: numeric_state
    entity_id: sensor.my_car_speed
    above: 100  # km/h

Low GPS Quality Alert

trigger:
  - platform: numeric_state
    entity_id: sensor.my_car_gps_satellites
    below: 4

Templates

Create custom sensors:

Distance from Home

sensor:
  - platform: template
    sensors:
      car_distance_home:
        friendly_name: "Car Distance from Home"
        unit_of_measurement: "km"
        value_template: >
          {{ distance(states.device_tracker.my_car.attributes.latitude,
                      states.device_tracker.my_car.attributes.longitude,
                      states.zone.home.attributes.latitude,
                      states.zone.home.attributes.longitude) }}

Speed in MPH

sensor:
  - platform: template
    sensors:
      car_speed_mph:
        friendly_name: "Car Speed (MPH)"
        unit_of_measurement: "mph"
        value_template: >
          {{ (states('sensor.my_car_speed') | float * 2.237) | round(1) }}

Future Data Features

Planned enhancements for vehicle data:

OBD-II Data

  • Engine diagnostics
  • Fuel consumption
  • RPM and engine load
  • Diagnostic trouble codes

Trip Information

  • Trip start/end detection
  • Distance and duration
  • Average speed
  • Fuel efficiency

Advanced Analytics

  • Driving behavior analysis
  • Maintenance predictions
  • Performance trends
  • Cost tracking