Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate getting full, selective and location data for vehicles #153

Merged
merged 5 commits into from
Jan 27, 2024

Commits on Dec 18, 2023

  1. Separate getting full, basic and location data

    Addresses changes in how vehicle location data is provided after late
    2023 vehicle software updates. Retains get_vehicle_data() as the method
    to get all vehicle data to prevent breaking changes.
    
    Updates version to 2.10.0 as it the initial fix for the location changes
    didn't increment to 2.9.0
    
    Adds two additional endpoints to teslapy/endpoints.json:
    VEHICLE_BASIC_DATA: gets only basic vehicle data.
    
    VEHICLE_LOCATION_DATA: basic vehicle_state and location_data.
    
    Updates VEHICLE_DATA to get all endpoints.
    
    Adds two methods to the Vehicle Class to use the new endpoints:
    get_vehicle_basic_data(): Get only basic vehicle data.
    get_vehicle_location_data(): Get basic vehicle data, and location data.
    
    Adds two new flags to CLI:
    -B --basic: Get only basic vehicle data
    -G --location: Get current location (GPS) data
    
    Updates readme.
    robharman committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    de240d2 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    47fc482 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2023

  1. Revert endpoints, update __init__, set v=2.9.0

    Implements feedback in original pull request:
    tdorssers#153 (comment)
    
    Reverts endpoints.json to previous version for Android consistency:
    remove VEHICLE_BASIC_DATA
    remove VEHICLE_LOCATION_DATA
    
    Update __init__ to include endpoints in Vehicle Class methods
    -  get_vehicle_data(): all endpoints - location_data, charge_state;
        climate_state, vehicle_state, gui_settings, vehicle_config.
    -  get_vehicle_basic_data(): no extra endpints.
    -  get_vehicle_location_data(): only location_data and basic data.
    
    Set version number to 2.9.0.
    robharman committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    8ee7fe3 View commit details
    Browse the repository at this point in the history
  2. Get recent location data, cleanup endpoint requests

    Updates Vehicle Class:
    Removes get_vehicle_basic_data()
    Updates get_vehicle_data() to allow selection of individual endpoints,
        defaults to all endpoints.
    Updates get_vehicle_location_data():
        - Adds optional location data max_age in seconds. Defaults to 300
          (five minutes).
        - Updates and cleans up logic to prevent issues with missing data if
        it ages out in persistent connections.
        - Fix recursion error when vehicle was online but doesn't come back
          online for subsequent requests.
    
    Minor fixes:
        - Swaps most string formatting with fStrings, not panel ones since I
          can't test panel changes without a panel, and not the conversion
          ones since fStrings are less readable there.
        - Reflows lines over 80 chars, with same panel exception, most
          significantly in Vechicle.decode_vin()
        - Minor linting/spacing changes
    robharman committed Dec 22, 2023
    Configuration menu
    Copy the full SHA
    0325e58 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2023

  1. Configuration menu
    Copy the full SHA
    34e7461 View commit details
    Browse the repository at this point in the history