Announcement

Collapse
No announcement yet.

teslaSeer, plugin using tesla motors "API"

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

  • 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

    Leave a comment:


  • salvesen
    replied
    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

    Leave a comment:


  • bsobel
    replied
    Originally posted by salvesen View Post


    Sorrry for the late response, at the moment I am not planning for that. But you are welcome to try and figure out what is going on with the API and how to get a connection trough vb.net at the moment
    Can you let me know what issues you are seeing, or perhaps share the code privately so I can debug (happy to do it under an NDA)?

    Leave a comment:


  • salvesen
    replied
    Originally posted by bsobel View Post

    Ping on this question...

    Sorrry for the late response, at the moment I am not planning for that. But you are welcome to try and figure out what is going on with the API and how to get a connection trough vb.net at the moment

    Leave a comment:


  • salvesen
    replied
    Just a short update, Tesla has changed some stuff on their api side. Still trying to get the connection back, but I am not finding some good sorces for what has been changed so please be patient and I will have a new version out as soon as possible.

    Leave a comment:


  • gbdesai
    replied
    Ditto

    Leave a comment:


  • landude
    replied
    I just added this to HS today and am receiving the same server error.

    Leave a comment:


  • cheeryfool
    replied
    Is the plugin currently working for anyone? Mine is now returning a server error: "In URLAction GET: The remote server returned an error: (503) Server Unavailable." I am seeing this from pressing the Get Token button. It was working 2 days ago. I checked my login credentials. It wasn't working last night - one of my events didn't fire - and I now see the error when trying to get a fresh token.

    Leave a comment:


  • NotYetRated
    replied
    I am EAGERLY awaiting the ability to utilize this! Supposed to be next week!

    Leave a comment:


  • bsobel
    replied
    Originally posted by bsobel View Post
    I'm also a plugin author, would you be open to some help porting it to Linux?
    Ping on this question...

    Leave a comment:


  • risquare
    replied
    I was very excited to use this plug-in to integrate my Tesla with Google Home trough HS3. However just found that someone has already integrated Tesla with GH directly. However this HS3 plug-in provides unique opportunities in special occasions such as geo-fencing, statistical data about places and speed, speak status reports throughout the house etc. Below is a link and spoken commands . Notoriously this integration doesn't provide the "summon" function either.

    https://teslamotorsclub.com/tmc/thre...ral-use.91949/

    get charge status
    get car status
    get climate status
    get location
    turn climate on
    warm up my car
    cool my car
    set driver temperature to 72
    set passenger side to 73
    start charging
    stop charging
    honk the horn
    flash lights
    turn climate off
    stop climate
    stop heating
    stop cooling
    how warm is my car
    how cold is my car
    dude where's my car
    get ready to take off
    go into hyperdrive
    how far can I drive
    how far can I go
    whats your name
    switch cars
    set charge limit to 85 percent
    start charging to 90 percent
    whats the charge limit
    lock the car
    unlock the car
    Open rear trunk
    Open front trunk
    Open trunk (assumes rear)
    Open frunk (assumes front)
    Close trunk

    Leave a comment:


  • risquare
    replied
    Originally posted by salvesen View Post

    Are you using the latest version? it should check the setting in your car and update automagically
    Yes, indeed the plug-in shows miles (not km) for my car and that is correct. However, for temperature it still shows Centigrade instead of Fahrenheit despite the fact that the car is setup for F for sure.

    Leave a comment:


  • risquare
    replied
    ... of course "summon" is the crown jewel of all actions. Tesla native iPhone app does have it. However Tesla is very particular about the use of it and requires the user to be close to the car when action takes place. What is your take ? Is it available to you to work with? Can we hope that we will see it implemented within your wonderful Tesla plug-in? Thanks again for the great work.

    Leave a comment:


  • risquare
    replied
    Is there a reason of why "open/close trunk" and "open frunk" functions are not implemented. They are in the native Tesla app so I assume they are in the API.

    Leave a comment:


  • risquare
    replied
    It is better tonight. Difference is that I have the native iPhone Tesla app open to track actions by Tesla HS3 plug-in. I don't know if that matters. Sorry for the confusion. I saw some actions and yes there are records in the log after I enabled Tesla API's log. I say "some" actions because the plug-in didn't always perform the action. Ironically sometimes it will perform the action on Tesla (confirmed by Tesla iPhone app) but will not change it's own HS3 device accordingly (which caused confusion before that there is no action). More testing pending. Some "recommendations" if you don't mind
    1. Uncheck the box "Do not update device last change time if device value does not change:" for ALL Tesla devices. It's checked by default and creates (to me at least) the impression that some devices are not updated promptly when expected to update.
    2. Force an "update" after an action so that users see the result of the action promptly.
    3. Force web page refresh (could be beyond your control) as sometimes manually refresh is needed to see if an action took place

    Leave a comment:

Working...
X