Comments (13)
I have removed headless login from the module. A web browser is now required to authenticate and manual copy-pasting of the redirected URL is needed. It's not the nicest solution, but it works (no ReCaptcha anymore) and you only need to do it once. Using Selenium this process can be automated, so it is not too bad.
Please give f9a28cc a try.
from teslapy.
@AGSPhoenix thanks for the feedback. f6514a6 includes a brief warning and improved docs.
from teslapy.
Same. But I am doing major rework on my scripts, so might be that for me.
from teslapy.
Something definitely changed. Not working for me as well.
from teslapy.
To the extent it helps TeslaPy resolve this, I wanted to share my observations. It looks like recaptcha has been added today which requires JavaScript to be processed to continue. I have a python library that proxied all the requests to a user that ran into this issue today too.
If you disable javascript, which is how python API access works, it fails with the message reported above. If you enable JavaScript, the scripts checks to confirm your browser is at auth.tesla.com and fails since it's not the right location. So my conclusion is that you need to process JavaScript and also override any checks on the browser location.
from teslapy.
Captcha and recaptcha are very different. Tesla has upgraded to recaptcha, which is much harder to bypass. Any help much appreciated.
from teslapy.
I'm using 2captcha to solve captchas automatically, and accepts recaptcha v2 and v3, maybe this can be a temporary solution?
https://github.com/2captcha/2captcha-python#recaptcha-v3
result = solver.recaptcha(sitekey='6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
url='https://mysite.com/page/with/recaptcha',
version='v3',
param1=..., ...)
from teslapy.
What information would be needed from 3rd party token manager apps to build a valid cache.json file? Could we get a redacted example file for those of us who have tokens already?
from teslapy.
Please consider signing this petition to Tesla to open up their API
https://chng.it/kfjvv9sr6k
from teslapy.
What information would be needed from 3rd party token manager apps to build a valid cache.json file? Could we get a redacted example file for those of us who have tokens already?
This is the format:
{
"[email protected]": {
"url": "https://auth.tesla.com/",
"sso": {
"access_token": "***",
"refresh_token": "***",
"id_token": "***",
"expires_in": 28800,
"state": "***",
"token_type": "Bearer",
"expires_at": 1631332627.6740067
},
"ownerapi": {
"access_token": "***",
"token_type": "bearer",
"expires_in": 3888000,
"refresh_token": "***",
"created_at": 1631303828
}
}
}
from teslapy.
Tried it with menu.py. Entered my email address and got taken to the sign in page. Signed in and got a 404 error.
With no advance warning that this would happen, I assumed something had broken. Figured it out when I went back to the console, but some users will not know what the 'redirect URL' is. Should probably add a brief warning about what will happen next and what to do.
That aside, seems to work great.
from teslapy.
Packaged, released and made available on PyPI
from teslapy.
@tdorssers works perfect for me as well, thanks a lot!
from teslapy.
Related Issues (20)
- 429 on every sync_wake_up() call HOT 3
- 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
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.