From 52cc6d7b01fd70963b399373f85afe4e6626999c Mon Sep 17 00:00:00 2001 From: core-hacked Date: Wed, 31 May 2023 21:52:29 +0200 Subject: [PATCH] Move doc changes to separate PR | REL:#724 --- docs/SUMMARY.md | 4 +- docs/vehicle/state/README.md | 32 ++- docs/vehicle/state/chargestate.md | 131 ++++++------ docs/vehicle/state/climatestate.md | 92 ++++---- docs/vehicle/state/closuresstate.md | 31 +++ docs/vehicle/state/data.md | 2 +- docs/vehicle/state/drivestate.md | 49 +++-- docs/vehicle/state/guisettings.md | 39 ++-- docs/vehicle/state/locationstate.md | 31 +++ docs/vehicle/state/vehicleconfig.md | 73 ++++--- docs/vehicle/state/vehicledatacombo.md | 285 +++++++++++++++++++++++++ docs/vehicle/state/vehiclestate.md | 130 ++++++----- 12 files changed, 677 insertions(+), 222 deletions(-) create mode 100644 docs/vehicle/state/closuresstate.md create mode 100644 docs/vehicle/state/locationstate.md create mode 100644 docs/vehicle/state/vehicledatacombo.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index fc9f3da..d5308c7 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -16,11 +16,13 @@ - [Data](vehicle/state/data.md) - [Charge State](vehicle/state/chargestate.md) - [Climate State](vehicle/state/climatestate.md) + - [Closures State](vehicle/state/closuresstate.md) - [Drive State](vehicle/state/drivestate.md) - [GUI Settings](vehicle/state/guisettings.md) + - [Location State](vehicle/state/locationstate.md) - [Vehicle State](vehicle/state/vehiclestate.md) - [Vehicle Config](vehicle/state/vehicleconfig.md) - - [Mobile Enabled](vehicle/state/mobileenabled.md) + - [Vehicle Data Combo](vehicle/state/vehicledatacombo.md) - [Nearby Charging Sites](vehicle/state/nearbychargingsites.md) - [Miscellaneous](vehicle/state/misc.md) - [Commands](vehicle/commands/README.md) diff --git a/docs/vehicle/state/README.md b/docs/vehicle/state/README.md index e9c05ab..f01a70b 100644 --- a/docs/vehicle/state/README.md +++ b/docs/vehicle/state/README.md @@ -2,15 +2,24 @@ description: These endpoints give the state of the various subsystems of the car. --- -# State +# Vehicle State -{% page-ref page="data.md" %} +## A rollup of the `vehicle_data` data endpoint and its sub-categories. + +Following the depraction of all `data_request` endpoints in favor of the `vehicle_data` endpoint, the app has been observed to use the `vehicle_data` endpoint in combination with the `endpoints` parameter to request the same data, which the old `data_request` sub-category endpoints would have returned. + +To request the same chunks of data as you would with the old `data_request` endpoints, use the `vehicle_data` endpoint with the `endpoints` parameter like below: + +``` +GET /api/1/vehicles/{id}/vehicle_data?endpoints={endpoints} +``` -{% hint style='warning' %} -All `data_request` endpoints have been deprecated in favor of the `vehicle_data` endpoint. All of the data they return is found in the response of `vehicle_data` within sub-categories and the documentation of these/what the different fields mean, still applies. -{% endhint %} +You can also specify multiple endpoints by separating them with semi-colons. -A rollup of all the `data_request` endpoints plus vehicle configuration. +The responses and documentation for each of these parameters are found in the following pages below: + +{% page-ref page="data.md" %} +The base endpoint with all data. {% page-ref page="chargestate.md" %} @@ -20,6 +29,9 @@ Information on the state of charge in the battery and its various settings. Information on the current internal temperature and climate control system. +{% page-ref page="closuresstate.md" %} +Currently unknown. + {% page-ref page="drivestate.md" %} Returns the driving and position state of the vehicle. @@ -28,6 +40,9 @@ Returns the driving and position state of the vehicle. Returns various information about the GUI settings of the car, such as unit format and range display. +{% page-ref page="locationstate.md" %} +Currently unknown. + {% page-ref page="vehiclestate.md" %} Returns the vehicle's physical state, such as which doors are open. @@ -36,9 +51,10 @@ Returns the vehicle's physical state, such as which doors are open. Returns the vehicle's configuration information including model, color, badging and wheels. -{% page-ref page="mobileenabled.md" %} +{% page-ref page="vehicledatacombo.md" %} +Returns a combination of the above endpoints and a `vehicle_data` field which contains what appears to be base64 encoded data. -Lets you know if the Mobile Access setting is enabled in the car. +## Other data/state endpoints {% page-ref page="nearbychargingsites.md" %} diff --git a/docs/vehicle/state/chargestate.md b/docs/vehicle/state/chargestate.md index 8f61c38..04ad772 100644 --- a/docs/vehicle/state/chargestate.md +++ b/docs/vehicle/state/chargestate.md @@ -1,10 +1,6 @@ # Charge State -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/charge_state` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=charge_state` Information on the state of charge in the battery and its various settings. @@ -13,61 +9,76 @@ Information on the state of charge in the battery and its various settings. ```json { "response": { - "battery_heater_on": false, - "battery_level": 90, - "battery_range": 224.47, - "charge_amps": 12, - "charge_current_request": 40, - "charge_current_request_max": 40, - "charge_enable_request": true, - "charge_energy_added": 29.41, - "charge_limit_soc": 90, - "charge_limit_soc_max": 100, - "charge_limit_soc_min": 50, - "charge_limit_soc_std": 90, - "charge_miles_added_ideal": 118.5, - "charge_miles_added_rated": 95.0, - "charge_port_cold_weather_mode": null, - "charge_port_color": "", - "charge_port_door_open": true, - "charge_port_latch": "Engaged", - "charge_rate": 0.0, - "charge_to_max_range": false, - "charger_actual_current": 0, - "charger_phases": null, - "charger_pilot_current": 40, - "charger_power": 0, - "charger_voltage": 0, - "charging_state": "Complete", - "conn_charge_cable": "SAE", - "est_battery_range": 171.24, - "fast_charger_brand": "", - "fast_charger_present": false, - "fast_charger_type": "", - "ideal_battery_range": 280.59, - "managed_charging_active": false, - "managed_charging_start_time": null, - "managed_charging_user_canceled": false, - "max_range_charge_counter": 0, - "minutes_to_full_charge": 0, - "not_enough_power_to_heat": false, - "off_peak_charging_enabled": false, - "off_peak_charging_times": "all_week", - "off_peak_hours_end_time": 360, - "preconditioning_enabled": false, - "preconditioning_times": "all_week", - "scheduled_charging_mode": "Off", - "scheduled_charging_pending": false, - "scheduled_charging_start_time": null, - "scheduled_charging_start_time_app": 665, - "scheduled_departure_time": 1652090400, - "scheduled_departure_time_minutes": 720, - "supercharger_session_trip_planner": false, - "time_to_full_charge": 0.0, - "timestamp": 1604977209418, - "trip_charging": false, - "usable_battery_level": 90, - "user_charge_enable_request": null + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "charge_state": { + "battery_heater_on": false, + "battery_level": 44, + "battery_range": 141.56, + "charge_amps": 24, + "charge_current_request": 24, + "charge_current_request_max": 24, + "charge_enable_request": true, + "charge_energy_added": 35.49, + "charge_limit_soc": 100, + "charge_limit_soc_max": 100, + "charge_limit_soc_min": 50, + "charge_limit_soc_std": 90, + "charge_miles_added_ideal": 102.0, + "charge_miles_added_rated": 127.5, + "charge_port_cold_weather_mode": null, + "charge_port_color": "Off", + "charge_port_door_open": false, + "charge_port_latch": "Blocking", + "charge_rate": 0.0, + "charger_actual_current": 0, + "charger_phases": null, + "charger_pilot_current": 24, + "charger_power": 0, + "charger_voltage": 0, + "charging_state": "Disconnected", + "conn_charge_cable": "", + "est_battery_range": 69.59, + "fast_charger_brand": "", + "fast_charger_present": false, + "fast_charger_type": "", + "ideal_battery_range": 113.38, + "max_range_charge_counter": 1, + "minutes_to_full_charge": 0, + "not_enough_power_to_heat": false, + "off_peak_charging_enabled": false, + "off_peak_charging_times": "all_week", + "off_peak_hours_end_time": 360, + "preconditioning_enabled": false, + "preconditioning_times": "weekdays", + "scheduled_charging_mode": "Off", + "scheduled_charging_pending": false, + "scheduled_charging_start_time": null, + "scheduled_charging_start_time_app": 0, + "scheduled_departure_time": 1671166800, + "scheduled_departure_time_minutes": 360, + "supercharger_session_trip_planner": false, + "time_to_full_charge": 0.0, + "timestamp": 1685477952460, + "trip_charging": false, + "usable_battery_level": 44, + "user_charge_enable_request": null + } } } ``` diff --git a/docs/vehicle/state/climatestate.md b/docs/vehicle/state/climatestate.md index 72a0044..5b452df 100644 --- a/docs/vehicle/state/climatestate.md +++ b/docs/vehicle/state/climatestate.md @@ -1,10 +1,6 @@ # Climate State -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/climate_state` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=climate_state` Information on the current internal temperature and climate control system. @@ -13,38 +9,60 @@ Information on the current internal temperature and climate control system. ```json { "response": { - "allow_cabin_overheat_protection": true, - "auto_seat_climate_left": true, - "auto_seat_climate_right": false, - "battery_heater": false, - "battery_heater_no_power": false, - "cabin_overheat_protection": "FanOnly", - "cabin_overheat_protection_actively_cooling": false, - "climate_keeper_mode": "off", - "cop_activation_temperature": "High", - "defrost_mode": 0, - "driver_temp_setting": 22.8, - "fan_status": 0, - "hvac_auto_request": "On", - "inside_temp": 27.0, - "is_auto_conditioning_on": false, - "is_climate_on": false, - "is_front_defroster_on": false, - "is_preconditioning": false, - "is_rear_defroster_on": false, - "left_temp_direction": -232, - "max_avail_temp": 28.0, - "min_avail_temp": 15.0, - "outside_temp": 23.0, - "passenger_temp_setting": 22.8, - "remote_heater_control_enabled": false, - "right_temp_direction": -232, - "seat_heater_left": 0, - "seat_heater_right": 0, - "side_mirror_heaters": false, - "supports_fan_only_cabin_overheat_protection": true, - "timestamp": 1604977244530, - "wiper_blade_heater": false + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "climate_state": { + "allow_cabin_overheat_protection": false, + "battery_heater": false, + "battery_heater_no_power": false, + "bioweapon_mode": false, + "cabin_overheat_protection": "Off", + "climate_keeper_mode": "off", + "cop_activation_temperature": "High", + "defrost_mode": 0, + "driver_temp_setting": 15.0, + "fan_status": 0, + "hvac_auto_request": "Override", + "inside_temp": 22.0, + "is_auto_conditioning_on": false, + "is_climate_on": false, + "is_front_defroster_on": false, + "is_preconditioning": false, + "is_rear_defroster_on": false, + "left_temp_direction": -160, + "max_avail_temp": 28.0, + "min_avail_temp": 15.0, + "outside_temp": 18.5, + "passenger_temp_setting": 15.0, + "remote_heater_control_enabled": false, + "right_temp_direction": -160, + "seat_heater_left": 0, + "seat_heater_rear_left": 0, + "seat_heater_rear_right": 0, + "seat_heater_right": 0, + "seat_heater_third_row_left": 0, + "seat_heater_third_row_right": 0, + "side_mirror_heaters": false, + "steering_wheel_heater": false, + "supports_fan_only_cabin_overheat_protection": false, + "timestamp": 1685478078500, + "wiper_blade_heater": false + } } } ``` diff --git a/docs/vehicle/state/closuresstate.md b/docs/vehicle/state/closuresstate.md new file mode 100644 index 0000000..58c1720 --- /dev/null +++ b/docs/vehicle/state/closuresstate.md @@ -0,0 +1,31 @@ +# Closures State + +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=closures_state` + +Currently unknown, as it only returns the 'top level' data. + +### Response + +```json +{ + "response": { + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false + } +} +``` diff --git a/docs/vehicle/state/data.md b/docs/vehicle/state/data.md index a539535..cd86b8a 100644 --- a/docs/vehicle/state/data.md +++ b/docs/vehicle/state/data.md @@ -2,7 +2,7 @@ ## GET `/api/1/vehicles/{id}/vehicle_data` -A rollup of all the `data_request` endpoints plus vehicle configuration. +The base endpoint which returns all vehicle data. _Note:_ all `*_range` values are in miles, irrespective of GUI configuration. diff --git a/docs/vehicle/state/drivestate.md b/docs/vehicle/state/drivestate.md index 6f7819e..4083947 100644 --- a/docs/vehicle/state/drivestate.md +++ b/docs/vehicle/state/drivestate.md @@ -1,10 +1,6 @@ # Drive State -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/drive_state` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=drive_state` Returns the driving and position state of the vehicle. @@ -13,18 +9,37 @@ Returns the driving and position state of the vehicle. ```json { "response": { - "gps_as_of": 1543187664, - "heading": 8, - "latitude": 33.111111, - "longitude": -88.111111, - "native_latitude": 33.111111, - "native_location_supported": 1, - "native_longitude": -88.111111, - "native_type": "wgs", - "power": 0, - "shift_state": null, - "speed": null, - "timestamp": 1543187666472 + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "drive_state": { + "gps_as_of": 1543187664, + "heading": 8, + "latitude": 33.111111, + "longitude": -88.111111, + "native_latitude": 33.111111, + "native_location_supported": 1, + "native_longitude": -88.111111, + "native_type": "wgs", + "power": 0, + "shift_state": null, + "speed": null, + "timestamp": 1543187666472 + } } } ``` diff --git a/docs/vehicle/state/guisettings.md b/docs/vehicle/state/guisettings.md index 3dfb61d..5df8532 100644 --- a/docs/vehicle/state/guisettings.md +++ b/docs/vehicle/state/guisettings.md @@ -1,10 +1,6 @@ # GUI Settings -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/gui_settings` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=gui_settings` Returns various information about the GUI settings of the car, such as unit format and range display. @@ -13,13 +9,32 @@ Returns various information about the GUI settings of the car, such as unit form ```json { "response": { - "gui_24_hour_time": false, - "gui_charge_rate_units": "mi/hr", - "gui_distance_units": "mi/hr", - "gui_range_display": "Rated", - "gui_temperature_units": "F", - "show_range_units": true, - "timestamp": 1543187561462 + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "gui_settings": { + "gui_24_hour_time": false, + "gui_charge_rate_units": "mi/hr", + "gui_distance_units": "mi/hr", + "gui_range_display": "Rated", + "gui_temperature_units": "F", + "show_range_units": true, + "timestamp": 1543187561462 + } } } ``` diff --git a/docs/vehicle/state/locationstate.md b/docs/vehicle/state/locationstate.md new file mode 100644 index 0000000..7088d04 --- /dev/null +++ b/docs/vehicle/state/locationstate.md @@ -0,0 +1,31 @@ +# Location State + +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=location_state` + +Currently unknown, as it only returns the 'top level' data. This might change once the car is in motion. + +### Response + +```json +{ + "response": { + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false + } +} +``` diff --git a/docs/vehicle/state/vehicleconfig.md b/docs/vehicle/state/vehicleconfig.md index 0e17a1b..c44c29f 100644 --- a/docs/vehicle/state/vehicleconfig.md +++ b/docs/vehicle/state/vehicleconfig.md @@ -1,10 +1,6 @@ # Vehicle Config -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/vehicle_config` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=vehicle_config` Returns the vehicle's configuration information including model, color, badging and wheels. @@ -13,30 +9,49 @@ Returns the vehicle's configuration information including model, color, badging ```json { "response": { - "can_accept_navigation_requests": true, - "can_actuate_trunks": true, - "car_special_type": "base", - "car_type": "models2", - "charge_port_type": "US", - "ece_restrictions": false, - "eu_vehicle": false, - "exterior_color": "White", - "has_air_suspension": true, - "has_ludicrous_mode": false, - "motorized_charge_port": true, - "plg": true, - "rear_seat_heaters": 0, - "rear_seat_type": 0, - "rhd": false, - "roof_color": "None", - "seat_type": 2, - "spoiler_type": "None", - "sun_roof_installed": 2, - "third_row_seats": "None", - "timestamp": 1604977445448, - "trim_badging": "p90d", - "use_range_badging": false, - "wheel_type": "AeroTurbine19" + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "vehicle_config": { + "can_accept_navigation_requests": true, + "can_actuate_trunks": true, + "car_special_type": "base", + "car_type": "models2", + "charge_port_type": "US", + "ece_restrictions": false, + "eu_vehicle": false, + "exterior_color": "White", + "has_air_suspension": true, + "has_ludicrous_mode": false, + "motorized_charge_port": true, + "plg": true, + "rear_seat_heaters": 0, + "rear_seat_type": 0, + "rhd": false, + "roof_color": "None", + "seat_type": 2, + "spoiler_type": "None", + "sun_roof_installed": 2, + "third_row_seats": "None", + "timestamp": 1604977445448, + "trim_badging": "p90d", + "use_range_badging": false, + "wheel_type": "AeroTurbine19" + } } } ``` diff --git a/docs/vehicle/state/vehicledatacombo.md b/docs/vehicle/state/vehicledatacombo.md new file mode 100644 index 0000000..c3f645b --- /dev/null +++ b/docs/vehicle/state/vehicledatacombo.md @@ -0,0 +1,285 @@ +# Vehicle Data Combo + +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=vehicle_data_combo` + +Returns all data which the base endpoint returns, plus a `vehicle_data` field which contains what appears to be base64 encoded data. + +### Response + +```json +{ + "response": { + "id": 1234567890123456, + "user_id": 123456, + "vehicle_id": 1234567890, + "vin": "5YJ...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123456", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "charge_state": { + "battery_heater_on": false, + "battery_level": 44, + "battery_range": 141.56, + "charge_amps": 24, + "charge_current_request": 24, + "charge_current_request_max": 24, + "charge_enable_request": true, + "charge_energy_added": 35.49, + "charge_limit_soc": 100, + "charge_limit_soc_max": 100, + "charge_limit_soc_min": 50, + "charge_limit_soc_std": 90, + "charge_miles_added_ideal": 102.0, + "charge_miles_added_rated": 127.5, + "charge_port_cold_weather_mode": null, + "charge_port_color": "Off", + "charge_port_door_open": false, + "charge_port_latch": "Blocking", + "charge_rate": 0.0, + "charger_actual_current": 0, + "charger_phases": null, + "charger_pilot_current": 24, + "charger_power": 0, + "charger_voltage": 0, + "charging_state": "Disconnected", + "conn_charge_cable": "", + "est_battery_range": 69.59, + "fast_charger_brand": "", + "fast_charger_present": false, + "fast_charger_type": "", + "ideal_battery_range": 113.38, + "max_range_charge_counter": 1, + "minutes_to_full_charge": 0, + "not_enough_power_to_heat": false, + "off_peak_charging_enabled": false, + "off_peak_charging_times": "all_week", + "off_peak_hours_end_time": 360, + "preconditioning_enabled": false, + "preconditioning_times": "weekdays", + "scheduled_charging_mode": "Off", + "scheduled_charging_pending": false, + "scheduled_charging_start_time": null, + "scheduled_charging_start_time_app": 0, + "scheduled_departure_time": 1671166800, + "scheduled_departure_time_minutes": 360, + "supercharger_session_trip_planner": false, + "time_to_full_charge": 0.0, + "timestamp": 1685478699520, + "trip_charging": false, + "usable_battery_level": 44, + "user_charge_enable_request": null + }, + "climate_state": { + "allow_cabin_overheat_protection": false, + "battery_heater": false, + "battery_heater_no_power": false, + "bioweapon_mode": false, + "cabin_overheat_protection": "Off", + "climate_keeper_mode": "off", + "cop_activation_temperature": "High", + "defrost_mode": 0, + "driver_temp_setting": 15.0, + "fan_status": 0, + "hvac_auto_request": "Override", + "inside_temp": 21.7, + "is_auto_conditioning_on": false, + "is_climate_on": false, + "is_front_defroster_on": false, + "is_preconditioning": false, + "is_rear_defroster_on": false, + "left_temp_direction": -160, + "max_avail_temp": 28.0, + "min_avail_temp": 15.0, + "outside_temp": 18.0, + "passenger_temp_setting": 15.0, + "remote_heater_control_enabled": false, + "right_temp_direction": -160, + "seat_heater_left": 0, + "seat_heater_rear_left": 0, + "seat_heater_rear_right": 0, + "seat_heater_right": 0, + "seat_heater_third_row_left": 0, + "seat_heater_third_row_right": 0, + "side_mirror_heaters": false, + "steering_wheel_heater": false, + "supports_fan_only_cabin_overheat_protection": false, + "timestamp": 1685478699520, + "wiper_blade_heater": false + }, + "drive_state": { + "active_route_latitude": 0.0, + "active_route_longitude": 0.0, + "active_route_traffic_minutes_delay": 0.0, + "gps_as_of": 0, + "heading": 1, + "latitude": 0.0, + "longitude": 0.0, + "native_latitude": 0.0, + "native_location_supported": 1, + "native_longitude": 0.0, + "native_type": "wgs", + "power": 0, + "shift_state": null, + "speed": null, + "timestamp": 1685478699520 + }, + "gui_settings": { + "gui_24_hour_time": true, + "gui_charge_rate_units": "km/hr", + "gui_distance_units": "km/hr", + "gui_range_display": "Rated", + "gui_temperature_units": "C", + "gui_tirepressure_units": "Bar", + "show_range_units": true, + "timestamp": 1685478699520 + }, + "vehicle_config": { + "can_accept_navigation_requests": true, + "can_actuate_trunks": true, + "car_special_type": "base", + "car_type": "modelx", + "charge_port_type": "EU", + "cop_user_set_temp_supported": false, + "dashcam_clip_save_supported": true, + "default_charge_to_max": false, + "driver_assist": "ParkerPascal2_5", + "ece_restrictions": true, + "efficiency_package": "Default", + "eu_vehicle": true, + "exterior_color": "MetallicBlack", + "exterior_trim_override": "Black", + "front_drive_unit": "NoneOrSmall", + "has_air_suspension": true, + "has_ludicrous_mode": false, + "has_seat_cooling": false, + "headlamp_type": "Led", + "interior_trim_type": "AllBlack", + "motorized_charge_port": true, + "paint_color_override": "44,200,38,0.9,0.3", + "plg": true, + "pws": false, + "rear_drive_unit": "Small", + "rear_seat_heaters": 3, + "rear_seat_type": 3, + "rhd": false, + "roof_color": "None", + "seat_type": 0, + "spoiler_type": "Passive", + "sun_roof_installed": 0, + "supports_qr_pairing": false, + "third_row_seats": "FuturisFoldFlat", + "timestamp": 1685478699520, + "trim_badging": "100d", + "use_range_badging": false, + "utc_offset": 7200, + "webcam_selfie_supported": false, + "webcam_supported": false, + "wheel_type": "AeroTurbine20" + }, + "vehicle_data": "BASE64_ENCODED_STRING", + "vehicle_state": { + "allow_authorized_mobile_devices_only": false, + "api_version": 57, + "autopark_state_v2": "ready", + "autopark_style": "dead_man", + "calendar_supported": true, + "car_version": "2023.12.5 163bca1e2c5e", + "center_display_state": 0, + "dashcam_clip_save_available": false, + "dashcam_state": "Unavailable", + "df": 0, + "dr": 0, + "fd_window": 0, + "feature_bitmask": "39dffbff,1", + "fp_window": 0, + "ft": 0, + "homelink_device_count": 1, + "homelink_nearby": false, + "is_user_present": false, + "last_autopark_error": "no_error", + "locked": true, + "media_info": { + "audio_volume": 2.6667, + "audio_volume_increment": 0.333333, + "audio_volume_max": 10.333333, + "media_playback_status": "Stopped", + "now_playing_album": "", + "now_playing_artist": "", + "now_playing_duration": 0, + "now_playing_elapsed": 0, + "now_playing_source": "12", + "now_playing_station": "", + "now_playing_title": "" + }, + "media_state": { + "remote_control_enabled": true + }, + "notifications_supported": true, + "odometer": 62316.217202, + "parsed_calendar_supported": true, + "pf": 0, + "pr": 0, + "rd_window": 0, + "remote_start": false, + "remote_start_enabled": true, + "remote_start_supported": true, + "rp_window": 0, + "rt": 0, + "santa_mode": 0, + "sentry_mode": true, + "sentry_mode_available": true, + "service_mode": false, + "service_mode_plus": false, + "smart_summon_available": true, + "software_update": { + "download_perc": 0, + "expected_duration_sec": 2700, + "install_perc": 1, + "status": "downloading_wifi_wait", + "version": "2023.12.9" + }, + "speed_limit_mode": { + "active": false, + "current_limit_mph": 90.0, + "max_limit_mph": 120, + "min_limit_mph": 50.0, + "pin_code_set": true + }, + "summon_standby_mode_enabled": false, + "timestamp": 1685478699520, + "tpms_hard_warning_fl": false, + "tpms_hard_warning_fr": false, + "tpms_hard_warning_rl": false, + "tpms_hard_warning_rr": false, + "tpms_last_seen_pressure_time_fl": 1685367787, + "tpms_last_seen_pressure_time_fr": 1685367787, + "tpms_last_seen_pressure_time_rl": 1685367787, + "tpms_last_seen_pressure_time_rr": 1685367787, + "tpms_pressure_fl": 3.4, + "tpms_pressure_fr": 3.25, + "tpms_pressure_rl": 3.0, + "tpms_pressure_rr": 3.05, + "tpms_rcp_front_value": 2.9, + "tpms_rcp_rear_value": 2.9, + "tpms_soft_warning_fl": false, + "tpms_soft_warning_fr": false, + "tpms_soft_warning_rl": false, + "tpms_soft_warning_rr": false, + "valet_mode": false, + "valet_pin_needed": false, + "vehicle_name": "Nikola", + "webcam_available": false + } + } +} +``` diff --git a/docs/vehicle/state/vehiclestate.md b/docs/vehicle/state/vehiclestate.md index 0f89c36..7d1a1e0 100644 --- a/docs/vehicle/state/vehiclestate.md +++ b/docs/vehicle/state/vehiclestate.md @@ -1,10 +1,6 @@ # Vehicle State -{% hint style='warning' %} -This endpoint was deprecated and returns 404. -{% endhint %} - -## GET `/api/1/vehicles/{id}/data_request/vehicle_state` +## GET `/api/1/vehicles/{id}/vehicle_data?endpoints=vehicle_state` Returns the vehicle's physical state, such as which doors are open. @@ -40,58 +36,78 @@ Here are the descriptions for the shorthand fields: ```json { "response": { - "api_version": 10, - "autopark_state_v2": "standby", - "autopark_style": "standard", - "calendar_supported": true, - "car_version": "2020.36.16 3e9e4e8dd287", - "center_display_state": 0, - "df": 0, - "dr": 0, - "ft": 0, - "homelink_device_count": 2, - "homelink_nearby": true, - "is_user_present": false, - "last_autopark_error": "no_error", - "locked": false, - "media_state": { "remote_control_enabled": true }, - "notifications_supported": true, - "odometer": 57509.856033, - "parsed_calendar_supported": true, - "pf": 0, - "pr": 0, - "remote_start": false, - "remote_start_enabled": true, - "remote_start_supported": true, - "rt": 0, - "sentry_mode": false, - "sentry_mode_available": true, - "smart_summon_available": true, - "software_update": { - "download_perc": 0, - "expected_duration_sec": 2700, - "install_perc": 1, - "status": "", - "version": "" - }, - "speed_limit_mode": { - "active": false, - "current_limit_mph": 50.0, - "max_limit_mph": 90, - "min_limit_mph": 50, - "pin_code_set": true - }, - "summon_standby_mode_enabled": false, - "sun_roof_percent_open": 0, - "sun_roof_state": "closed", - "timestamp": 1604977470379, - "tpms_pressure_fl": 0.0, - "tpms_pressure_fr": 0.0, - "tpms_pressure_rl": 0.0, - "tpms_pressure_rr": 0.0, - "valet_mode": false, - "valet_pin_needed": true, - "vehicle_name": "Nikola 2.0" + "id": 1234567890123, + "user_id": 1234, + "vehicle_id": 1234567890123, + "vin": "7SA...", + "display_name": "Nikola", + "option_codes": null, + "color": null, + "access_type": "OWNER", + "tokens": ["abc123", "abc123"], + "state": "online", + "in_service": false, + "id_s": "1234567890123", + "calendar_enabled": true, + "api_version": 57, + "backseat_token": null, + "backseat_token_updated_at": null, + "ble_autopair_enrolled": false, + "vehicle_state": { + "api_version": 10, + "autopark_state_v2": "standby", + "autopark_style": "standard", + "calendar_supported": true, + "car_version": "2020.36.16 3e9e4e8dd287", + "center_display_state": 0, + "df": 0, + "dr": 0, + "ft": 0, + "homelink_device_count": 2, + "homelink_nearby": true, + "is_user_present": false, + "last_autopark_error": "no_error", + "locked": false, + "media_state": { "remote_control_enabled": true }, + "notifications_supported": true, + "odometer": 57509.856033, + "parsed_calendar_supported": true, + "pf": 0, + "pr": 0, + "remote_start": false, + "remote_start_enabled": true, + "remote_start_supported": true, + "rt": 0, + "sentry_mode": false, + "sentry_mode_available": true, + "smart_summon_available": true, + "software_update": { + "download_perc": 0, + "expected_duration_sec": 2700, + "install_perc": 1, + "status": "", + "version": "" + }, + "speed_limit_mode": { + "active": false, + "current_limit_mph": 50.0, + "max_limit_mph": 90, + "min_limit_mph": 50, + "pin_code_set": true + }, + "summon_standby_mode_enabled": false, + "sun_roof_percent_open": 0, + "sun_roof_state": "closed", + "timestamp": 1604977470379, + "tpms_pressure_fl": 0.0, + "tpms_pressure_fr": 0.0, + "tpms_pressure_rl": 0.0, + "tpms_pressure_rr": 0.0, + "valet_mode": false, + "valet_pin_needed": true, + "vehicle_name": "Nikola", + "webcam_available": true + } } } ```