Making more fields optional. Adding more test data in separate files
This commit is contained in:
parent
ac033ea1a5
commit
6577e4cc65
548
src/vehicles.rs
548
src/vehicles.rs
|
@ -78,20 +78,20 @@ pub struct ChargeState {
|
|||
pub charge_miles_added_rated: f64,
|
||||
pub charge_port_cold_weather_mode: Option<bool>,
|
||||
pub charge_port_color: String,
|
||||
pub charge_port_door_open: bool,
|
||||
pub charge_port_door_open: Option<bool>,
|
||||
pub charge_port_latch: String,
|
||||
pub charge_rate: f64,
|
||||
pub charge_to_max_range: Option<bool>,
|
||||
pub charger_actual_current: i64,
|
||||
pub charger_actual_current: Option<i64>,
|
||||
pub charger_phases: Option<i64>,
|
||||
pub charger_pilot_current: i64,
|
||||
pub charger_power: i64,
|
||||
pub charger_voltage: i64,
|
||||
pub charger_pilot_current: Option<i64>,
|
||||
pub charger_power: Option<i64>,
|
||||
pub charger_voltage: Option<i64>,
|
||||
pub charging_state: String,
|
||||
pub conn_charge_cable: String,
|
||||
pub est_battery_range: f64,
|
||||
pub fast_charger_brand: String,
|
||||
pub fast_charger_present: bool,
|
||||
pub fast_charger_present: Option<bool>,
|
||||
pub fast_charger_type: String,
|
||||
pub ideal_battery_range: f64,
|
||||
pub managed_charging_active: Option<bool>,
|
||||
|
@ -115,7 +115,7 @@ pub struct ChargeState {
|
|||
pub supercharger_session_trip_planner: bool,
|
||||
pub time_to_full_charge: f64,
|
||||
pub timestamp: u64,
|
||||
pub trip_charging: bool,
|
||||
pub trip_charging: Option<bool>,
|
||||
pub usable_battery_level: i64,
|
||||
pub user_charge_enable_request: Option<bool>,
|
||||
}
|
||||
|
@ -135,25 +135,25 @@ pub struct ClimateState {
|
|||
pub fan_status: i64,
|
||||
pub hvac_auto_request: String,
|
||||
pub inside_temp: f64,
|
||||
pub is_auto_conditioning_on: bool,
|
||||
pub is_auto_conditioning_on: Option<bool>,
|
||||
pub is_climate_on: bool,
|
||||
pub is_front_defroster_on: bool,
|
||||
pub is_preconditioning: bool,
|
||||
pub is_rear_defroster_on: bool,
|
||||
pub left_temp_direction: i64,
|
||||
pub left_temp_direction: Option<i64>,
|
||||
pub max_avail_temp: f64,
|
||||
pub min_avail_temp: f64,
|
||||
pub outside_temp: f64,
|
||||
pub outside_temp: Option<f64>,
|
||||
pub passenger_temp_setting: f64,
|
||||
pub remote_heater_control_enabled: bool,
|
||||
pub right_temp_direction: i64,
|
||||
pub right_temp_direction: Option<i64>,
|
||||
pub seat_heater_left: i64,
|
||||
pub seat_heater_rear_center: i64,
|
||||
pub seat_heater_rear_left: i64,
|
||||
pub seat_heater_rear_right: i64,
|
||||
pub seat_heater_rear_center: Option<i64>,
|
||||
pub seat_heater_rear_left: Option<i64>,
|
||||
pub seat_heater_rear_right: Option<i64>,
|
||||
pub seat_heater_right: i64,
|
||||
pub side_mirror_heaters: bool,
|
||||
pub steering_wheel_heater: bool,
|
||||
pub steering_wheel_heater: Option<bool>,
|
||||
pub supports_fan_only_cabin_overheat_protection: bool,
|
||||
pub timestamp: i64,
|
||||
pub wiper_blade_heater: bool,
|
||||
|
@ -239,7 +239,7 @@ pub struct VehicleConfig {
|
|||
pub struct VehicleState {
|
||||
pub api_version: i64,
|
||||
pub autopark_state_v2: String,
|
||||
pub autopark_style: String,
|
||||
pub autopark_style: Option<String>,
|
||||
pub calendar_supported: bool,
|
||||
pub car_version: String,
|
||||
pub center_display_state: i64,
|
||||
|
@ -254,7 +254,7 @@ pub struct VehicleState {
|
|||
pub homelink_device_count: Option<i64>,
|
||||
pub homelink_nearby: Option<bool>,
|
||||
pub is_user_present: bool,
|
||||
pub last_autopark_error: String,
|
||||
pub last_autopark_error: Option<String>,
|
||||
pub locked: bool,
|
||||
pub media_state: MediaState,
|
||||
pub notifications_supported: bool,
|
||||
|
@ -273,10 +273,10 @@ pub struct VehicleState {
|
|||
pub sentry_mode_available: Option<bool>,
|
||||
pub service_mode: Option<bool>,
|
||||
pub service_mode_plus: Option<bool>,
|
||||
pub smart_summon_available: bool,
|
||||
pub smart_summon_available: Option<bool>,
|
||||
pub software_update: SoftwareUpdate,
|
||||
pub speed_limit_mode: SpeedLimitMode,
|
||||
pub summon_standby_mode_enabled: bool,
|
||||
pub summon_standby_mode_enabled: Option<bool>,
|
||||
pub sun_roof_percent_open: Option<i64>,
|
||||
pub sun_roof_state: Option<String>,
|
||||
pub timestamp: i64,
|
||||
|
@ -397,7 +397,7 @@ mod tests {
|
|||
use crate::RequestData;
|
||||
|
||||
#[test]
|
||||
fn json_charge_state_1() {
|
||||
fn json_charge_state() {
|
||||
let s = r#"
|
||||
{
|
||||
"response": {
|
||||
|
@ -467,76 +467,6 @@ mod tests {
|
|||
Api::parse_json::<ChargeState>(&request_data, s.to_string()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn json_charge_state_2() {
|
||||
let s = r#"
|
||||
{
|
||||
"response": {
|
||||
"battery_heater_on":false,
|
||||
"battery_level":80,
|
||||
"battery_range":218.21,
|
||||
"charge_amps":16,
|
||||
"charge_current_request":16,
|
||||
"charge_current_request_max":16,
|
||||
"charge_enable_request":false,
|
||||
"charge_energy_added":15.59,
|
||||
"charge_limit_soc":80,
|
||||
"charge_limit_soc_max":100,
|
||||
"charge_limit_soc_min":50,
|
||||
"charge_limit_soc_std":90,
|
||||
"charge_miles_added_ideal":48.5,
|
||||
"charge_miles_added_rated":60.5,
|
||||
"charge_port_cold_weather_mode":null,
|
||||
"charge_port_color":"Off",
|
||||
"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":16,
|
||||
"charger_power":0,
|
||||
"charger_voltage":0,
|
||||
"charging_state":"Complete",
|
||||
"conn_charge_cable":"IEC",
|
||||
"est_battery_range":177.86,
|
||||
"fast_charger_brand":"<invalid>",
|
||||
"fast_charger_present":false,
|
||||
"fast_charger_type":"<invalid>",
|
||||
"ideal_battery_range":174.57,
|
||||
"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":true,
|
||||
"off_peak_charging_times":"all_week",
|
||||
"off_peak_hours_end_time":360,
|
||||
"preconditioning_enabled":false,
|
||||
"preconditioning_times":"all_week",
|
||||
"scheduled_charging_mode":"DepartBy",
|
||||
"scheduled_charging_pending":false,
|
||||
"scheduled_charging_start_time":1695087005,
|
||||
"scheduled_charging_start_time_app":0,
|
||||
"scheduled_departure_time":1695186000,
|
||||
"scheduled_departure_time_minutes":420,
|
||||
"supercharger_session_trip_planner":false,
|
||||
"time_to_full_charge":0.0,
|
||||
"timestamp":1695129645307,
|
||||
"trip_charging":false,
|
||||
"usable_battery_level":80,
|
||||
"user_charge_enable_request":null
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
let request_data = RequestData::GET {
|
||||
url: "https://owner-api.teslamotors.com/api/1/vehicles/1234567890/data_request/charge_state",
|
||||
};
|
||||
Api::parse_json::<ChargeState>(&request_data, s.to_string()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn json_climate_state() {
|
||||
let s = r#"
|
||||
|
@ -638,41 +568,41 @@ mod tests {
|
|||
let s = r#"
|
||||
{
|
||||
"response": {
|
||||
"can_accept_navigation_requests":true,
|
||||
"can_actuate_trunks":true,
|
||||
"car_special_type":"base",
|
||||
"car_type":"models",
|
||||
"charge_port_type":"EU",
|
||||
"dashcam_clip_save_supported":false,
|
||||
"default_charge_to_max":false,
|
||||
"driver_assist":"MonoCam",
|
||||
"ece_restrictions":true,
|
||||
"efficiency_package":"Default",
|
||||
"eu_vehicle":true,
|
||||
"exterior_color":"MetallicBlack",
|
||||
"front_drive_unit":"NoneOrSmall",
|
||||
"has_air_suspension":true,
|
||||
"has_ludicrous_mode":false,
|
||||
"has_seat_cooling":false,
|
||||
"headlamp_type":"Hid",
|
||||
"interior_trim_type":"AllBlack",
|
||||
"motorized_charge_port":true,
|
||||
"plg":true,
|
||||
"pws":false,
|
||||
"rear_drive_unit":"Large",
|
||||
"rear_seat_heaters":1,
|
||||
"rear_seat_type":0,
|
||||
"rhd":false,
|
||||
"roof_color":"None",
|
||||
"seat_type":1,
|
||||
"spoiler_type":"Passive",
|
||||
"sun_roof_installed":1,
|
||||
"third_row_seats":"None",
|
||||
"timestamp":1695129645329,
|
||||
"trim_badging":"p85d",
|
||||
"use_range_badging":false,
|
||||
"utc_offset":7200,
|
||||
"wheel_type":"Charcoal21"
|
||||
"can_accept_navigation_requests": true,
|
||||
"can_actuate_trunks": true,
|
||||
"car_special_type": "base",
|
||||
"car_type": "models",
|
||||
"charge_port_type": "EU",
|
||||
"dashcam_clip_save_supported": false,
|
||||
"default_charge_to_max": false,
|
||||
"driver_assist": "MonoCam",
|
||||
"ece_restrictions": true,
|
||||
"efficiency_package": "Default",
|
||||
"eu_vehicle": true,
|
||||
"exterior_color": "MetallicBlack",
|
||||
"front_drive_unit": "NoneOrSmall",
|
||||
"has_air_suspension": true,
|
||||
"has_ludicrous_mode": false,
|
||||
"has_seat_cooling": false,
|
||||
"headlamp_type": "Hid",
|
||||
"interior_trim_type": "AllBlack",
|
||||
"motorized_charge_port": true,
|
||||
"plg": true,
|
||||
"pws": false,
|
||||
"rear_drive_unit": "Large",
|
||||
"rear_seat_heaters": 1,
|
||||
"rear_seat_type": 0,
|
||||
"rhd": false,
|
||||
"roof_color": "None",
|
||||
"seat_type": 1,
|
||||
"spoiler_type": "Passive",
|
||||
"sun_roof_installed": 1,
|
||||
"third_row_seats": "None",
|
||||
"timestamp": 1696881260450,
|
||||
"trim_badging": "p85d",
|
||||
"use_range_badging": false,
|
||||
"utc_offset": 7200,
|
||||
"wheel_type": "Charcoal21"
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
@ -688,64 +618,66 @@ mod tests {
|
|||
let s = r#"
|
||||
{
|
||||
"response": {
|
||||
"api_version":36,
|
||||
"autopark_state_v2":"standby",
|
||||
"autopark_style":"dead_man",
|
||||
"calendar_supported":true,
|
||||
"car_version":"2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state":0,
|
||||
"dashcam_clip_save_available":false,
|
||||
"dashcam_state":"<invalid>",
|
||||
"df":0,
|
||||
"dr":0,
|
||||
"fd_window":0,
|
||||
"feature_bitmask":"5,0",
|
||||
"fp_window":0,
|
||||
"ft":0,
|
||||
"homelink_device_count":0,
|
||||
"homelink_nearby":false,
|
||||
"is_user_present":false,
|
||||
"last_autopark_error":"no_error",
|
||||
"locked":true,
|
||||
"media_state":{"remote_control_enabled":true},
|
||||
"notifications_supported":true,
|
||||
"odometer":104374.713449,
|
||||
"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,
|
||||
"smart_summon_available":false,
|
||||
"software_update":{
|
||||
"download_perc":0,
|
||||
"expected_duration_sec":2700,
|
||||
"install_perc":1,
|
||||
"status":"",
|
||||
"version":"EU-2023.20-14615"
|
||||
"api_version": 36,
|
||||
"autopark_state_v2": "standby",
|
||||
"autopark_style": "dead_man",
|
||||
"calendar_supported": true,
|
||||
"car_version": "2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state": 0,
|
||||
"dashcam_clip_save_available": false,
|
||||
"dashcam_state": "<invalid>",
|
||||
"df": 0,
|
||||
"dr": 0,
|
||||
"fd_window": 0,
|
||||
"feature_bitmask": "5,0",
|
||||
"fp_window": 0,
|
||||
"ft": 0,
|
||||
"homelink_device_count": 0,
|
||||
"homelink_nearby": false,
|
||||
"is_user_present": false,
|
||||
"last_autopark_error": "no_error",
|
||||
"locked": true,
|
||||
"media_state": {
|
||||
"remote_control_enabled": true
|
||||
},
|
||||
"speed_limit_mode":{
|
||||
"active":false,
|
||||
"current_limit_mph":90.0,
|
||||
"max_limit_mph":90,
|
||||
"min_limit_mph":50.0,
|
||||
"pin_code_set":false
|
||||
"notifications_supported": true,
|
||||
"odometer": 104885.252853,
|
||||
"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,
|
||||
"smart_summon_available": false,
|
||||
"software_update": {
|
||||
"download_perc": 0,
|
||||
"expected_duration_sec": 2700,
|
||||
"install_perc": 1,
|
||||
"status": "",
|
||||
"version": "EU-2023.20-14615"
|
||||
},
|
||||
"summon_standby_mode_enabled":false,
|
||||
"sun_roof_percent_open":0,
|
||||
"sun_roof_state":"closed",
|
||||
"timestamp":1695129645306,
|
||||
"tpms_pressure_fl":null,
|
||||
"tpms_pressure_fr":null,
|
||||
"tpms_pressure_rl":null,
|
||||
"tpms_pressure_rr":null,
|
||||
"valet_mode":false,
|
||||
"valet_pin_needed":true,
|
||||
"vehicle_name":"HTLC"
|
||||
"speed_limit_mode": {
|
||||
"active": false,
|
||||
"current_limit_mph": 90,
|
||||
"max_limit_mph": 90,
|
||||
"min_limit_mph": 50,
|
||||
"pin_code_set": false
|
||||
},
|
||||
"summon_standby_mode_enabled": false,
|
||||
"sun_roof_percent_open": 0,
|
||||
"sun_roof_state": "closed",
|
||||
"timestamp": 1696881260448,
|
||||
"tpms_pressure_fl": null,
|
||||
"tpms_pressure_fr": null,
|
||||
"tpms_pressure_rl": null,
|
||||
"tpms_pressure_rr": null,
|
||||
"valet_mode": false,
|
||||
"valet_pin_needed": true,
|
||||
"vehicle_name": "HTLC"
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
@ -757,240 +689,28 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn json_vehicle_data() {
|
||||
let s = r#"
|
||||
{
|
||||
"response": {
|
||||
"id":1492931365719407,
|
||||
"user_id":219663,
|
||||
"vehicle_id":1328174702,
|
||||
"vin":"5YJSA7H4XFF088491",
|
||||
"color":null,
|
||||
"access_type":"OWNER",
|
||||
"granular_access":{"hide_private":false},
|
||||
"tokens":["acadf06c646653b4","cc6b3e741b90d32d"],
|
||||
"state":"online",
|
||||
"in_service":false,
|
||||
"id_s":"1492931365719407",
|
||||
"calendar_enabled":true,
|
||||
"api_version":36,
|
||||
"backseat_token":null,
|
||||
"backseat_token_updated_at":null,
|
||||
"ble_autopair_enrolled":false,
|
||||
"charge_state":{
|
||||
"battery_heater_on":false,
|
||||
"battery_level":80,
|
||||
"battery_range":218.21,
|
||||
"charge_amps":16,
|
||||
"charge_current_request":16,
|
||||
"charge_current_request_max":16,
|
||||
"charge_enable_request":false,
|
||||
"charge_energy_added":15.59,
|
||||
"charge_limit_soc":80,
|
||||
"charge_limit_soc_max":100,
|
||||
"charge_limit_soc_min":50,
|
||||
"charge_limit_soc_std":90,
|
||||
"charge_miles_added_ideal":48.5,
|
||||
"charge_miles_added_rated":60.5,
|
||||
"charge_port_cold_weather_mode":null,
|
||||
"charge_port_color":"Off",
|
||||
"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":16,
|
||||
"charger_power":0,
|
||||
"charger_voltage":0,
|
||||
"charging_state":"Complete",
|
||||
"conn_charge_cable":"IEC",
|
||||
"est_battery_range":177.86,
|
||||
"fast_charger_brand":"<invalid>",
|
||||
"fast_charger_present":false,
|
||||
"fast_charger_type":"<invalid>",
|
||||
"ideal_battery_range":174.57,
|
||||
"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":true,
|
||||
"off_peak_charging_times":"all_week",
|
||||
"off_peak_hours_end_time":360,
|
||||
"preconditioning_enabled":false,
|
||||
"preconditioning_times":"all_week",
|
||||
"scheduled_charging_mode":"DepartBy",
|
||||
"scheduled_charging_pending":false,
|
||||
"scheduled_charging_start_time":1695087005,
|
||||
"scheduled_charging_start_time_app":0,
|
||||
"scheduled_departure_time":1695186000,
|
||||
"scheduled_departure_time_minutes":420,
|
||||
"supercharger_session_trip_planner":false,
|
||||
"time_to_full_charge":0.0,
|
||||
"timestamp":1695129645307,
|
||||
"trip_charging":false,
|
||||
"usable_battery_level":80,
|
||||
"user_charge_enable_request":null
|
||||
},
|
||||
"climate_state":{
|
||||
"allow_cabin_overheat_protection":false,
|
||||
"battery_heater":false,
|
||||
"battery_heater_no_power":false,
|
||||
"cabin_overheat_protection":"On",
|
||||
"climate_keeper_mode":"off",
|
||||
"defrost_mode":0,
|
||||
"driver_temp_setting":23.0,
|
||||
"fan_status":0,
|
||||
"hvac_auto_request":"On",
|
||||
"inside_temp":23.9,
|
||||
"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":-103,
|
||||
"max_avail_temp":28.0,
|
||||
"min_avail_temp":15.0,
|
||||
"outside_temp":19.5,
|
||||
"passenger_temp_setting":23.0,
|
||||
"remote_heater_control_enabled":false,
|
||||
"right_temp_direction":-103,
|
||||
"seat_heater_left":0,
|
||||
"seat_heater_rear_center":0,
|
||||
"seat_heater_rear_left":0,
|
||||
"seat_heater_rear_right":0,
|
||||
"seat_heater_right":0,
|
||||
"side_mirror_heaters":false,
|
||||
"steering_wheel_heater":false,
|
||||
"supports_fan_only_cabin_overheat_protection":false,
|
||||
"timestamp":1695129645306,
|
||||
"wiper_blade_heater":false
|
||||
},
|
||||
"drive_state":{
|
||||
"gps_as_of":1695129643,
|
||||
"heading":107,
|
||||
"latitude":47.004162,
|
||||
"longitude":8.603523,
|
||||
"native_latitude":47.004162,
|
||||
"native_location_supported":1,
|
||||
"native_longitude":8.603523,
|
||||
"native_type":"wgs",
|
||||
"power":0,
|
||||
"shift_state":null,
|
||||
"speed":null,
|
||||
"timestamp":1695129645307
|
||||
},
|
||||
"gui_settings":{
|
||||
"gui_24_hour_time":true,
|
||||
"gui_charge_rate_units":"km/hr",
|
||||
"gui_distance_units":"km/hr",
|
||||
"gui_range_display":"Ideal",
|
||||
"gui_temperature_units":"C",
|
||||
"show_range_units":true,
|
||||
"timestamp":1695129645307
|
||||
},
|
||||
"vehicle_config":{
|
||||
"can_accept_navigation_requests":true,
|
||||
"can_actuate_trunks":true,
|
||||
"car_special_type":"base",
|
||||
"car_type":"models",
|
||||
"charge_port_type":"EU",
|
||||
"dashcam_clip_save_supported":false,
|
||||
"default_charge_to_max":false,
|
||||
"driver_assist":"MonoCam",
|
||||
"ece_restrictions":true,
|
||||
"efficiency_package":"Default",
|
||||
"eu_vehicle":true,
|
||||
"exterior_color":"MetallicBlack",
|
||||
"front_drive_unit":"NoneOrSmall",
|
||||
"has_air_suspension":true,
|
||||
"has_ludicrous_mode":false,
|
||||
"has_seat_cooling":false,
|
||||
"headlamp_type":"Hid",
|
||||
"interior_trim_type":"AllBlack",
|
||||
"motorized_charge_port":true,
|
||||
"plg":true,
|
||||
"pws":false,
|
||||
"rear_drive_unit":"Large",
|
||||
"rear_seat_heaters":1,
|
||||
"rear_seat_type":0,
|
||||
"rhd":false,
|
||||
"roof_color":"None",
|
||||
"seat_type":1,
|
||||
"spoiler_type":"Passive",
|
||||
"sun_roof_installed":1,
|
||||
"third_row_seats":"None",
|
||||
"timestamp":1695129645329,
|
||||
"trim_badging":"p85d",
|
||||
"use_range_badging":false,
|
||||
"utc_offset":7200,
|
||||
"wheel_type":"Charcoal21"
|
||||
},
|
||||
"vehicle_state":{
|
||||
"api_version":36,
|
||||
"autopark_state_v2":"standby",
|
||||
"autopark_style":"dead_man",
|
||||
"calendar_supported":true,
|
||||
"car_version":"2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state":0,
|
||||
"dashcam_clip_save_available":false,
|
||||
"dashcam_state":"<invalid>",
|
||||
"df":0,
|
||||
"dr":0,
|
||||
"fd_window":0,
|
||||
"feature_bitmask":"5,0",
|
||||
"fp_window":0,
|
||||
"ft":0,
|
||||
"homelink_device_count":0,
|
||||
"homelink_nearby":false,
|
||||
"is_user_present":false,
|
||||
"last_autopark_error":"no_error",
|
||||
"locked":true,
|
||||
"media_state":{"remote_control_enabled":true},
|
||||
"notifications_supported":true,
|
||||
"odometer":104374.713449,
|
||||
"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,
|
||||
"smart_summon_available":false,
|
||||
"software_update":{
|
||||
"download_perc":0,
|
||||
"expected_duration_sec":2700,
|
||||
"install_perc":1,
|
||||
"status":"",
|
||||
"version":"EU-2023.20-14615"
|
||||
},
|
||||
"speed_limit_mode":{
|
||||
"active":false,
|
||||
"current_limit_mph":90.0,
|
||||
"max_limit_mph":90,
|
||||
"min_limit_mph":50.0,
|
||||
"pin_code_set":false
|
||||
},
|
||||
"summon_standby_mode_enabled":false,
|
||||
"sun_roof_percent_open":0,
|
||||
"sun_roof_state":"closed",
|
||||
"timestamp":1695129645306,
|
||||
"tpms_pressure_fl":null,
|
||||
"tpms_pressure_fr":null,
|
||||
"tpms_pressure_rl":null,
|
||||
"tpms_pressure_rr":null,
|
||||
"valet_mode":false,
|
||||
"valet_pin_needed":true,
|
||||
"vehicle_name":"HTLC"
|
||||
}
|
||||
}
|
||||
fn json_vehicle_data_htlc_2023_09_19() {
|
||||
let s = include_str!("../testdata/vehicle_data_HTLC_2023_09_19.json");
|
||||
|
||||
let request_data = RequestData::GET {
|
||||
url: "https://owner-api.teslamotors.com/api/1/vehicles/1234567890/vehicle_data",
|
||||
};
|
||||
Api::parse_json::<VehicleData>(&request_data, s.to_string()).unwrap();
|
||||
}
|
||||
"#;
|
||||
|
||||
#[test]
|
||||
fn json_vehicle_data_htlc_2023_10_09() {
|
||||
let s = include_str!("../testdata/vehicle_data_HTLC_2023_10_09.json");
|
||||
|
||||
let request_data = RequestData::GET {
|
||||
url: "https://owner-api.teslamotors.com/api/1/vehicles/1234567890/vehicle_data",
|
||||
};
|
||||
Api::parse_json::<VehicleData>(&request_data, s.to_string()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn json_vehicle_data_bitcoin_lightning_2023_10_09() {
|
||||
let s = include_str!("../testdata/vehicle_data_BitcoinLightning_2023_10_09.json");
|
||||
|
||||
let request_data = RequestData::GET {
|
||||
url: "https://owner-api.teslamotors.com/api/1/vehicles/1234567890/vehicle_data",
|
||||
|
|
230
testdata/vehicle_data_BitcoinLightning_2023_10_09.json
vendored
Normal file
230
testdata/vehicle_data_BitcoinLightning_2023_10_09.json
vendored
Normal file
|
@ -0,0 +1,230 @@
|
|||
{
|
||||
"response": {
|
||||
"id": 1492932717794313,
|
||||
"user_id": 219663,
|
||||
"vehicle_id": 415321864,
|
||||
"vin": "5YJSA2DN0DFP21224",
|
||||
"color": null,
|
||||
"access_type": "OWNER",
|
||||
"granular_access": {
|
||||
"hide_private": false
|
||||
},
|
||||
"tokens": [
|
||||
"db320ce1f6df0599",
|
||||
"db0a017bf2a56da2"
|
||||
],
|
||||
"state": "online",
|
||||
"in_service": false,
|
||||
"id_s": "1492932717794313",
|
||||
"calendar_enabled": true,
|
||||
"api_version": 36,
|
||||
"backseat_token": null,
|
||||
"backseat_token_updated_at": null,
|
||||
"ble_autopair_enrolled": false,
|
||||
"charge_state": {
|
||||
"battery_heater_on": false,
|
||||
"battery_level": 52,
|
||||
"battery_range": 152.22,
|
||||
"charge_amps": 32,
|
||||
"charge_current_request": 32,
|
||||
"charge_current_request_max": 32,
|
||||
"charge_enable_request": true,
|
||||
"charge_energy_added": 7.62,
|
||||
"charge_limit_soc": 80,
|
||||
"charge_limit_soc_max": 100,
|
||||
"charge_limit_soc_min": 50,
|
||||
"charge_limit_soc_std": 90,
|
||||
"charge_miles_added_ideal": 23.5,
|
||||
"charge_miles_added_rated": 29.5,
|
||||
"charge_port_cold_weather_mode": null,
|
||||
"charge_port_color": "<invalid>",
|
||||
"charge_port_door_open": null,
|
||||
"charge_port_latch": "<invalid>",
|
||||
"charge_rate": 0,
|
||||
"charge_to_max_range": false,
|
||||
"charger_actual_current": null,
|
||||
"charger_phases": null,
|
||||
"charger_pilot_current": null,
|
||||
"charger_power": null,
|
||||
"charger_voltage": null,
|
||||
"charging_state": "Disconnected",
|
||||
"conn_charge_cable": "<invalid>",
|
||||
"est_battery_range": 116.93,
|
||||
"fast_charger_brand": "<invalid>",
|
||||
"fast_charger_present": null,
|
||||
"fast_charger_type": "<invalid>",
|
||||
"ideal_battery_range": 121.78,
|
||||
"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": null,
|
||||
"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": 0,
|
||||
"scheduled_departure_time": 1696914000,
|
||||
"scheduled_departure_time_minutes": 420,
|
||||
"supercharger_session_trip_planner": false,
|
||||
"time_to_full_charge": 0,
|
||||
"timestamp": 1696881258123,
|
||||
"trip_charging": null,
|
||||
"usable_battery_level": 52,
|
||||
"user_charge_enable_request": null
|
||||
},
|
||||
"climate_state": {
|
||||
"allow_cabin_overheat_protection": true,
|
||||
"battery_heater": false,
|
||||
"battery_heater_no_power": null,
|
||||
"cabin_overheat_protection": "On",
|
||||
"climate_keeper_mode": "off",
|
||||
"defrost_mode": 0,
|
||||
"driver_temp_setting": 21,
|
||||
"fan_status": 0,
|
||||
"hvac_auto_request": "On",
|
||||
"inside_temp": 22.2,
|
||||
"is_auto_conditioning_on": null,
|
||||
"is_climate_on": false,
|
||||
"is_front_defroster_on": false,
|
||||
"is_preconditioning": false,
|
||||
"is_rear_defroster_on": false,
|
||||
"left_temp_direction": null,
|
||||
"max_avail_temp": 28,
|
||||
"min_avail_temp": 15,
|
||||
"outside_temp": null,
|
||||
"passenger_temp_setting": 21,
|
||||
"remote_heater_control_enabled": false,
|
||||
"right_temp_direction": null,
|
||||
"seat_heater_left": 0,
|
||||
"seat_heater_right": 0,
|
||||
"side_mirror_heaters": false,
|
||||
"supports_fan_only_cabin_overheat_protection": false,
|
||||
"timestamp": 1696881258122,
|
||||
"wiper_blade_heater": false
|
||||
},
|
||||
"drive_state": {
|
||||
"gps_as_of": 1696881257,
|
||||
"heading": 125,
|
||||
"latitude": 47.351109,
|
||||
"longitude": 8.476027,
|
||||
"native_latitude": 47.351109,
|
||||
"native_location_supported": 1,
|
||||
"native_longitude": 8.476027,
|
||||
"native_type": "wgs",
|
||||
"power": 0,
|
||||
"shift_state": null,
|
||||
"speed": null,
|
||||
"timestamp": 1696881258123
|
||||
},
|
||||
"gui_settings": {
|
||||
"gui_24_hour_time": true,
|
||||
"gui_charge_rate_units": "km/hr",
|
||||
"gui_distance_units": "km/hr",
|
||||
"gui_range_display": "Ideal",
|
||||
"gui_temperature_units": "C",
|
||||
"show_range_units": true,
|
||||
"timestamp": 1696881258123
|
||||
},
|
||||
"vehicle_config": {
|
||||
"can_accept_navigation_requests": true,
|
||||
"can_actuate_trunks": true,
|
||||
"car_special_type": "base",
|
||||
"car_type": "models",
|
||||
"charge_port_type": "EU",
|
||||
"dashcam_clip_save_supported": false,
|
||||
"default_charge_to_max": false,
|
||||
"driver_assist": "None",
|
||||
"ece_restrictions": true,
|
||||
"efficiency_package": "Default",
|
||||
"eu_vehicle": true,
|
||||
"exterior_color": "Brown",
|
||||
"front_drive_unit": "NoneOrSmall",
|
||||
"has_air_suspension": true,
|
||||
"has_ludicrous_mode": false,
|
||||
"has_seat_cooling": false,
|
||||
"headlamp_type": "Halogen",
|
||||
"interior_trim_type": "AllBlack",
|
||||
"motorized_charge_port": false,
|
||||
"plg": true,
|
||||
"pws": false,
|
||||
"rear_drive_unit": "Large",
|
||||
"rear_seat_heaters": 0,
|
||||
"rear_seat_type": 0,
|
||||
"rhd": false,
|
||||
"roof_color": "None",
|
||||
"seat_type": 0,
|
||||
"spoiler_type": "None",
|
||||
"sun_roof_installed": 1,
|
||||
"third_row_seats": "None",
|
||||
"timestamp": 1696881258123,
|
||||
"trim_badging": "85",
|
||||
"use_range_badging": false,
|
||||
"utc_offset": 7200,
|
||||
"wheel_type": "AeroTurbine19"
|
||||
},
|
||||
"vehicle_state": {
|
||||
"api_version": 36,
|
||||
"autopark_state_v2": "unavailable",
|
||||
"calendar_supported": true,
|
||||
"car_version": "2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state": 0,
|
||||
"dashcam_clip_save_available": false,
|
||||
"dashcam_state": "<invalid>",
|
||||
"df": 0,
|
||||
"dr": 0,
|
||||
"fd_window": 0,
|
||||
"feature_bitmask": "5,0",
|
||||
"fp_window": 0,
|
||||
"ft": 0,
|
||||
"homelink_device_count": 0,
|
||||
"homelink_nearby": false,
|
||||
"is_user_present": false,
|
||||
"locked": true,
|
||||
"media_state": {
|
||||
"remote_control_enabled": true
|
||||
},
|
||||
"notifications_supported": true,
|
||||
"odometer": 169816.533912,
|
||||
"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,
|
||||
"software_update": {
|
||||
"download_perc": 0,
|
||||
"expected_duration_sec": 2700,
|
||||
"install_perc": 1,
|
||||
"status": "",
|
||||
"version": " "
|
||||
},
|
||||
"speed_limit_mode": {
|
||||
"active": false,
|
||||
"current_limit_mph": 85,
|
||||
"max_limit_mph": 90,
|
||||
"min_limit_mph": 55,
|
||||
"pin_code_set": false
|
||||
},
|
||||
"sun_roof_percent_open": 0,
|
||||
"sun_roof_state": "closed",
|
||||
"timestamp": 1696881258122,
|
||||
"tpms_pressure_fl": null,
|
||||
"tpms_pressure_fr": null,
|
||||
"tpms_pressure_rl": null,
|
||||
"tpms_pressure_rr": null,
|
||||
"valet_mode": false,
|
||||
"valet_pin_needed": true,
|
||||
"vehicle_name": "Bitcoin Lightning"
|
||||
}
|
||||
}
|
||||
}
|
238
testdata/vehicle_data_HTLC_2023_09_19.json
vendored
Normal file
238
testdata/vehicle_data_HTLC_2023_09_19.json
vendored
Normal file
|
@ -0,0 +1,238 @@
|
|||
{
|
||||
"response": {
|
||||
"id": 1492931365719407,
|
||||
"user_id": 219663,
|
||||
"vehicle_id": 1328174702,
|
||||
"vin": "5YJSA7H4XFF088491",
|
||||
"color": null,
|
||||
"access_type": "OWNER",
|
||||
"granular_access": {
|
||||
"hide_private": false
|
||||
},
|
||||
"tokens": [
|
||||
"acadf06c646653b4",
|
||||
"cc6b3e741b90d32d"
|
||||
],
|
||||
"state": "online",
|
||||
"in_service": false,
|
||||
"id_s": "1492931365719407",
|
||||
"calendar_enabled": true,
|
||||
"api_version": 36,
|
||||
"backseat_token": null,
|
||||
"backseat_token_updated_at": null,
|
||||
"ble_autopair_enrolled": false,
|
||||
"charge_state": {
|
||||
"battery_heater_on": false,
|
||||
"battery_level": 80,
|
||||
"battery_range": 218.21,
|
||||
"charge_amps": 16,
|
||||
"charge_current_request": 16,
|
||||
"charge_current_request_max": 16,
|
||||
"charge_enable_request": false,
|
||||
"charge_energy_added": 15.59,
|
||||
"charge_limit_soc": 80,
|
||||
"charge_limit_soc_max": 100,
|
||||
"charge_limit_soc_min": 50,
|
||||
"charge_limit_soc_std": 90,
|
||||
"charge_miles_added_ideal": 48.5,
|
||||
"charge_miles_added_rated": 60.5,
|
||||
"charge_port_cold_weather_mode": null,
|
||||
"charge_port_color": "Off",
|
||||
"charge_port_door_open": true,
|
||||
"charge_port_latch": "Engaged",
|
||||
"charge_rate": 0,
|
||||
"charge_to_max_range": false,
|
||||
"charger_actual_current": 0,
|
||||
"charger_phases": null,
|
||||
"charger_pilot_current": 16,
|
||||
"charger_power": 0,
|
||||
"charger_voltage": 0,
|
||||
"charging_state": "Complete",
|
||||
"conn_charge_cable": "IEC",
|
||||
"est_battery_range": 177.86,
|
||||
"fast_charger_brand": "<invalid>",
|
||||
"fast_charger_present": false,
|
||||
"fast_charger_type": "<invalid>",
|
||||
"ideal_battery_range": 174.57,
|
||||
"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": true,
|
||||
"off_peak_charging_times": "all_week",
|
||||
"off_peak_hours_end_time": 360,
|
||||
"preconditioning_enabled": false,
|
||||
"preconditioning_times": "all_week",
|
||||
"scheduled_charging_mode": "DepartBy",
|
||||
"scheduled_charging_pending": false,
|
||||
"scheduled_charging_start_time": 1695087005,
|
||||
"scheduled_charging_start_time_app": 0,
|
||||
"scheduled_departure_time": 1695186000,
|
||||
"scheduled_departure_time_minutes": 420,
|
||||
"supercharger_session_trip_planner": false,
|
||||
"time_to_full_charge": 0,
|
||||
"timestamp": 1695129645307,
|
||||
"trip_charging": false,
|
||||
"usable_battery_level": 80,
|
||||
"user_charge_enable_request": null
|
||||
},
|
||||
"climate_state": {
|
||||
"allow_cabin_overheat_protection": false,
|
||||
"battery_heater": false,
|
||||
"battery_heater_no_power": false,
|
||||
"cabin_overheat_protection": "On",
|
||||
"climate_keeper_mode": "off",
|
||||
"defrost_mode": 0,
|
||||
"driver_temp_setting": 23,
|
||||
"fan_status": 0,
|
||||
"hvac_auto_request": "On",
|
||||
"inside_temp": 23.9,
|
||||
"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": -103,
|
||||
"max_avail_temp": 28,
|
||||
"min_avail_temp": 15,
|
||||
"outside_temp": 19.5,
|
||||
"passenger_temp_setting": 23,
|
||||
"remote_heater_control_enabled": false,
|
||||
"right_temp_direction": -103,
|
||||
"seat_heater_left": 0,
|
||||
"seat_heater_rear_center": 0,
|
||||
"seat_heater_rear_left": 0,
|
||||
"seat_heater_rear_right": 0,
|
||||
"seat_heater_right": 0,
|
||||
"side_mirror_heaters": false,
|
||||
"steering_wheel_heater": false,
|
||||
"supports_fan_only_cabin_overheat_protection": false,
|
||||
"timestamp": 1695129645306,
|
||||
"wiper_blade_heater": false
|
||||
},
|
||||
"drive_state": {
|
||||
"gps_as_of": 1695129643,
|
||||
"heading": 107,
|
||||
"latitude": 47.004162,
|
||||
"longitude": 8.603523,
|
||||
"native_latitude": 47.004162,
|
||||
"native_location_supported": 1,
|
||||
"native_longitude": 8.603523,
|
||||
"native_type": "wgs",
|
||||
"power": 0,
|
||||
"shift_state": null,
|
||||
"speed": null,
|
||||
"timestamp": 1695129645307
|
||||
},
|
||||
"gui_settings": {
|
||||
"gui_24_hour_time": true,
|
||||
"gui_charge_rate_units": "km/hr",
|
||||
"gui_distance_units": "km/hr",
|
||||
"gui_range_display": "Ideal",
|
||||
"gui_temperature_units": "C",
|
||||
"show_range_units": true,
|
||||
"timestamp": 1695129645307
|
||||
},
|
||||
"vehicle_config": {
|
||||
"can_accept_navigation_requests": true,
|
||||
"can_actuate_trunks": true,
|
||||
"car_special_type": "base",
|
||||
"car_type": "models",
|
||||
"charge_port_type": "EU",
|
||||
"dashcam_clip_save_supported": false,
|
||||
"default_charge_to_max": false,
|
||||
"driver_assist": "MonoCam",
|
||||
"ece_restrictions": true,
|
||||
"efficiency_package": "Default",
|
||||
"eu_vehicle": true,
|
||||
"exterior_color": "MetallicBlack",
|
||||
"front_drive_unit": "NoneOrSmall",
|
||||
"has_air_suspension": true,
|
||||
"has_ludicrous_mode": false,
|
||||
"has_seat_cooling": false,
|
||||
"headlamp_type": "Hid",
|
||||
"interior_trim_type": "AllBlack",
|
||||
"motorized_charge_port": true,
|
||||
"plg": true,
|
||||
"pws": false,
|
||||
"rear_drive_unit": "Large",
|
||||
"rear_seat_heaters": 1,
|
||||
"rear_seat_type": 0,
|
||||
"rhd": false,
|
||||
"roof_color": "None",
|
||||
"seat_type": 1,
|
||||
"spoiler_type": "Passive",
|
||||
"sun_roof_installed": 1,
|
||||
"third_row_seats": "None",
|
||||
"timestamp": 1695129645329,
|
||||
"trim_badging": "p85d",
|
||||
"use_range_badging": false,
|
||||
"utc_offset": 7200,
|
||||
"wheel_type": "Charcoal21"
|
||||
},
|
||||
"vehicle_state": {
|
||||
"api_version": 36,
|
||||
"autopark_state_v2": "standby",
|
||||
"autopark_style": "dead_man",
|
||||
"calendar_supported": true,
|
||||
"car_version": "2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state": 0,
|
||||
"dashcam_clip_save_available": false,
|
||||
"dashcam_state": "<invalid>",
|
||||
"df": 0,
|
||||
"dr": 0,
|
||||
"fd_window": 0,
|
||||
"feature_bitmask": "5,0",
|
||||
"fp_window": 0,
|
||||
"ft": 0,
|
||||
"homelink_device_count": 0,
|
||||
"homelink_nearby": false,
|
||||
"is_user_present": false,
|
||||
"last_autopark_error": "no_error",
|
||||
"locked": true,
|
||||
"media_state": {
|
||||
"remote_control_enabled": true
|
||||
},
|
||||
"notifications_supported": true,
|
||||
"odometer": 104374.713449,
|
||||
"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,
|
||||
"smart_summon_available": false,
|
||||
"software_update": {
|
||||
"download_perc": 0,
|
||||
"expected_duration_sec": 2700,
|
||||
"install_perc": 1,
|
||||
"status": "",
|
||||
"version": "EU-2023.20-14615"
|
||||
},
|
||||
"speed_limit_mode": {
|
||||
"active": false,
|
||||
"current_limit_mph": 90,
|
||||
"max_limit_mph": 90,
|
||||
"min_limit_mph": 50,
|
||||
"pin_code_set": false
|
||||
},
|
||||
"summon_standby_mode_enabled": false,
|
||||
"sun_roof_percent_open": 0,
|
||||
"sun_roof_state": "closed",
|
||||
"timestamp": 1695129645306,
|
||||
"tpms_pressure_fl": null,
|
||||
"tpms_pressure_fr": null,
|
||||
"tpms_pressure_rl": null,
|
||||
"tpms_pressure_rr": null,
|
||||
"valet_mode": false,
|
||||
"valet_pin_needed": true,
|
||||
"vehicle_name": "HTLC"
|
||||
}
|
||||
}
|
||||
}
|
239
testdata/vehicle_data_HTLC_2023_10_09.json
vendored
Normal file
239
testdata/vehicle_data_HTLC_2023_10_09.json
vendored
Normal file
|
@ -0,0 +1,239 @@
|
|||
{
|
||||
"response": {
|
||||
"id": 1492931365719407,
|
||||
"user_id": 219663,
|
||||
"vehicle_id": 1328174702,
|
||||
"vin": "5YJSA7H4XFF088491",
|
||||
"color": null,
|
||||
"access_type": "OWNER",
|
||||
"granular_access": {
|
||||
"hide_private": false
|
||||
},
|
||||
"tokens": [
|
||||
"4ee16f40a748248b",
|
||||
"da151ce5463a4eca"
|
||||
],
|
||||
"state": "online",
|
||||
"in_service": false,
|
||||
"id_s": "1492931365719407",
|
||||
"calendar_enabled": true,
|
||||
"api_version": 36,
|
||||
"backseat_token": null,
|
||||
"backseat_token_updated_at": null,
|
||||
"ble_autopair_enrolled": false,
|
||||
"charge_state": {
|
||||
"battery_heater_on": false,
|
||||
"battery_level": 23,
|
||||
"battery_range": 62.2,
|
||||
"charge_amps": 16,
|
||||
"charge_current_request": 16,
|
||||
"charge_current_request_max": 16,
|
||||
"charge_enable_request": false,
|
||||
"charge_energy_added": 0,
|
||||
"charge_limit_soc": 100,
|
||||
"charge_limit_soc_max": 100,
|
||||
"charge_limit_soc_min": 50,
|
||||
"charge_limit_soc_std": 90,
|
||||
"charge_miles_added_ideal": 0,
|
||||
"charge_miles_added_rated": 0,
|
||||
"charge_port_cold_weather_mode": null,
|
||||
"charge_port_color": "<invalid>",
|
||||
"charge_port_door_open": null,
|
||||
"charge_port_latch": "<invalid>",
|
||||
"charge_rate": 0,
|
||||
"charge_to_max_range": true,
|
||||
"charger_actual_current": null,
|
||||
"charger_phases": null,
|
||||
"charger_pilot_current": null,
|
||||
"charger_power": null,
|
||||
"charger_voltage": null,
|
||||
"charging_state": "Stopped",
|
||||
"conn_charge_cable": "<invalid>",
|
||||
"est_battery_range": 51.96,
|
||||
"fast_charger_brand": "<invalid>",
|
||||
"fast_charger_present": null,
|
||||
"fast_charger_type": "<invalid>",
|
||||
"ideal_battery_range": 49.76,
|
||||
"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": null,
|
||||
"off_peak_charging_enabled": true,
|
||||
"off_peak_charging_times": "all_week",
|
||||
"off_peak_hours_end_time": 360,
|
||||
"preconditioning_enabled": false,
|
||||
"preconditioning_times": "all_week",
|
||||
"scheduled_charging_mode": "DepartBy",
|
||||
"scheduled_charging_pending": true,
|
||||
"scheduled_charging_start_time": 1696886400,
|
||||
"scheduled_charging_start_time_app": 0,
|
||||
"scheduled_charging_start_time_minutes": 1400,
|
||||
"scheduled_departure_time": 1696914000,
|
||||
"scheduled_departure_time_minutes": 420,
|
||||
"supercharger_session_trip_planner": false,
|
||||
"time_to_full_charge": 0,
|
||||
"timestamp": 1696881260449,
|
||||
"trip_charging": null,
|
||||
"usable_battery_level": 23,
|
||||
"user_charge_enable_request": null
|
||||
},
|
||||
"climate_state": {
|
||||
"allow_cabin_overheat_protection": false,
|
||||
"battery_heater": false,
|
||||
"battery_heater_no_power": null,
|
||||
"cabin_overheat_protection": "On",
|
||||
"climate_keeper_mode": "off",
|
||||
"defrost_mode": 0,
|
||||
"driver_temp_setting": 22,
|
||||
"fan_status": 0,
|
||||
"hvac_auto_request": "On",
|
||||
"inside_temp": 23.1,
|
||||
"is_auto_conditioning_on": null,
|
||||
"is_climate_on": false,
|
||||
"is_front_defroster_on": false,
|
||||
"is_preconditioning": false,
|
||||
"is_rear_defroster_on": false,
|
||||
"left_temp_direction": null,
|
||||
"max_avail_temp": 28,
|
||||
"min_avail_temp": 15,
|
||||
"outside_temp": null,
|
||||
"passenger_temp_setting": 22,
|
||||
"remote_heater_control_enabled": false,
|
||||
"right_temp_direction": null,
|
||||
"seat_heater_left": 0,
|
||||
"seat_heater_rear_center": 0,
|
||||
"seat_heater_rear_left": 0,
|
||||
"seat_heater_rear_right": 0,
|
||||
"seat_heater_right": 0,
|
||||
"side_mirror_heaters": false,
|
||||
"steering_wheel_heater": false,
|
||||
"supports_fan_only_cabin_overheat_protection": false,
|
||||
"timestamp": 1696881260449,
|
||||
"wiper_blade_heater": false
|
||||
},
|
||||
"drive_state": {
|
||||
"gps_as_of": 1696881258,
|
||||
"heading": 107,
|
||||
"latitude": 47.004158,
|
||||
"longitude": 8.603508,
|
||||
"native_latitude": 47.004158,
|
||||
"native_location_supported": 1,
|
||||
"native_longitude": 8.603508,
|
||||
"native_type": "wgs",
|
||||
"power": 0,
|
||||
"shift_state": null,
|
||||
"speed": null,
|
||||
"timestamp": 1696881260449
|
||||
},
|
||||
"gui_settings": {
|
||||
"gui_24_hour_time": true,
|
||||
"gui_charge_rate_units": "km/hr",
|
||||
"gui_distance_units": "km/hr",
|
||||
"gui_range_display": "Ideal",
|
||||
"gui_temperature_units": "C",
|
||||
"show_range_units": true,
|
||||
"timestamp": 1696881260449
|
||||
},
|
||||
"vehicle_config": {
|
||||
"can_accept_navigation_requests": true,
|
||||
"can_actuate_trunks": true,
|
||||
"car_special_type": "base",
|
||||
"car_type": "models",
|
||||
"charge_port_type": "EU",
|
||||
"dashcam_clip_save_supported": false,
|
||||
"default_charge_to_max": false,
|
||||
"driver_assist": "MonoCam",
|
||||
"ece_restrictions": true,
|
||||
"efficiency_package": "Default",
|
||||
"eu_vehicle": true,
|
||||
"exterior_color": "MetallicBlack",
|
||||
"front_drive_unit": "NoneOrSmall",
|
||||
"has_air_suspension": true,
|
||||
"has_ludicrous_mode": false,
|
||||
"has_seat_cooling": false,
|
||||
"headlamp_type": "Hid",
|
||||
"interior_trim_type": "AllBlack",
|
||||
"motorized_charge_port": true,
|
||||
"plg": true,
|
||||
"pws": false,
|
||||
"rear_drive_unit": "Large",
|
||||
"rear_seat_heaters": 1,
|
||||
"rear_seat_type": 0,
|
||||
"rhd": false,
|
||||
"roof_color": "None",
|
||||
"seat_type": 1,
|
||||
"spoiler_type": "Passive",
|
||||
"sun_roof_installed": 1,
|
||||
"third_row_seats": "None",
|
||||
"timestamp": 1696881260450,
|
||||
"trim_badging": "p85d",
|
||||
"use_range_badging": false,
|
||||
"utc_offset": 7200,
|
||||
"wheel_type": "Charcoal21"
|
||||
},
|
||||
"vehicle_state": {
|
||||
"api_version": 36,
|
||||
"autopark_state_v2": "standby",
|
||||
"autopark_style": "dead_man",
|
||||
"calendar_supported": true,
|
||||
"car_version": "2022.8.10.16 7477b4ff8e78",
|
||||
"center_display_state": 0,
|
||||
"dashcam_clip_save_available": false,
|
||||
"dashcam_state": "<invalid>",
|
||||
"df": 0,
|
||||
"dr": 0,
|
||||
"fd_window": 0,
|
||||
"feature_bitmask": "5,0",
|
||||
"fp_window": 0,
|
||||
"ft": 0,
|
||||
"homelink_device_count": 0,
|
||||
"homelink_nearby": false,
|
||||
"is_user_present": false,
|
||||
"last_autopark_error": "no_error",
|
||||
"locked": true,
|
||||
"media_state": {
|
||||
"remote_control_enabled": true
|
||||
},
|
||||
"notifications_supported": true,
|
||||
"odometer": 104885.252853,
|
||||
"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,
|
||||
"smart_summon_available": false,
|
||||
"software_update": {
|
||||
"download_perc": 0,
|
||||
"expected_duration_sec": 2700,
|
||||
"install_perc": 1,
|
||||
"status": "",
|
||||
"version": "EU-2023.20-14615"
|
||||
},
|
||||
"speed_limit_mode": {
|
||||
"active": false,
|
||||
"current_limit_mph": 90,
|
||||
"max_limit_mph": 90,
|
||||
"min_limit_mph": 50,
|
||||
"pin_code_set": false
|
||||
},
|
||||
"summon_standby_mode_enabled": false,
|
||||
"sun_roof_percent_open": 0,
|
||||
"sun_roof_state": "closed",
|
||||
"timestamp": 1696881260448,
|
||||
"tpms_pressure_fl": null,
|
||||
"tpms_pressure_fr": null,
|
||||
"tpms_pressure_rl": null,
|
||||
"tpms_pressure_rr": null,
|
||||
"valet_mode": false,
|
||||
"valet_pin_needed": true,
|
||||
"vehicle_name": "HTLC"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue