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

Tesla Owner API Tutorial (All you need is your browser)

Discussion in 'Model S' started by Akrion, Oct 27, 2017.

  1. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    I searched through the threads here but all I was able to find was a little bit too technical IMO for the average user and the step by step how to was not really there. I love the fact that Tim did the Apiary.io documentation and wanted with just the browser to walk through an example of how to get your Tesla's vehicle state etc.

    I ended up actually doing this step by step for myself and that is how I found out that my "uncorking" was not done although my car was 2 months ago with Tesla of West Palm Beach for that exact purpose. So I have a real life example how this helped me.

    Obviously, you can go like 10 different ways to get to the API and work with it but what I really liked with the Apiary.io was that all you need is just the browser so anyone can quickly do it without any other tools like Postman etc.

    In any case, hope this is useful to the community and my apologies if it was done already. I did not find much on YT on the subject.




    PS. There are few issues in the video like the Content-Type header param etc but overall it should suffice for the average user to follow and get data for their vehicle out IMO.
     
    • Informative x 12
    • Like x 11
    • Love x 2
  2. appleguru

    appleguru Member

    Joined:
    Mar 15, 2017
    Messages:
    552
    Location:
    US
    Nice video, hopefully it helps someone.

    Hopefully you've changed your Tesla account password/invalidated the token you show in the video? You may also wish to blank out your Tesla account email address.
     
    • Helpful x 1
  3. rltsx

    rltsx Member

    Joined:
    May 8, 2017
    Messages:
    24
    Location:
    Orange County, CA
    That was helpful, thank you.

    Just did my uncork today and no performance gain was noted. I followed your tutorial and mine also says p3. Going to have a nice chat w/ SC tomorrow.
     
    • Like x 1
  4. ShockOnT

    ShockOnT ⚡️⚡️⚡️⚡️⚡️

    Joined:
    Jun 26, 2016
    Messages:
    2,174
    Location:
    Sydney
    Great stuff. I've just honked my car's horn using my mouse. That's a first :)
     
    • Funny x 2
    • Like x 1
  5. appleguru

    appleguru Member

    Joined:
    Mar 15, 2017
    Messages:
    552
    Location:
    US
    Ask them (nicely) to show you the diagnostics screen so you can verify the uncork took. Based on the data we have so far, the API will only tell you part of the story. But even so, any car with "P3", as far as we can tell, is not uncorked:

    JDeck has collected some more data from his Teslafi platform here that does seem to validate that P3 = corked for 75Ds: http://firmware.teslafi.com/uncorked.php

    UncorkedDiagUI75D.jpg
     
  6. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    Thanks! Yes that was a temp password :) It was easier that way than to hide it through the video.
     
  7. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    Yes that is my story as well. Glad that tutorial helped you prove it for you as well!
     
  8. LMichel

    LMichel Member

    Joined:
    Sep 29, 2017
    Messages:
    125
    Location:
    Rochester, NY
    This is great stuff!
    I was following right along and making good progress. Until I tried a GET for the Vehicle State :(
    I get a 404:
    {
    "response": null,
    "error": "not_found",
    "error_description": ""
    }
    The vehicle ID in the URL also shows in red font.
    I get the impression that I don't have the correct syntax to put in the URI parameter??
    The URI name/value pair I'm using is vehicle_id 0123456789
    Where the numeric string is a cut and paste of the return of my successful Vehicle call (List all vehicles)

    Thoughts??
     
  9. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    Yes you copied either the wrong vechile_id or typed it wrong. It should be in red font. Did you copy the id_s? In the video I mentioned that you should copy id_s and not vechicle_id ... not sure why they did this.
     
    • Informative x 1
    • Funny x 1
  10. LMichel

    LMichel Member

    Joined:
    Sep 29, 2017
    Messages:
    125
    Location:
    Rochester, NY
    That was it!
    Uh... yeah, you kinda did mention that id_s and not vehicle_id is what should be used.. Damn, my ADHD strikes again. LOL.
    Sorry about that :)
     
  11. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    hehe np. Glad I was able to help.
     
  12. sumitkgarg

    sumitkgarg Member

    Joined:
    Aug 5, 2017
    Messages:
    506
    Location:
    Bay Area, CA
    What does "perf_config": "P2" mean for a RWD S75?
     
  13. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    My uneducated guess would be since you are RWD your best bet is P2 ... Dual motors get P1 or something like that. I could be completely wrong of course :)
     
  14. sumitkgarg

    sumitkgarg Member

    Joined:
    Aug 5, 2017
    Messages:
    506
    Location:
    Bay Area, CA
    means uncorked?

    Edit - that's what it seems like as per http://firmware.teslafi.com/uncorked.php - P2 for S75 means uncorked.
     
    • Like x 2
  15. avesraggiana

    avesraggiana Member

    Joined:
    Jan 25, 2017
    Messages:
    369
    Location:
    Chula Vista CA
    Do I have to put in every quotation mark, full colon, and comma in the Body field? I fill everything in as instructed in your video but I keep getting messages like this:


    1. "error": "invalid_request",
    2. "error_description": "The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.”

    I probably need to go back to my apiary and tend to my bees. Much easier than dealing with any programming language. Novice user here.
     
  16. sumitkgarg

    sumitkgarg Member

    Joined:
    Aug 5, 2017
    Messages:
    506
    Location:
    Bay Area, CA
    The "Set Charge Limit" doesn't seem to be working fine. It doesn't matter what percentage I specify, it gets set to 50%. Anyone else had luck with it? I am thinking about creating a simple webpage for my personal use to get/set some basis things the way I like it.
     
  17. jimmyz80

    jimmyz80 Member

    Joined:
    Dec 26, 2014
    Messages:
    405
    Location:
    Apex, NC
    Same story here. :( Picked up my car today and no difference at all. Used this great tutorial and noticed I still have P3 as well.
     
    • Like x 1
  18. rltsx

    rltsx Member

    Joined:
    May 8, 2017
    Messages:
    24
    Location:
    Orange County, CA
    Bring it back. I spoke w/ my SC about my car showing P3, and they performed the procedure again. He confirmed it is now showing P1, and my run log confirms the performance gain.
     
    • Like x 3
    • Love x 1
  19. verygreen

    verygreen Curious member

    Joined:
    Jan 16, 2017
    Messages:
    1,700
    Location:
    TN
    re corning/uncorking, sometimes they uncork the car, but forget to update all the mothership bits and so then teleforce bots descend on your car and cork it back thinking the change was unauthorized.
     
    • Helpful x 5
    • Like x 2
    • Informative x 1
    • Funny x 1
  20. Akrion

    Akrion Member

    Joined:
    Aug 16, 2017
    Messages:
    52
    Location:
    Flroida
    Copy and paste the bellow. Replace the email and password. Should work.

    {
    "grant_type": "password",
    "client_id": "81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384",
    "client_secret": "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3",
    "email": "<YOUREMAIL>",
    "password": "<YOURPASSWORD>"
    }
     

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