Giter VIP home page Giter VIP logo

Comments (10)

tdorssers avatar tdorssers commented on May 23, 2024 1

Please give the fix in ebcef52 a try!

from teslapy.

dawiinci avatar dawiinci commented on May 23, 2024

#24

from teslapy.

marcone avatar marcone commented on May 23, 2024

Is there a way to avoid triggering the captcha altogether? When I use cli.py it asks for a captcha, but when I sign in with the Tesla app it does not.
(edit: to be clear: this is with the latest code from github)

from teslapy.

omaliphant avatar omaliphant commented on May 23, 2024

@tdorssers i still seem to have an issue where the captcha doesnt save the svg file to my directory and never prompts me for the captcha response?

im using the:

`def solveCaptcha(svg):

    with open('captcha.svg', 'wb') as f:

        f.write(svg)

        f.close()

    return input('Captcha: ')`

with:

`def teslapyStartSession(creds):

    with teslapy.Tesla(creds[0], creds[2], lambda: 'XXXXXX') as tesla:

        tesla.captcha_solver = solveCaptcha

        tesla.fetch_token()

    return tesla`

is this correct?

from teslapy.

dawiinci avatar dawiinci commented on May 23, 2024

Please give the fix in ebcef52 a try!

Unfortunately it still asks for a Captcha and opens the browser.

   Script Error                    tesla_connect.py: EOF when reading a line
   Script Error                    Exception Traceback (most recent call shown last):

     tesla_connect.py, line 18, at top level
     File "/Users/server/Library/Python/2.7/lib/python/site-packages/teslapy/__init__.py", line 205, in fetch_token
       form['captcha'] = self.captcha_solver(response.content)
     File "/Users/server/Library/Python/2.7/lib/python/site-packages/teslapy/__init__.py", line 319, in _solve_captcha
       return input('Captcha: ')
EOFError: EOF when reading a line

I just replaced the three files in teslapy folder.

from teslapy.

tdorssers avatar tdorssers commented on May 23, 2024

I don't know why the auth server asks for a captcha, probably because it recognizes a foreign app logging in.

from teslapy.

tdorssers avatar tdorssers commented on May 23, 2024

@tdorssers i still seem to have an issue where the captcha doesnt save the svg file to my directory and never prompts me for the captcha response?

im using the:

`def solveCaptcha(svg):
    with open('captcha.svg', 'wb') as f:
        f.write(svg)
        f.close()
    return input('Captcha: ')`

with:

`def teslapyStartSession(creds):
    with teslapy.Tesla(creds[0], creds[2], lambda: 'XXXXXX') as tesla:
        tesla.captcha_solver = solveCaptcha
        tesla.fetch_token()
    return tesla`

is this correct?

Does this occur using version ebcef52? I haven't released a new version to pypi. Do you get any tracebacks?

from teslapy.

tdorssers avatar tdorssers commented on May 23, 2024

Is there a way to avoid triggering the captcha altogether? When I use cli.py it asks for a captcha, but when I sign in with the Tesla app it does not.
(edit: to be clear: this is with the latest code from github)

I haven't found a way yet, maybe it has something to do with the useragent or some other properties that are recognized by the auth server.

from teslapy.

gaardiolor avatar gaardiolor commented on May 23, 2024

@tdorssers ebcef52 works, no more tracebacks. Thanks!

from teslapy.

HildisviniOttar avatar HildisviniOttar commented on May 23, 2024

If you reverse proxy the native Tesla iOS app through Charles, API calls works with the Bearer tokens.
However if you logout and try to login again, it fails and shows an NSURLConnection error. Remove proxy and it works fine. They must be hard-coding a trusted certificate in-app that Tesla API requires for initial primary app auth.

Interestingly - I wonder if the native iOS app token can be used by teslapy for "permanent" auth token. 🤔

from teslapy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.