Comments (10)
Please give the fix in ebcef52 a try!
from teslapy.
from teslapy.
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.
@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.
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.
I don't know why the auth server asks for a captcha, probably because it recognizes a foreign app logging in.
from teslapy.
@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.
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.
@tdorssers ebcef52 works, no more tracebacks. Thanks!
from teslapy.
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)
- last_seen() raises "Timestamp is in the future" error HOT 3
- No longer able to set Powerwall to self_consumption mode HOT 6
- Percentage Charged not updating on get_battery_data()
- Preconditioning Battery
- Authorization broken -> Always getting "Access Denied" HOT 1
- Solar panel power only updates sporadically HOT 2
- Fails to work when run in a daemon process. HOT 2
- 410 error on get_battery_data HOT 15
- 400 Client Error: time_of_use_settings
- latitude and longitude are not in drive_state HOT 3
- Selenium blocked by Tesla HOT 2
- Move to Fleet API and Tesla Vehicle Command SDK HOT 5
- I get an InvalidSchema("No connection adapters were found for 'https://owner-api.teslamotors.com/api/1/vehicles/) Exception when using vehicle.get_vehicle_data() HOT 1
- Powerwall function get_battery_data not working HOT 1
- Not able to login HOT 6
- It seems get_charge_history() API URI is no longer working? Returns 400 HOT 2
- Seems like the teslapy is no longer working with the new Tesla APIs HOT 58
- drive_state does not have latitude and longitude
- shift_state and speed stay None even during driving
- looks like tesla have changed battery data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslapy.