TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Model S REST API

Discussion in 'Model S: User Interface' started by timdorr, Feb 2, 2013.

  1. markb1

    markb1 Active Member

    Joined:
    Feb 17, 2012
    Messages:
    2,817
    Location:
    San Diego, CA
    I don't see supercharger info on my iPhone. I think I'm up to date (3.8.0). Where is it supposed to show up? Perhaps I need to be running V9 in my car? Though that would be strange.
     
  2. ckoval7

    ckoval7 Mild One

    Joined:
    Sep 19, 2018
    Messages:
    304
    Location:
    Maryland
    You need at least 2018.46.2 I believe.
     
  3. SG57

    SG57 Former Vendor

    Joined:
    Jul 24, 2016
    Messages:
    400
    Location:
    Spokane, WA
    So all my Model 3 issues with the telemetry streaming API, it turns out it's any newer Model with the issue. I think newer vehicles have stopped supporting it altogether?? That's a scary and annoying thought... If anyone knows anything or hears something please let us know.

    For reference, this post: Vendor - Dashboard for Tesla - the better app for your Tesla
     
  4. Dazboj

    Dazboj Member

    Joined:
    May 9, 2017
    Messages:
    76
    Location:
    UK
    Yes, I noticed it too with Models S and X.
    Seems to be all 2018 models and possibly late 2017.
     
    • Like x 1
  5. f8K37Sq31

    f8K37Sq31 Former Vendor

    Joined:
    Jan 1, 2017
    Messages:
    398
    Location:
    california
    Yes, the streaming API is disabled for 2018 cars.
    Also, the wake up time for the cars has increased significantly (~30 sec). Presumably Tesla has done this to decrease phantom drain, but based on my measurement, it has had virtually no effect on phantom drain; just made it frustrating to use the app.
     
    • Like x 1
  6. dpskipper

    dpskipper Developer

    Joined:
    Aug 4, 2016
    Messages:
    186
    Location:
    Australia
    I've had my Model S on always on for 2 years and never noticed any range depletion.
     
    • Like x 1
  7. SG57

    SG57 Former Vendor

    Joined:
    Jul 24, 2016
    Messages:
    400
    Location:
    Spokane, WA
    Same here, my 2016 Model S has negligible phantom drain if any, always connected on and energy saver off the whole time.

    Man this really sucks, if no streaming API replacement is provided then newer cars are arguably less valuable than older ones?
     
  8. dpskipper

    dpskipper Developer

    Joined:
    Aug 4, 2016
    Messages:
    186
    Location:
    Australia
    Well it depends on how you value the car. I would value the extra performance, MCU2 and AP2 that a 2018 75D has over a 2016 75D. But that's just me.
     
    • Helpful x 1
  9. joshua

    joshua New Member

    Joined:
    Apr 24, 2016
    Messages:
    2
    Location:
    Jeffersonville, IN, USA
    I traded my June 2016 Model S 90D for an October 2018 Model S 100D on December 30 to take advantage of the $7500 tax credit one more time.

    I used the streaming API to capture data from just over 100 miles on the odometer to the nearly 40k when I turned it in, and really liked having it available for some of my other automations. I came across this post and the bug report on on the tesla-api github today while troubleshooting why my new car wasn't logging or automating correctly. I am disappointed to have lost the streaming API (and I agree the app feels slower to connect sometimes, but I don't use it as often, and it hasn't really bothered me yet).

    I just finished replacing the important parts of my automation setup with data from polling the drive_state API, and I think it will be fine. I'll play with increasing the polling frequency when the car is moving or doing something interesting, and look forward to the streaming API working again one day, but I'll still take AP2 and the other perks of the new car.

    Based on my experience on how my 2016 car, its condition, and its features/options were valued by Tesla, CarMax, Carvana, and Vroom, I think it's safe to say this has no impact on the overall value of the car.
     
  10. brianman

    brianman Burrito Founder

    Joined:
    Nov 10, 2011
    Messages:
    17,116
    On the iPhone app, the waking up UI that shows when you connect to a "very dormant" vehicle appears to wait for a specific response and/or interval.

    Has anybody looked at this recently to see exactly what it's checking?

    I've noticed (revisiting my old logger) that sometimes the wake_up command returns a state of asleep (and doesn't actually trigger the desired waking up).

    Perhaps I'm doing it wrong.
     
  11. dpskipper

    dpskipper Developer

    Joined:
    Aug 4, 2016
    Messages:
    186
    Location:
    Australia
    /wake_up is the only such endpoint.
    The trick is to just keep trying.
     
    • Helpful x 1
  12. f8K37Sq31

    f8K37Sq31 Former Vendor

    Joined:
    Jan 1, 2017
    Messages:
    398
    Location:
    california
    Does the `homelink_nearby` field still work. It returns `false` for me even though the car is in the garage (configured homelink.
    I have configured two homelinks (one for the gate and one for the garage door). What is the meaning of this field if there are more than one homelink configured?
     
  13. malefactor

    malefactor Member

    Joined:
    Jun 4, 2017
    Messages:
    10
    Location:
    Austin, TX
    what is best practice for preheating the car? All I've found so far is:

    auto_conditioning_start()
    set_temps(driver_temp = 25.5,passenger_temp = 25.5)
    remote_seat_heater_request(heater=0, level=3)
    remote_seat_heater_request(heater=1, level=3)

    Do we have other controls? It doesn't appear so...?

    Asking because this procedure has been working nicely until today, where I go out into the car and find that the fan level is set to 1, A/C is off, and air is only being blown down towards our feet. So 30 minutes of prewarming barely did anything (if it did anything at all).
     
  14. malefactor

    malefactor Member

    Joined:
    Jun 4, 2017
    Messages:
    10
    Location:
    Austin, TX
    followup to above.

    Model 3: It doesn't seem to be broken. Doing those things to warm up the interior of the car worked great.
    Model S: this is where the problem is. Over the last hour I've watched as the car crept up in interior temperature very very slowly.

    I notice the following under 'climate_state':

    u'driver_temp_setting': 25.600000000000001,
    u'fan_status': 0,
    u'inside_temp': 10.4,
    u'is_auto_conditioning_on': False,
    u'is_climate_on': True,
    u'is_front_defroster_on': False,
    u'is_preconditioning': True,
    u'is_rear_defroster_on': False,
    u'left_temp_direction': 488,
    u'max_avail_temp': 28.0,
    u'min_avail_temp': 15.0,
    u'outside_temp': 0.5,
    u'passenger_temp_setting': 25.600000000000001,
    u'remote_heater_control_enabled': True,
    u'right_temp_direction': 488,
    u'seat_heater_left': 3,
    u'seat_heater_right': 3,
    u'side_mirror_heaters': False,
    u'smart_preconditioning': False,
    u'timestamp': 1548334606817,

    so "is_preconditioning" is on, but "fan_status" is off? What's going on here? I don't have precise behavior from before but it seems like a software update has broken the Model S API response.
     
  15. ACDriveMotor

    ACDriveMotor Member

    Joined:
    Aug 11, 2013
    Messages:
    865
    Location:
    Seattle, WA
    I have not seen a problem with my MS. But I don't use pre-conditioning. Have you tried turning that off?
     
  16. ramonneke

    ramonneke Active Member

    Joined:
    Apr 26, 2018
    Messages:
    1,176
    Location:
    Rotterdam
    I have a S100D 2018 and trying to make sense of the charge API.

    The fields of interest are:

    //"battery_level": 68,
    //"battery_range": 266.3, // 428.56
    //"ideal_battery_range": 213.87, // 344.18
    //"est_battery_range": 165.7, / 266.66

    These are reported in miles and I'm from the Netherlands so I convert them to kilometers. The "battery_range" is unspecified and not sure how to label this. Is this 'rated' or 'typical'? Same basically for "est_battery_range". I think estimated range is a dynamic value based on the current consumption of the car but I'm not certain.

    In the energy screen in the car I have a "typical" line of 200wh/km but as none of the values are labelled typical it is not clear.

    Calculating the max ranges is very easy, just divide the current values by the battery level and multiply by 100.

    I want to estimate the remaining capacity of the battery. To do so I need to take the current range and max range and divide these by a consumption rate value. I just don't know what these values are. I think estimated range is dynamic so I cannot use that value. Meaning I have "battery_range" and "ideal_battery_range"

    As I have a 100 battery pack I could more or less take a guesstimate and assume 100% is more of less 100kWh. If I do that and use 160wh/km for "battery_range" then my current capacity is 62.00kW and when 100% charged it would be 100.01kW but that seems off as I don't think my has has that much capacity to actually use.

    However, taking 160wh/km for "battery_range" gives me 199.22wh/km for ideal and 271.48wh/km for estimate.

    Dividing these:

    typical / ideal = 1.24515
    typical / estimate = 1.69673

    I think the first value will be fixed but I'm not sure until I've tested this after a few charges and trips.


    How are these factors for US cars? Are they the same? Would be interesting information to analyze.
     
  17. ramonneke

    ramonneke Active Member

    Joined:
    Apr 26, 2018
    Messages:
    1,176
    Location:
    Rotterdam
    As ideal is so damn near to 200 it could be that "ideal" is the typical shown in the EU / NL energy graph.

    For easy reference I converted them to both wh/km and wh/m:

    batteryrange 160.00wh/km, 257.49wh/m
    ideal 199.22wh/km, 320.62wh/m
    estimated 271.48wh/km, 436.90wh/m
     
  18. ramonneke

    ramonneke Active Member

    Joined:
    Apr 26, 2018
    Messages:
    1,176
    Location:
    Rotterdam
    AFter comparing I suspect the following:

    battery_range is probably "rated" range
    ideal_battery_range is what seems to be "typical" as presented in the car
    est_battery_range is what seems to be "estimated" as presented in the car

    That would mean that I would have 99.87kW available in my pack when I charge it to 100% which seems a bit high so still not sure about the numbers.
     
  19. markb1

    markb1 Active Member

    Joined:
    Feb 17, 2012
    Messages:
    2,817
    Location:
    San Diego, CA
    #2539 markb1, Feb 14, 2019
    Last edited: Feb 14, 2019
    Ideal range is a metric that Tesla used to quote for their cars. Before they even started selling the Model S, they were claiming the 85 kWh pack would achieve 300 miles of range. These ideal miles are what you get when you drive something like 55 MPH on level ground in moderate temperature. Almost nobody achieves that. Rated range is based on the EPA-estimated range, which was 265 miles for that original model S. They've moved away from ideal miles, because it was so unrealistic. I'm guessing, but it seems like typical range would be even lower than rated range, but that's just my plain English interpretation. Ideal miles are atypical!

    I know that neither battery_range or ideal_battery_range are based on dynamic wH/mile values.
     
  20. markb1

    markb1 Active Member

    Joined:
    Feb 17, 2012
    Messages:
    2,817
    Location:
    San Diego, CA

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC