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

Vehicle In Service #142

Open
HarmOtten opened this issue Aug 15, 2019 · 10 comments
Open

Vehicle In Service #142

HarmOtten opened this issue Aug 15, 2019 · 10 comments

Comments

@HarmOtten
Copy link
Contributor

Currently the Tesla-App shows that my vehicle is In Service, but when I look at the response from the Tesla-API request "vehicle" or "vehicle_data", the field "in_service" shows False.
So there must be another way/command of detecting whether a Tesla is in service or not.
Any ideas?

@timdorr
Copy link
Owner

timdorr commented Aug 15, 2019

What do you get back from the vehicle_data endpoint? It's probably pulling from there.

@HarmOtten
Copy link
Contributor Author

HarmOtten commented Aug 15, 2019

Yes, and this is the complete response:

{
    "id": **********************,
    "user_id": *********,
    "vehicle_id": ***************,
    "vin": "****************",
    "display_name": "Jupiter",
    "option_codes": "AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0",
    "color": null,
    "tokens": [
        "****************",
        "****************"
    ],
    "state": "online",
    "in_service": false,
    "id_s": "57812065898986398",
    "calendar_enabled": true,
    "api_version": 6,
    "backseat_token": null,
    "backseat_token_updated_at": null,
    "charge_state": {
        "battery_heater_on": false,
        "battery_level": 35,
        "battery_range": 107.32,
        "charge_current_request": 16,
        "charge_current_request_max": 16,
        "charge_enable_request": true,
        "charge_energy_added": 0,
        "charge_limit_soc": 50,
        "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": false,
        "charge_port_door_open": false,
        "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": 2,
        "charging_state": "Disconnected",
        "conn_charge_cable": "<invalid>",
        "est_battery_range": 114.72,
        "fast_charger_brand": "<invalid>",
        "fast_charger_present": false,
        "fast_charger_type": "<invalid>",
        "ideal_battery_range": 107.32,
        "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,
        "scheduled_charging_pending": false,
        "scheduled_charging_start_time": null,
        "time_to_full_charge": 0,
        "timestamp": 1565889340343,
        "trip_charging": false,
        "usable_battery_level": 35,
        "user_charge_enable_request": null
    },
    "climate_state": {
        "battery_heater": false,
        "battery_heater_no_power": null,
        "climate_keeper_mode": "off",
        "driver_temp_setting": 22.5,
        "fan_status": 0,
        "inside_temp": 25.1,
        "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": 0,
        "max_avail_temp": 28,
        "min_avail_temp": 15,
        "outside_temp": 25.5,
        "passenger_temp_setting": 22.5,
        "remote_heater_control_enabled": false,
        "right_temp_direction": 0,
        "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,
        "smart_preconditioning": false,
        "timestamp": 1565889340343,
        "wiper_blade_heater": false
    },
    "drive_state": {
        "gps_as_of": 1565879624,
        "heading": 175,
        "latitude": *********,
        "longitude": **********,
        "native_latitude": **********,
        "native_location_supported": 1,
        "native_longitude": **********,
        "native_type": "wgs",
        "power": 0,
        "shift_state": null,
        "speed": null,
        "timestamp": 1565889340343
    },
    "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",
        "show_range_units": false,
        "timestamp": 1565889340343
    },
    "vehicle_config": {
        "can_accept_navigation_requests": true,
        "can_actuate_trunks": true,
        "car_special_type": "base",
        "car_type": "model3",
        "charge_port_type": "CCS",
        "eu_vehicle": true,
        "exterior_color": "RedMulticoat",
        "has_air_suspension": false,
        "has_ludicrous_mode": false,
        "key_version": 2,
        "motorized_charge_port": true,
        "plg": false,
        "rear_seat_heaters": 1,
        "rear_seat_type": null,
        "rhd": false,
        "roof_color": "Glass",
        "seat_type": null,
        "spoiler_type": "None",
        "sun_roof_installed": null,
        "third_row_seats": "<invalid>",
        "timestamp": 1565889340344,
        "use_range_badging": true,
        "wheel_type": "Pinwheel18"
    },
    "vehicle_state": {
        "api_version": 6,
        "autopark_state_v2": "standby",
        "autopark_style": "dead_man",
        "calendar_supported": true,
        "car_version": "2019.28.1 4ff958d",
        "center_display_state": 0,
        "df": 0,
        "dr": 0,
        "ft": 16,
        "homelink_nearby": false,
        "is_user_present": false,
        "last_autopark_error": "no_error",
        "locked": false,
        "media_state": {
            "remote_control_enabled": true
        },
        "notifications_supported": true,
        "odometer": 1719.594525,
        "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,
        "software_update": {
            "expected_duration_sec": 1500,
            "status": "available"
        },
        "speed_limit_mode": {
            "active": false,
            "current_limit_mph": 86.864113,
            "max_limit_mph": 90,
            "min_limit_mph": 50,
            "pin_code_set": false
        },
        "sun_roof_percent_open": null,
        "sun_roof_state": "unknown",
        "timestamp": 1565889340343,
        "valet_mode": false,
        "vehicle_name": "Jupiter"
    }
}

@timdorr
Copy link
Owner

timdorr commented Aug 15, 2019

There is a newer service_data endpoint that we haven't documented yet. That might have something in it: https://github.com/timdorr/tesla-api/blob/master/docs/miscellaneous/endpoints.md#L44

@HarmOtten
Copy link
Contributor Author

That's it! Brilliant, thanks!
The endpoint with URL "api/1/vehicles/{vehicle_id}/service_data"
delivers this:

{
    "service_etc": "2019-08-15T14:15:00+02:00",
    "service_status": "in_service"
}

@timdorr
Copy link
Owner

timdorr commented Aug 15, 2019

Simple enough! Thanks for the response. I'll see about getting that documented.

@MrgSub

This comment has been minimized.

@timdorr

This comment has been minimized.

@MrgSub

This comment has been minimized.

@timdorr

This comment has been minimized.

Repository owner deleted a comment from 414412 Jul 8, 2020
@dacastro4
Copy link

Old thread, I know but do we know what happens or the response if you try to submit an action? Is there a specific response?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants