Announcement

Collapse
No announcement yet.

teslaSeer, plugin using tesla motors "API"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • salvesen
    replied
    Originally posted by bsobel View Post
    While you are on this, I know you said this is for Windows, but are you actually calling any native code, or is it possible this will 'just work' on Linux?
    When I was doing the testing of the SW I think people tried using it on linux and said it worked fine. But I am not sure to be honest.

    Leave a comment:


  • bsobel
    replied
    While you are on this, I know you said this is for Windows, but are you actually calling any native code, or is it possible this will 'just work' on Linux?

    Leave a comment:


  • bsobel
    replied
    Originally posted by salvesen View Post
    So after som fiddling around and using .UserAgent instead of posting it in the body I seem to have contact with the servers. But now I have a 400 bad request. So, still something wrong but getting closer. Not sure what is causing the bad request at the moment.
    Aww sorry, didn't see this part of the thread when I just responded...

    Leave a comment:


  • bsobel
    replied
    Originally posted by bsobel View Post

    Are those spaces in the clientID and client_secret intentional? Normally its one long string, not broken up like posted....
    Ok I finally got a chance to properly read this over, I think you misunderstood the user-agent field. It is not part of the OATH payload, but rather a HTTP header that needs to be added. See request.Headers.Add() to do so.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Originally posted by NotYetRated View Post
    salvesen, do you have a donate link or anything? I pick up my Model 3 tomorrow and cannot wait to 1. pick her up and 2. test this plugin out! Really appreciate the work!
    So you bought a model 3 just to test this plugin. That’s geek . Haha kidding

    Leave a comment:


  • gbdesai
    replied
    Excellent news salvesen! Thanks for working so diligently on this!

    Leave a comment:


  • NotYetRated
    replied
    salvesen, do you have a donate link or anything? I pick up my Model 3 tomorrow and cannot wait to 1. pick her up and 2. test this plugin out! Really appreciate the work!

    Leave a comment:


  • salvesen
    replied
    I am happy to say that my request just went trough! Please give me some time to re-write is needed and v1.0.2PA will be available soon

    Leave a comment:


  • risquare
    replied
    There is an active discussion in Tesla forums about a commercially available Tesla iPhone app (called remote-s) that works and doesn't have reported problems with the API.
    https://forums.tesla.com/forum/forum...fficial-thread
    I asked them specifically what kind of API they are using hacked vs official and the answer was vague. Also the author claims that he has access to some "features" that others don't.

    Leave a comment:


  • salvesen
    replied
    So after som fiddling around and using .UserAgent instead of posting it in the body I seem to have contact with the servers. But now I have a 400 bad request. So, still something wrong but getting closer. Not sure what is causing the bad request at the moment.

    Leave a comment:


  • gbdesai
    replied
    Or this from Tim Dorr as well, last GitHub commit was just 6 days ago...

    https://github.com/timdorr/model-s-api

    Oh, maybe this is the auth stuff you already new about (UA and X-Tesla-User-Agent)...

    https://github.com/timdorr/model-s-api/issues/79

    Leave a comment:


  • gbdesai
    replied
    This help at all? Or has it not been updated?

    https://timdorr.docs.apiary.io/#

    Leave a comment:


  • salvesen
    replied
    Originally posted by bsobel View Post

    Are those spaces in the clientID and client_secret intentional? Normally its one long string, not broken up like posted....

    I think it is just the forum formatting, they are no spaces in the test script I am running.

    Leave a comment:


  • bsobel
    replied
    Originally posted by salvesen View Post
    The problem is that I cant seem to reach the servers anymore, and all information I have gathered is that they added user-agent and that it can be anything, but when adding it I am still unable to get a proper response from the servers. Below is just a small debug script I am running to try and establish connection. I would love some input/help if anyone have more information.

    Public Sub getAccessToken(argumentsObject As Object)
    Dim uri As New Uri("https://owner-api.teslamotors.com/oauth/token")
    Dim jsonString As String = "{'grant_type' : 'password', 'client_id' : '81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef21067 96384', 'client_secret' : 'c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093b b2fa3', 'email' : 'myemail', 'password' : 'mypassword', 'user-agent' : '007'}"
    Dim data As Byte() = Encoding.UTF8.GetBytes(jsonString)
    Dim result_post As String = SendRequest(uri, data, "application/json", "POST")
    hs.WriteLog("message", result_post)
    End Sub


    Private Function SendRequest(uri As Uri, jsonDataBytes As Byte(), contentType As String, method As String) As String
    Dim req As WebRequest = WebRequest.Create(uri)
    req.ContentType = contentType
    req.Method = method
    req.ContentLength = jsonDataBytes.Length


    Dim stream = req.GetRequestStream()
    stream.Write(jsonDataBytes, 0, jsonDataBytes.Length)
    stream.Close()

    Dim response = req.GetResponse().GetResponseStream()

    Dim reader As New StreamReader(response)
    Dim res = reader.ReadToEnd()
    reader.Close()
    response.Close()

    Return res
    End Function
    Are those spaces in the clientID and client_secret intentional? Normally its one long string, not broken up like posted....

    Leave a comment:


  • salvesen
    replied
    Originally posted by risquare View Post
    There is an active discussion in Tesla forums about a commercially available Tesla iPhone app (called remote-s) that works and doesn't have reported problems with the API.
    https://forums.tesla.com/forum/forum...fficial-thread
    Yea, most of the applications are updated with the new API. But it is not well documented, or I havent found it yet. Everyone is talking about the user-agent being the change but for me it is still not working.

    Leave a comment:

Working...
X